-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
added checks for public services on compiler passes that use service ids and not references #20112
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
fabpot
commented
Sep 30, 2016
Q | A |
---|---|
Branch? | master |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | n/a |
License | MIT |
Doc PR | n/a |
a3c766a
to
0f0fa52
Compare
@@ -231,6 +231,7 @@ public function testRuntimeLoader() | |||
|
|||
$loader = $container->getDefinition('twig.runtime_loader'); | |||
$args = $loader->getArgument(1); | |||
print_r($loader->getArguments()); |
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 looks like a debug leftover
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.
oops
0f0fa52
to
4166a07
Compare
throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as it can be lazy-loaded.', $id)); | ||
} | ||
|
||
$validators[$definition->getClass()] = $id; |
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.
shouldn't this be done in older branches ?
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.
see #20116
…id and not references
4166a07
to
82fa942
Compare
…se service ids and not references (fabpot) This PR was merged into the 3.2-dev branch. Discussion ---------- added checks for public services on compiler passes that use service ids and not references | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 82fa942 added checks for public services on compiler passes that use service id and not references
} | ||
|
||
if ($def->isAbstract()) { | ||
throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as it can be lazy-loaded.', $id)); |
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.
The message here is not very accurate. An abstract service is not "get() able". It's not about lazy-loading.