Skip to content

Stop calling Request::get on Symfony 7.4 / 8.0 as it is deprecated #1148

Description

@ruudk

Description

Since Symfony 7.4 (released a few weeks ago) calling get on Request is deprecated, see: https://symfony.com/blog/new-in-symfony-7-4-request-class-improvements#deprecated-the-get-method

But it seems that New Relic is calling this a lot, see:

request, "Symfony\\Component\\HttpFoundation\\Request" TSRMLS_CC)) {
/* Let's look for _route first. */
zval* route_rval
= nr_symfony_object_get_string(request, "_route" TSRMLS_CC);

zval* controller_rval
= nr_symfony_object_get_string(request, "_controller" TSRMLS_CC);

Both these cases should be replaced with $request->attributes->get

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions