- Issue created by @mondrake
- 🇺🇸United States smustgrave
So this appears to be doing more then upping the version, so think the summary needs to reflect that. Are we not losing deprecation coverage here? Does the CR need to be updated if we remove.
- 🇮🇹Italy mondrake 🇮🇹
Updated IS. Do not think we are losing anything:
- isset.initializedProperty errors relate to code paths that can never be executed.
- assign.readOnlyProperty error relates to a (rather opinionated) PHPStan rule that expects readonly properties are always only assigned in the constructor (see https://github.com/phpstan/phpstan/issues/6562). In this case with a private method being in the path, I think there's no harm in adjusting the code to ensure that.
- 🇺🇸United States smustgrave
if (!isset($this->fileSystem)) { @trigger_error( 'Calling ' . __METHOD__ . '() without the file_system service already injected is deprecated in drupal:11.2.0 and throws an exception in drupal:12.0.0. See https://www.drupal.org/node/3494040', E_USER_DEPRECATED ); $this->fileSystem = \Drupal::service(FileSystemInterface::class); } if (!isset($this->map)) { @trigger_error( 'Calling ' . __METHOD__ . '() without the MimeTypeMapInterface service already injected is deprecated in drupal:11.2.0 and throws an exception in drupal:12.0.0. See https://www.drupal.org/node/3494040', E_USER_DEPRECATED ); $this->map = \Drupal::service(MimeTypeMapInterface::class); }
mainly referring to this btw.
- 🇮🇹Italy mondrake 🇮🇹
#7 sure - that will never execute because
$this->fileSystem
and$this->map
are always set (see __construct). PHPStan rules the world :) - 🇺🇸United States smustgrave
Going to trust you on that haha
Not sure if the CR needs to be updated to mention? But will see what committers think.
- 🇬🇧United Kingdom longwave UK
Don't think this needs a CR, there are no behaviour changes here, just fixing broken code that PHPStan has newly identified.
Committed 3520cc8 and pushed to 11.x. Thanks!
Onwards to 📌 Update PHPStan to 2.1.13 Active
-
longwave →
committed 3520cc8f on 11.x
Issue #3519602 by mondrake, smustgrave: Bump PHPStan and family to...
-
longwave →
committed 3520cc8f on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.