Skip to content

Deprecation warning since symfony/http-foundation 7.4: for Request::get() #57962

@mariopro

Description

@mariopro

Laravel Version

10.40.2

PHP Version

8.3.1

Database Driver & Version

No response

Description

After the composer update, laravel/framework" was updated to 12.40.2 and is now throwing a deprecation warning Since symfony/http-foundation 7.4: Request::get() is deprecated, use properties ->attributes, query or request directly instead. in /home/theproject/public_html/vendor/symfony/deprecation-contracts/function.php on line 25

Steps To Reproduce

To reproduce:

  1. Perform a composer update and check that it updates to laravel/framework 12.40.2
  2. If not done yet, do a composer dump-autoload
  3. Check the logs
  4. Go to a specific page where you have the code like Request::get()->('something') or $request::get()->('something') or request()->get()->('something') and replace it with $request->something or request()->something and the deprecation warning no longer appears.

EDIT/UPDATE (December 1, 2025)

Not a framework bug

After digging into a clean Laravel installation, this is not a Laravel/framework bug or issue. It´s in fact a Symfony deprecation for the Request methods used. For people using packages or their own code, they shold review any request()->get() or $request->get() code that need to be changed. Please refer to Symfony documentation at https://symfony.com/blog/new-in-symfony-7-4-request-class-improvements

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions