Skip to content

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

Merged
merged 1 commit into from
Oct 1, 2016

Conversation

fabpot
Copy link
Member

@fabpot 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

@@ -231,6 +231,7 @@ public function testRuntimeLoader()

$loader = $container->getDefinition('twig.runtime_loader');
$args = $loader->getArgument(1);
print_r($loader->getArguments());
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

oops

throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as it can be lazy-loaded.', $id));
}

$validators[$definition->getClass()] = $id;
Copy link
Member

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 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

see #20116

@fabpot fabpot merged commit 82fa942 into symfony:master Oct 1, 2016
fabpot added a commit that referenced this pull request Oct 1, 2016
…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
@fabpot fabpot deleted the public-services branch October 24, 2016 21:39
@fabpot fabpot mentioned this pull request Oct 27, 2016
}

if ($def->isAbstract()) {
throw new InvalidArgumentException(sprintf('The service "%s" must not be abstract as it can be lazy-loaded.', $id));
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants