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

Fix wrong place of parent constructor call#9863

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

Closed
Nek- wants to merge1 commit intosymfony:4.1fromNek-:patch-3

Conversation

@Nek-
Copy link
Contributor

@Nek-Nek- commentedJun 1, 2018

Calling parent constructor after doing stuff in the overrided constructor is a bad habit. The documentation should encourage good practices.

Calling parent constructor after doing stuff in the overridedconstructor is a bad habit.
Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I agree this is a better practice. Thanks!

@yceruto
Copy link
Member

yceruto commentedJun 1, 2018
edited
Loading

In general Yes! but I guess it was on purpose for this case, becauseconsole commands call toconfigure() method at the end of the constructor, so any argument used there, is already setted, avoiding issues like thissymfony/symfony#27224

@Nek-
Copy link
ContributorAuthor

Nek- commentedJun 5, 2018

configure method should not use the given parameters to the constructor. So I guess my change is still relevant.

@javiereguiluz
Copy link
Member

I've reviewed the information and the PR linked by Yonel and I think we must explain this better in the docs. That's why I'm closing this PR in favor of#9969.

@Nek- thanks for reporting this problem and helping us improve Symfony!

javiereguiluz added a commit that referenced this pull requestJun 27, 2018
…igure (javiereguiluz)This PR was merged into the 3.4 branch.Discussion----------Explained some issues about command constructors and configureThisfixes#9863 differently.Commits-------27beba5 Explained some issues about command constructors and configure
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

2.8

Development

Successfully merging this pull request may close these issues.

4 participants

@Nek-@yceruto@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp