-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Update to Symfony 6.2 #1362
Update to Symfony 6.2 #1362
Conversation
For the first one, we need to debug why the DbalLogger still gets autoloaded while DoctrineBundle properly supports using middlewares when using DBAL 3.2+ and Symfony versions containing the middleware for the profiler integration. for the For the extractor, either a config setting needs to be added to switch to the new extractor, or something needs to be fixed in Symfony to avoid triggering the deprecation in all projects. |
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.
As the DataTransformerInterface is now generic in Symfony 6.2+, you should add the @template-implements DataTransformerInterface<Tag[], string>
on the TagArrayToStringTransformer to make phpstan happy about it (as it wants to know the type for that class)
Instead of using |
I've just updated it until Symfony 6.2 RC1 and also updated all recipes. We still have these indirect deprecations:
|
@javiereguiluz, it is good practice to put each controller argument on its own line? |
@seb-jean the traditional Symfony practice was to put all arguments on the same line, even if it's too long. However, now that we're applying PHP attributes to some arguments, we think it's better in that case to put each argument on its own line, to not miss those PHP attributes. |
We no longer need to call |
Should we use the hash_property_path option for https://github.com/symfony/demo/blob/main/src/Form/Type/ChangePasswordType.php? // https://github.com/symfony/demo/blob/main/src/Form/Type/ChangePasswordType.php
->add('newPassword', RepeatedType::class, [
'type' => PasswordType::class,
'constraints' => [
new NotBlank(),
new Length(
min: 5,
max: 128,
),
],
'first_options' => [
'label' => 'label.new_password',
'hash_property_path' => 'password'
],
'second_options' => [
'label' => 'label.new_password_confirm'
],
]) And remove |
For the remaining deprecations, here is the status:
|
@stof thanks for the update about the deprecations! After the latest updates, the deprecation related to translation is gone. I can only see these:
|
@seb-jean I've merged this PR without doing other changes because it was taking too long already ... but I'd love to review a PR that updates the code to use some of the nice features introduced in Symfony 6.2, like the ones you mentioned here. Thanks! |
there are also other deprecation: |
Comments:
dev
dependency of DoctrineBundle is needed because we need the unreleased2.7.1
to have the equivalent of the old ParamConverter