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

Appearance settings

Fix deprecations regarding core commands registered as services #24074

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
Sep 3, 2017

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Sep 3, 2017

Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #23624 (comment)
License MIT
Doc PR n/a

Current deprecation messages can be confusing (see fixed ticket), this improves them and adds a bunch of missing CHANGELOG/UPGRADE entries on the same topic

@@ -45,7 +45,7 @@ class CacheClearCommand extends ContainerAwareCommand
public function __construct($cacheClearer = null, Filesystem $filesystem = null)
{
if (!$cacheClearer instanceof CacheClearerInterface) {
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
Copy link
Member Author

@chalasr chalasr Sep 3, 2017

Choose a reason for hiding this comment

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

The If the command was registered by convention, make it a service instead hint is not useful here as we deprecated convention based registration meanwhile, which gives the very same hint if you use it.

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Sep 3, 2017
@@ -45,7 +45,7 @@ class AssetsInstallCommand extends ContainerAwareCommand
public function __construct($filesystem = null)
{
if (!$filesystem instanceof Filesystem) {
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('%s() expects an instance of "%s" as 1st argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, Filesystem::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.

first instead of 1st

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@fabpot
Copy link
Member

fabpot commented Sep 3, 2017

Thank you @chalasr.

@fabpot fabpot merged commit 4659975 into symfony:3.4 Sep 3, 2017
fabpot added a commit that referenced this pull request Sep 3, 2017
…ervices (chalasr)

This PR was merged into the 3.4 branch.

Discussion
----------

Fix deprecations regarding core commands registered as services

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23624 (comment)
| License       | MIT
| Doc PR        | n/a

Current deprecation messages can be confusing (see fixed ticket), this improves them and adds a bunch of missing CHANGELOG/UPGRADE entries on the same topic

Commits
-------

4659975 Fix deprecations regarding core commands registered as services
@chalasr chalasr deleted the fix-deprecations branch September 3, 2017 15:44
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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.