2.1.0 #1006
mglaman
announced in
Announcements
2.1.0
#1006
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
phpstan-drupal 2.1.0 graduates a set of opt-in rules and bleeding-edge behavior to the defaults. Expect new reported errors after upgrading — each change below includes the configuration to restore the old behavior.
Upgrading from 2.0
Nine rules are now enabled by default
testClassSuffixNameRule,dependencySerializationTraitPropertyRule,accessResultConditionRule,cacheableDependencyRule,hookFormAlterRule,loggerFromFactoryPropertyAssignmentRule,entityStorageDirectInjectionRule,symfonyYamlParseRule, andentityOperationsCacheabilityRuleno longer require opt-in. Disable any of them individually:See the README for what each rule reports.
hookRulesrenamed tohookFormAlterRuleIf your configuration referenced
hookRules, rename the key. The old name is no longer recognized.ContainerInterface::has()returnsboolfor known servicescontainerHasAlwaysTruenow defaults tofalse, so conditional service guards are no longer reported as always-true. This graduated frombleedingEdge.neon. Restore the old inference:loadInclude()checks now apply to concreteModuleHandlerreceiversAn inverted type check made the
LoadIncludesrule silently skip receivers typed as the concreteModuleHandlerclass and fire on plainobject/mixedreceivers. Both directions are fixed, which may surface newloadIncludes.*errors in code that was previously skipped. Thanks @donquixote!New
Opt out of class resolver return type narrowing
getInstanceFromDefinition()narrows to the passed class name, but the container can substitute a different class at runtime. SetclassResolverReturnType: falseto fall back to the declaredobjectreturn type and keepinstanceofassertions meaningful:drupal-finder constraint widened
The
webflo/drupal-finderconstraint is now^1.3.1 || ^2.0, so projects pick up drupal-finder 2.0 as soon as it releases. Nothing changes today — 1.3.1 remains the latest published version.What's Changed
New Contributors
Full Changelog: 2.0.17...2.1.0
This discussion was created from the release 2.1.0.
Beta Was this translation helpful? Give feedback.
All reactions