Skip to content

[DependencyInjection] make dumping inlined configurators to XML possible #13557

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 1 commit into from

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jan 30, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

@xabbuh
Copy link
Member Author

xabbuh commented Mar 16, 2015

If this is considered a new feature, it should be discussed whether or not it can make it into Symfony 2.7. And we could then also think about a similar way for inlining service factories (see #13913).

@fabpot
Copy link
Member

fabpot commented Mar 19, 2015

Looks good to me. Adding something similar for service factories would be event better (can you add this to this PR as well?).

We still have time for including this in 2.7, so let's try to make it happen.

@xabbuh
Copy link
Member Author

xabbuh commented Mar 19, 2015

Thanks for the feedback. I think I can do something like this for the factories here too until the end of the week.

@fabpot
Copy link
Member

fabpot commented Mar 23, 2015

... last week to make it available in 2.7 :)

@xabbuh
Copy link
Member Author

xabbuh commented Mar 23, 2015

@fabpot Can you please merge the 2.6 branch into 2.7? I can then rebase my local changes to ensure that the InlineServiceDefinitionsPass will properly inline both configurators and factories again (probably need to do a new pull request for the right target branch then).

@fabpot
Copy link
Member

fabpot commented Mar 23, 2015

@xabbuh done

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="foo" class="Foo">
<configurator-service>
Copy link
Member

Choose a reason for hiding this comment

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

couldn't it reuse the <configurator> tag instead of using a different one ?

@xabbuh
Copy link
Member Author

xabbuh commented Mar 23, 2015

As @stof pointed out, the implementation was not completely correct and was also a bit too complicated. Also, these changes need to be based on the 2.7 branch to properly put back the inlining of factory services as well as configurator services to the InlineServiceDefinitionsPass. Please see #14030 for the replacing pull request.

@xabbuh xabbuh closed this Mar 23, 2015
@xabbuh xabbuh deleted the inlined-configurators branch March 23, 2015 19:21
fabpot added a commit that referenced this pull request Mar 24, 2015
… services to XML (xabbuh)

This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] make it possible to dump inlined services to XML

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13557
| License       | MIT
| Doc PR        |

Commits
-------

504e338 make it possible to dump inlined services to XML
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.

3 participants