Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DI] Deprecate dumping an uncompiled container#20634

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
ro0NL wants to merge2 commits intosymfony:masterfromro0NL:patch-2
Closed

[DI] Deprecate dumping an uncompiled container#20634

ro0NL wants to merge2 commits intosymfony:masterfromro0NL:patch-2

Conversation

@ro0NL
Copy link
Contributor

@ro0NLro0NL commentedNov 25, 2016
edited
Loading

QA
Branch?"master"
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets#19673 (comment)
LicenseMIT
Doc PRreference to the documentation PR, if any

It makes the PHP dumper less complex. Compiled container goes in, compiled container goes out.

Relates to#19673

@fabpot
Copy link
Member

Why? Dumping a container to YAML or XML is perfectly valid for a non-compiled container. How is that a bug fix?

@nicolas-grekas
Copy link
Member

This is not a bug fix for sure.
Without compiler passes applied, the container is really in some intermediary "bootstrapping" state. For XML & Yaml, we don't care. But for the PhpDumper?
Anyway, I've no strong opinion on this, I'm just explaining the reasoning I had :-)

@ro0NL
Copy link
ContributorAuthor

ro0NL commentedNov 26, 2016
edited
Loading

Updated. I think indeed it make no sense for YAML, etc.

Also no strong opinion on this (as compared to#19673) however it would simplify the PHP Dumper in 4.0 a lot.

Also tests are unclear about this, some callcompile beforehand others dont.

@nicolas-grekas
Copy link
Member

it would simplify the PHP Dumper in 4.0 a lot.

I forgot to mention this argument and it was really the beginning of the idea: PhpDumper is already complex enough, there is no need to have all these!isFrozen code paths in the code. Thus I'm 👍 (when tests will be green of course).

@ro0NL
Copy link
ContributorAuthor

ro0NL commentedNov 26, 2016
edited
Loading

There are some bottlenecks.. which im not sure how to solve;

Dumping an uncompiled ContainerBuilder is deprecated since version 3.3 and will not be supported anymore in 4.0. Compile the container beforehand: 7x    2x in PhpDumperTest::testAddService from Symfony\Component\DependencyInjection\Tests\Dumper    2x in PhpDumperTest::testDump from Symfony\Component\DependencyInjection\Tests\Dumper    1x in PhpDumperTest::testDumpAutowireData from Symfony\Component\DependencyInjection\Tests\Dumper    1x in PhpDumperTest::testAddParameters from Symfony\Component\DependencyInjection\Tests\Dumper    1x in PhpDumperTest::testServicesWithAnonymousFactories from Symfony\Component\DependencyInjection\Tests\Dumper

Basically all service fixtures (Fixtures/php/) must be revised to compiled containers. ie.testAddService tests both variants rather explicitly (services9.php vsservices9_compiled.php).

We need to separate these tests for legacy and add aservices[0-9]_compiled.php variant for each one. Right?

Im still 👍 for deprecating this feature though.

PhpDumper is already complex enough, there is no need to have all these !isFrozen code paths in the code

Agree, this makes it a real burden to maintain.

@nicolas-grekasnicolas-grekas added this to the3.x milestoneDec 6, 2016
@fabpot
Copy link
Member

👍 for doing this on PhpDumper only.

@ro0NL
Copy link
ContributorAuthor

Looks like tests are passing :)

@fabpot
Copy link
Member

Thank you@ro0NL.

@ro0NLro0NL deleted the patch-2 branchDecember 19, 2016 08:49
fabpot added a commit that referenced this pull requestDec 19, 2016
…guiluz)This PR was merged into the 3.3-dev branch.Discussion----------[DI] update changelog and upgrade files| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#20634| License       | MIT| Doc PR        |Commits-------ad7afe0 Added a needed blank lined2b4996 [DI] update changelog and upgrade files
@nicolas-grekasnicolas-grekas modified the milestones:3.x,3.3Mar 24, 2017
@fabpotfabpot mentioned this pull requestMay 1, 2017
nicolas-grekas added a commit that referenced this pull requestMay 22, 2017
… (ro0NL)This PR was merged into the 4.0-dev branch.Discussion----------[DI] Remove deprecated dumping an uncompiled container| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | yes| Deprecations? | no| Tests pass?   | should be| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->See#20634Commits-------c1c525c [DI] Remove deprecated dumping an uncompiled container
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

5 participants

@ro0NL@fabpot@nicolas-grekas@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp