FriendsOfSymfony / FOSJsRoutingBundle

A pretty nice way to expose your Symfony routing to client applications.
1.48k stars 260 forks source link

Fix Symfony 6.1 deprecations #439

Closed mmarton closed 2 years ago

mmarton commented 2 years ago

Fixes all symfony 6.1 deprecations:

Tested with lowest and highest dependencies, Using attributes is safe, as the repository requires PHP8 ans Symfony5.4 as minimum https://symfony.com/blog/new-in-symfony-5-3-lazy-command-description

mmarton commented 2 years ago

https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/439/files#diff-452efc6ad6c6b7b3e0c45b0edce01dc6b5d277bd3cd7ad38160ea177ac326226R54-R55 and https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/439/files#diff-452efc6ad6c6b7b3e0c45b0edce01dc6b5d277bd3cd7ad38160ea177ac326226L48-L49

can be safely remove. I can include it as well in this PR if you want.

raziel057 commented 2 years ago

Hi, please note that I already submitted a PR for the Normalizer / denormalizer part here: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/438

And the removal of deprecated param was also managed by a separated PR: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/437/commits/45e136d7f5b5d04d5e0afb4708e43ba8fb93b926

In any case your PR fix both issues so it would be nice to merge it. If done we can close the 2 other PRs.

mmarton commented 2 years ago

Yeah, I've seen the other PR-s after I submitted my changes. Should have checked it first. :)

mmarton commented 2 years ago

@tobias-93 what do you think?

tacman commented 2 years ago

Can this be merged please?

mmarton commented 2 years ago

@willdurand You seems like an old member of this repository, can you please help me how to get this PR move forward?

raziel057 commented 2 years ago

+1 I also wait on it.

tacman commented 2 years ago

If Symfony made it easier to hide deprecation messages, we could probably be more patient. But since they don't, every command line program I run I get a reminder that

2022-06-24T21:15:13-04:00 [info] User Deprecated: Since symfony/console 6.1: Relying on the static property "$defaultName" for setting a command name is deprecated. Add the "Symfony\Component\Console\Attribute\AsCommand" attribute to the "FOS\JsRoutingBundle\Command\RouterDebugExposedCommand" class instead.

Can you PLEASE accept the PR? Or at least give us some insight as to what needs to be done before you accept it?

raziel057 commented 2 years ago

@derrabus Could you please accept this PR?

tobias-93 commented 2 years ago

Thanks @mmarton (and @raziel057 and @IonBazan) for your contributions! Sorry it took a while to merge.