Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged

Conversation

santysisi
Copy link
Contributor

@santysisisantysisi commentedJun 28, 2025
edited
Loading

QA
Branch?7.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#60920
LicenseMIT

This PR resolves two issues related to thelint:container command:

  1. Incorrect use ofisDebug() 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.

  2. Issue during container unserialization: When unserializing the dumped container to retrieve theContainerBuilder, problem was with the service aliases. Thepublic property was not correctly initialized because the constructor is bypassed during unserialization.

@carsonbotcarsonbot added this to the7.4 milestoneJun 28, 2025
@santysisisantysisiforce-pushed thefix/lint-container-command branch from5018fdd toe191359CompareJune 28, 2025 21:29
@santysisisantysisi changed the title[Command] fix lint:container command[FrameworkBundle] fixlint:container commandJun 28, 2025
@santysisi
Copy link
ContributorAuthor

status: needs work

@carsonbotcarsonbot changed the title[FrameworkBundle] fixlint:container commandfixlint:container commandJun 28, 2025
@santysisisantysisiforce-pushed thefix/lint-container-command branch frome191359 to0196be5CompareJune 29, 2025 00:30
@santysisi
Copy link
ContributorAuthor

status: needs review

Comment on lines +20 to +27
privatebool$public =false;
privatearray$deprecation = [];

publicfunction__construct(
privatestring$id,
privatebool$public =false,
bool$public =false,
) {
$this->public =$public;
Copy link
ContributorAuthor

@santysisisantysisiJun 29, 2025
edited
Loading

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'] ?? [];}

@santysisisantysisi changed the titlefixlint:container command[FrameworkBundle] fixlint:container commandJun 29, 2025
@santysisi
Copy link
ContributorAuthor

I'll try to add some tests as soon as possible.

@nicolas-grekas
Copy link
Member

Thank you@santysisi.

@nicolas-grekasnicolas-grekas merged commit3448023 intosymfony:7.4Jun 29, 2025
9 of 11 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

[FrameworkBundle] Can't use container:lint command
3 participants
@santysisi@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp