Skip to content

Commit

Permalink
[UtilitiesBundle] Fix deprecated urltransationnamingstrategy (#3036)
Browse files Browse the repository at this point in the history
* [UtilitiesBundle] Fix deprecated urltransationnamingstrategy

Co-authored-by: Merel Jossart <[email protected]>
Co-authored-by: Jeroen Thora <[email protected]>
  • Loading branch information
3 people authored Nov 18, 2021
1 parent dab81f8 commit 0412d96
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions UPGRADE-5.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Together with the CSRF token some of those routes will only be available to post
* `Kunstmaan\MediaBundle\Controller\FolderController::deleteAction`
* `Kunstmaan\MediaBundle\Controller\MediaController::deleteAction`

* We have updated the `\Kunstmaan\UtilitiesBundle\Helper\UrlTransactionNamingStrategy` class to be compatible with `ekino/newrelic-bundle` 2.0. If you use this class upgrade the newrelic bundle in your project.

AdminBundle
------------

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"require-dev": {
"symfony/debug": "^3.4.21|^4.4",
"fakerphp/faker": "^1.15",
"ekino/newrelic-bundle": "^1.4",
"ekino/newrelic-bundle": "^2.3",
"matthiasnoback/symfony-config-test": "^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"symfony/phpunit-bridge": "^5.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace Kunstmaan\UtilitiesBundle\Helper;

use Ekino\Bundle\NewRelicBundle\TransactionNamingStrategy\TransactionNamingStrategyInterface;
use Ekino\NewRelicBundle\TransactionNamingStrategy\TransactionNamingStrategyInterface;
use Symfony\Component\HttpFoundation\Request;

class UrlTransactionNamingStrategy implements TransactionNamingStrategyInterface
{
public function getTransactionName(Request $request)
public function getTransactionName(Request $request): string
{
return $request->getPathInfo();
}
}

4 changes: 2 additions & 2 deletions src/Kunstmaan/UtilitiesBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"symfony/phpunit-bridge": "^5.1",
"phpunit/phpunit": "^8.5",
"ekino/newrelic-bundle": "^1.4"
"ekino/newrelic-bundle": "^2.3"
},
"suggest": {
"ekino/newrelic-bundle": "To use the UrlTransactionNamingStrategy"
"ekino/newrelic-bundle": "Require ^2.0 to use the UrlTransactionNamingStrategy"
},
"autoload": {
"psr-4": { "Kunstmaan\\UtilitiesBundle\\": "" }
Expand Down

0 comments on commit 0412d96

Please sign in to comment.