-
Notifications
You must be signed in to change notification settings - Fork 66
Prepare major release and allow symfony 6 #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8046396
to
1820167
Compare
All tests pass again, the PR is ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for that work!
you are removing the deprecation about passing objects - i think if we don't have string
parameter type declarations, we should check with is_string to have clean error reporting rather than end up in unexpected behaviour.
public function generate($name, $parameters = [], $absolute = UrlGeneratorInterface::ABSOLUTE_PATH): string | ||
{ | ||
if (is_object($name)) { | ||
@trigger_error('Passing an object as route name is deprecated since version 2.3. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` as route name and the object in the parameters with key `RouteObjectInterface::ROUTE_OBJECT`.', E_USER_DEPRECATED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we check $name with is_string and error if it is not a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I've applied the check!
I've added the necessary type checks and tests for this case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the work!
i adjusted the branch alias in composer.json. can you add a build for php 8.1 as well? that might lead to further changes because of deprecations. |
This PR adds some required typehints for symfony 6 and to make this change easier I suggest to release this PR as a new major release. It's easy for project to upgrade/support the upcoming major, as only a previous deprecation is removed and all older symfony versions are still supported (+ sf6 support)