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

[Console] Move AddConsoleCommandPass from FrameworkBundle to Console.#19443

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

Merged
fabpot merged 1 commit intosymfony:masterfrombcremer:move-AddConsoleCommandPass
Jan 11, 2017

Conversation

@bcremer
Copy link
Contributor

@bcremerbcremer commentedJul 27, 2016
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?yes
Deprecations?yes
Tests pass?yes
Fixed tickets#19440
LicenseMIT
Doc PR-

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch fromc2deecc todffd5e6CompareJuly 27, 2016 09:45
@mcfedr
Copy link
Contributor

Maybe worth merging (or reviewing)#19305 first so that it doesnt conflict.

"symfony/class-loader":"~3.2",
"symfony/dependency-injection":"~3.2",
"symfony/config":"~2.8|~3.0",
"symfony/console":"~3.2",
Copy link
Member

Choose a reason for hiding this comment

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

This can be removed. Because of the class_exists call, if the installed component is an older version or isn't installed it will still work. Maybe should you add a another test to not load the deprecated pass if the component is not installed at all (to prevent throwing an illegitimate deprecation warning).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Removed the dependency.

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch fromb6f8cc5 to94a19f3CompareJuly 28, 2016 05:51
{
publicfunction__construct()
{
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass instead.',__CLASS__),E_USER_DEPRECATED);

Choose a reason for hiding this comment

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

this should be jus below the namespace declaration, see other places in the code base

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Good point, changed.

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch from94a19f3 to1094537CompareJuly 28, 2016 07:28

namespaceSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;

@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass instead.',__CLASS__),E_USER_DEPRECATED);

Choose a reason for hiding this comment

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

AddConsoleCommandPass::class instead of__CLASS__ (which is undefined)

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch from1094537 to17385a7CompareJuly 28, 2016 08:04
"psr/log":"~1.0"
},
"suggest": {
"symfony/dependency-injection":"",
Copy link
Member

Choose a reason for hiding this comment

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

I would remove this suggestion. The DI component does not allow to add more features to the Console component.

The compiler pass is useful only for people already using the component. So the suggestion is just useless noise.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense; changed.

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch from17385a7 to6e57865CompareJuly 28, 2016 12:33
@bcremerbcremer changed the titleMove AddConsoleCommandPass from FrameworkBundle to Console.[Console] Move AddConsoleCommandPass from FrameworkBundle to Console.Jul 29, 2016
@fabpot
Copy link
Member

Tests do not pass because of the deprecation.

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch from6e57865 todb03053CompareSeptember 15, 2016 05:22
@bcremer
Copy link
ContributorAuthor

Tests are now all fixed.


* The`Controller::getUser()` method has been deprecated and will be removed in
Symfony 4.0; typehint the security user object in the action instead.
* The`Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been deprecated. Use`Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead.
Copy link
Member

Choose a reason for hiding this comment

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

Please also add this to theUPGRADE-4.0.md (but reword it to "removed" there).

$container->compile();
}

publicfunctiontestHttpKernelRegisterCommandsIngoreCommandAsAService()
Copy link
Member

Choose a reason for hiding this comment

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

This whole test case looks a bit suspicious to me. We don't have anything HttpKernel specific here, do we?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The test was copied 1 to 1 from the original location
\Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\AddConsoleCommandPassTest::testHttpKernelRegisterCommandsIngoreCommandAsAService.

Any suggestions how to name the testcase instead?

Copy link
Member

Choose a reason for hiding this comment

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

Imo this test case should have never lived here. It actually does not test test compiler pass, but the bundle class from the HttpKernel component and therefore should live there.

Copy link
Member

Choose a reason for hiding this comment

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

*
* @deprecated since version 3.2, to be removed in 4.0. Use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass instead.
*/
class AddConsoleCommandPassimplements CompilerPassInterface
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to let this class extend the new compiler pass instead of having to maintain the same code twice?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This would introduce a new dependencysymfony/console tosymfony/framework-bundle that is not yet defined in composer.json.

Should the new dependency be added to composer.json or can should this fail during runtime?

Copy link
Member

Choose a reason for hiding this comment

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

We could add a conflict rule for versions of the Console component before 3.2.

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch from014c9eb tocf946c9CompareOctober 17, 2016 12:39

namespaceSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;

@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass instead.', AddConsoleCommandPass::class),E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

[...] deprecated since version 3.2 [...]

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch fromcf946c9 toe7f2763CompareOctober 21, 2016 08:31
@xabbuh
Copy link
Member

👍 (failure is unrelated)

Status: Reviewed

@ro0NL
Copy link
Contributor

Should we make some hardcoded id's / strings configurable thru required constructor args, as done in#20250? See discussion:#20250 (comment)

fabpot added a commit that referenced this pull requestOct 22, 2016
…l component (xabbuh)This PR was merged into the 2.7 branch.Discussion----------[FrameworkBundle][HttpKernel] move test to the HttpKernel component| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#19443 (comment)| License       | MIT| Doc PR        |The moved test case does not test the `AddConsoleCommandPass` class, but ensures certain behavior in the `registerCommands()` method of the `Bundle` class from the HttpKernel component.Commits-------c9ca322 move test to the HttpKernel component
@javiereguiluzjaviereguiluz added this to the3.3 milestoneNov 7, 2016
@bcremer
Copy link
ContributorAuthor

Is there still anything I can help to get this merged into 3.3?

Haehnchen reacted with thumbs up emoji

@xabbuh
Copy link
Member

@bcremer You rebase this once again to resolve conflicts, but otherwise this looks ready to me.

ping @symfony/deciders

* The`Resources/public/images/*` files have been removed.
* The`Resources/public/css/*.css` files have been removed (they are now inlined
in TwigBundle).
* The`Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been deprecated. Use`Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead.
Copy link
Member

Choose a reason for hiding this comment

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

Ah sorry, now that Symfony 3.2 is released we would need to move this to theUPGRADE-3.2md file and update deprecation messages accordingly.

@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch frome7f2763 to4928c24CompareJanuary 11, 2017 12:04
@bcremerbcremerforce-pushed themove-AddConsoleCommandPass branch from4928c24 to7743989CompareJanuary 11, 2017 12:05
@bcremer
Copy link
ContributorAuthor

bcremer commentedJan 11, 2017
edited
Loading

@xabbuh Rebased ontomaster and targeted to Symfony 3.3.

@fabpot
Copy link
Member

Thank you@bcremer.

@fabpotfabpot merged commit7743989 intosymfony:masterJan 11, 2017
fabpot added a commit that referenced this pull requestJan 11, 2017
…dle to Console. (bcremer)This PR was merged into the 3.3-dev branch.Discussion----------[Console] Move AddConsoleCommandPass from FrameworkBundle to Console.| Q | A || --- | --- || Branch? | master || Bug fix? | no || New feature? | yes || BC breaks? | yes || Deprecations? | yes || Tests pass? | yes || Fixed tickets |#19440 || License | MIT || Doc PR | - |Commits-------7743989 Move AddConsoleCommandPass from FrameworkBundle to Console.
@bcremerbcremer deleted the move-AddConsoleCommandPass branchJanuary 12, 2017 06:26
fabpot added a commit that referenced this pull requestJan 12, 2017
…ent isn't installed (dunglas)This PR was merged into the 3.3-dev branch.Discussion----------[FrameworkBundle] Prevent an error when the console component isn't installed| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#21246| License       | MIT| Doc PR        |n/aFinish#19443. Alternative to#21246.Commits-------ab133ca [FrameworkBundle] Prevent an error when the console component isn't installed
fabpot added a commit that referenced this pull requestFeb 16, 2017
…onent (chalasr)This PR was merged into the 3.3-dev branch.Discussion----------[Form][FrameworkBundle] Move FormPass to the Form component| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aSo that anyone using only Form and DI can use it for registering form types/type guessers.Follows#19443, related to#21284Commits-------e68a6d9 [FrameworkBundle][Form] Move FormPass to the Form component
@nicolas-grekasnicolas-grekas modified the milestones:3.x,3.3Mar 24, 2017
@fabpotfabpot mentioned this pull requestMay 1, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh left review comments

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

10 participants

@bcremer@mcfedr@fabpot@xabbuh@ro0NL@dunglas@nicolas-grekas@stof@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp