8000 Deprecation not showing in profiler in 4.4, gives an error after upgrading to Symfony 5.1 · Issue #37698 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Deprecation not showing in profiler in 4.4, gives an error after upgrading to Symfony 5.1 #37698

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

Closed
tjveldhuizen opened this issue Jul 29, 2020 · 1 comment

Comments

@tjveldhuizen
Copy link
Contributor

Symfony version(s) affected: 4.4.11

Description
Symfony is not reporting the deprecation which has been added in #28723, in the profiler. As a result, as soon as I upgraded some internal server errors popped up.

How to reproduce
I have created a very simple repository to reproduce the issue: https://github.com/tjveldhuizen/symfony-missing-deprecation-reproducer. When running this with 'symfony serve', at https://localhost:8000/ a very simple form is shown and the profiler is not showing any deprecations.
After replacing all "4.4" with "5.1" in composer.json and running composer upgrade, it shows a LogicException Cannot use the "format" option of "Symfony\Component\Form\Extension\Core\Type\DateTimeType" when the "html5" option is enabled.

@fancyweb
Copy link
Contributor
935B

Status: reviewed

Thanks for providing a reproducer.

@fabpot fabpot closed this as completed Sep 24, 2020
fabpot added a commit that referenced this issue Sep 24, 2020
…fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[Form] Fix custom formats deprecation with HTML5 widgets

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #37698
| License       | MIT
| Doc PR        | -

1. The options resolver only show the deprecations for user defined (overidden) options.
2. The default value of the `html5` option is enough to pass the logical condition of the callback.

That means that only setting the `format` option (like in the reproducer) does not trigger the deprecation while it should. I think we need a feature in the options resolver component to handle those kind of cases 🤷‍♂️

Meanwhile, we can fix the issue by "deprecating" all the concerned options of the logical condition of the callback.

Commits
-------

d28182f [Form] Fix custom formats deprecation with HTML5 widgets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0