-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Conversation
@@ -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); |
There was a problem hiding this comment.
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.
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first instead of 1st
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
33154bf
to
4659975
Compare
Thank you @chalasr. |
…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
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