-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DI] Turn private defs to non-public ones before removing passes #24468
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
Conversation
@@ -69,6 +69,8 @@ public function __construct() | |||
new CheckCircularReferencesPass(), | |||
new CheckReferenceValidityPass(), | |||
new CheckArgumentsValidityPass(false), | |||
), -100 => array( |
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.
Should be moved before removing
74e0ba2
to
ca8b0ba
Compare
ca8b0ba
to
e5d0934
Compare
PR ready |
@@ -71,6 +71,12 @@ public function __construct() | |||
new CheckArgumentsValidityPass(false), | |||
)); | |||
|
|||
$this->beforeRemovingPasses = array( | |||
-100 => array( | |||
new ResolvePrivatesPass(), |
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.
This could even be the first removing pass instead.
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.
which one is better? semantically, this is not a removing pass.
Is there any technical reason that would help decide?
otherwise, I think we should leave as is, isn't it?
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.
Well, "optimization" passes are not really about optimizing either 😄
Thank you @nicolas-grekas. |
…passes (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- [DI] Turn private defs to non-public ones before removing passes | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24465 | License | MIT | Doc PR | - As spotted by @stof in #24465 (comment). Commits ------- e5d0934 [DI] Turn private defs to non-public ones before removing passes
As spotted by @stof in #24465 (comment).