-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Lock] Make SemaphoreStore::isSupported() internal #24057
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
@@ -33,6 +33,10 @@ class SemaphoreStore implements StoreInterface | |||
*/ | |||
public static function isSupported($blocking = null) | |||
{ | |||
if (null !== $blocking) { | |||
@trigger_error(sprintf('The "$blocking" argument of the "%s" is deprecated since 3.4 and will be removed in 4.0.', __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.
Internal call should not trigger deprecation (this argument is used by component console)
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.
But how know if call is internal or not?
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.
By passing false
as second (extra, implicit) argument in each internal call, then triggering only if 1 === func_num_args() || func_get_arg(1)
. But wait, @jderusse do we really need to expose this argument in 3.4? Would it be enough to not add it and consider it exists only for internal calls?
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.
let's make it final and move on :)
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.
@nicolas-grekas doesn't #24053 (comment) still apply when calling the method (no inheritance)?
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.
nothing will break, so we don't care
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.
ok then :)
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.
I would just mark this method as @internal
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.
@internal
used.
@@ -5,3 +5,4 @@ CHANGELOG | |||
----- | |||
|
|||
* added the component | |||
* deprecated the `$blocking` argument of the `SemaphoreStore::isSupported()` method |
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.
Thé component is not released yet. Does it make sense to deprecate things here?
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.
It's usefull to see deprecations linked to 3.4 here I think, else no textual informations is written elsewhere.
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.
Lock was not part of 3.3, so there is nothing to deprecate.
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.
Ok, line removed.
Thank you @maidmaid. |
…maid) This PR was merged into the 3.4 branch. Discussion ---------- [Lock] Make SemaphoreStore::isSupported() internal | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24053 (comment) | License | MIT | Doc PR | / Commits ------- 86f2f25 Mark SemaphoreStore::isSupported() as internal
Uh oh!
There was an error while loading. Please reload this page.