-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[3.2] Fix issues reported by static analyse #21802
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
@@ -38,7 +38,7 @@ public function __construct($namespace = '', $defaultLifetime = 0, $version = nu | |||
CacheItem::validateKey($version); | |||
|
|||
if (!apcu_exists($version.'@'.$namespace)) { | |||
$this->clear($namespace); |
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 The clear
method has no argument; is it a bug?
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.
maybe it was expected to call doClear
directly ?
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.
Updated
$strict = true; | ||
} | ||
|
||
$arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior, $strict); |
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.
Reference
has lost its third argument
51fabbe
to
67e7b5a
Compare
67e7b5a
to
a9ccacc
Compare
Thank you @romainneutron. |
This PR was merged into the 3.2 branch. Discussion ---------- [3.2] Fix issues reported by static analyse | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT Follow-up #21801 Commits ------- a9ccacc [3.2] Fix issues reported by static analyse
β¦ron) This PR was merged into the 3.3-dev branch. Discussion ---------- [master] Fix issues reported by static analyse | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT Follow-up #21802 Commits ------- 671694d [master] Fix issues reported by static analyse
@romainneutron which tool is used to do this analysis? |
@@ -296,7 +296,7 @@ protected function instantiateObject(array &$data, $class, array &$context, \Ref | |||
if (__CLASS__ !== get_class($this)) { | |||
$r = new \ReflectionMethod($this, __FUNCTION__); | |||
if (__CLASS__ !== $r->getDeclaringClass()->getName()) { | |||
@trigger_error(sprintf('Method %s() will have a 6th `$format = null` argument in version 4.0. Not defining it is deprecated since 3.2.', get_class($this), __FUNCTION__), E_USER_DEPRECATED); | |||
@trigger_error(sprintf('Method %s::%s() will have a 6th `$format = null` argument in version 4.0. Not defining it is deprecated since 3.2.', get_class($this), __FUNCTION__), 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.
__METHOD__
could have been used here as well (issue reported by organic analysis ).
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.
@HeahDude organic analysis failure: get_class($this) !== __CLASS__
when $this is a child class of AbstractNormalizer (which it always is in this case ;) )
Follow-up #21801