Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[FrameworkBundle] fixlint:container
command#60942
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
5018fdd
toe191359
Comparelint:container
commandstatus: needs work |
lint:container
commandlint:container
commande191359
to0196be5
Comparestatus: needs review |
privatebool$public =false; | ||
privatearray$deprecation = []; | ||
publicfunction__construct( | ||
privatestring$id, | ||
privatebool$public =false, | ||
bool$public =false, | ||
) { | ||
$this->public =$public; |
santysisiJun 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
If we want to avoid changing the__constructor
, we can use the magic__unserialize
method instead:
publicfunction__unserialize(array$data):void{$this->id =$data['id'];$this->public =$data['public'] ??false;$this->deprecation =$data['deprecation'] ?? [];}
lint:container
commandlint:container
commandI'll try to add some tests as soon as possible. |
Thank you@santysisi. |
3448023
intosymfony:7.4Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR resolves two issues related to the
lint:container
command:Incorrect use of
isDebug()
method: TheisDebug()
method was being called on the$container
, but this method does not exist there. The correct call should be on the$kernel
instance.Issue during container unserialization: When unserializing the dumped container to retrieve the
ContainerBuilder
, problem was with the service aliases. Thepublic
property was not correctly initialized because the constructor is bypassed during unserialization.