Using Symfony 8 causes a fatal error due to usage of the removed Request::get() method.
The issue occurs in:
FOS\ElasticaBundle\Subscriber\PaginateElasticaQuerySubscriber
Code:
return $request->get($key);
In Symfony 8, Request::get() has been removed, which results in:
"Attempted to call an undefined method named 'get' of class 'Symfony\Component\HttpFoundation\Request'"
Steps to reproduce:
- Install Symfony 8
- Install FOSElasticaBundle (7.1@dev)
- Use pagination with KnpPaginator + Elastica adapter
- Trigger pagination
Expected behavior:
Use $request->query->get($key) instead.
Actual behavior:
Fatal error due to undefined method Request::get()
Environment:
- Symfony: 8.x
- FOSElasticaBundle: 7.x-dev
Proposed fix:
Replace $request->get($key) with $request->query->get($key)
Using Symfony 8 causes a fatal error due to usage of the removed Request::get() method.
The issue occurs in:
FOS\ElasticaBundle\Subscriber\PaginateElasticaQuerySubscriber
Code:
return $request->get($key);
In Symfony 8, Request::get() has been removed, which results in:
"Attempted to call an undefined method named 'get' of class 'Symfony\Component\HttpFoundation\Request'"
Steps to reproduce:
Expected behavior:
Use $request->query->get($key) instead.
Actual behavior:
Fatal error due to undefined method Request::get()
Environment:
Proposed fix:
Replace $request->get($key) with $request->query->get($key)