Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixing problem where _defaults set to null was seen as a service #22564

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

Closed
wants to merge 3 commits into from

Conversation

weaverryan
Copy link
Member

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
services:
    _defaults:

If you leave _defaults empty (i.e. null), you got a bad error before. Now it's better :)

Before:

The definition for "_defaults" has no class. If you intend to inject this service dynamicall
y at runtime, please mark it as synthetic=true. If this is an abstract definition solely use
d by child definitions, please add abstract=true, otherwise specify a class to get rid of th
is error.

After:

Service "_defaults" key must be an array, "NULL" given in "/path/to/services.yml"

@stof
Copy link
Member

stof commented Apr 28, 2017

@weaverryan can you add a test ?

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone Apr 28, 2017
@weaverryan
Copy link
Member Author

You're right. Done!

@nicolas-grekas
Copy link
Member

looks like _instanceof has the same issue

@weaverryan
Copy link
Member Author

Done again! We're on FIRE!!!!!!!

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

👍

@stof
Copy link
Member

stof commented Apr 29, 2017

Thank you @weaverryan.

@stof stof closed this in ceabf11 Apr 29, 2017
@weaverryan weaverryan deleted the defaults_empty branch April 29, 2017 12:45
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