You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Symfony version(s) affected: 5.3.0 to current latest 5.3.3
Description
I always get a different behavior between hidden option in php 8 attribute (#[AsCommand]) and the setHidden() method in configure method even with the fix #41686. Also with cache:clear.
How to reproduce
I've created a project (see below) to simplify the tests, but :
Declare a new Application.php class in src folder and use it in bin/console instead of the default Application class (just need to change the namespace):
… PHP8 (a1812)
This PR was merged into the 5.3 branch.
Discussion
----------
[Console] Fix save correct name in setDefaultCommand() for PHP8
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41942 | License | MIT
| Doc PR |
Fix save correct name in setDefaultCommand() for PHP8
Commits
-------
8a41694 fix setDefaultCommand
Symfony version(s) affected: 5.3.0 to current latest 5.3.3
Description
I always get a different behavior between hidden option in php 8 attribute (#[AsCommand]) and the
setHidden()
method in configure method even with the fix #41686. Also withcache:clear
.How to reproduce
I've created a project (see below) to simplify the tests, but :
src/Command
:Application.php
class insrc
folder and use it inbin/console
instead of the default Application class (just need to change the namespace):src/Application.php
bin/console
app:hello
with or without PHP 8 attributes.bin/console
. Update DefaultCommand with PHP 8 #[AsCommand] attribute and observe the difference.OR use the following project as exemple
https://github.com/duboiss/sfcommand
git clone https://github.com/duboiss/sfcommand cd sfcommand composer install bin/console git switch php8 bin/console
Additional context

Without attribute
With attribute

This is probably due to the fact that it has become lazy. Is there any way to keep the PHP 8 attribute and disable lazy (if that is the cause)?
The text was updated successfully, but these errors were encountered: