Skip to content

Releases: mglaman/phpstan-drupal

2.0.15

24 Apr 13:50
b61426d

Choose a tag to compare

2.1.0 is coming soon, which will enable some rules that are currently disabled by default. The rules can still be turned off. If you're worried about disruptions, change your Composer constraint to ~2.0.14 to avoid minor version bumps.

What's Changed

  • Fix hook_entity_operation cacheability parameter should not be nullable by @mglaman in #985
  • Fix false positive in entityStoragePropertyAssignment rule when assigning null by @mglaman in #986
  • Fix ContainerInterface::has() returning always-true for known services by @mglaman in #987
  • Fix wrongly deprecated method RevisionableStorageInterface::loadRevision by @TheFakeCake in #980

New Contributors

Full Changelog: 2.0.14...2.0.15

2.0.14

22 Apr 21:11
a2ef88b

Choose a tag to compare

2.1.0 is coming soon, which will enable some rules that are currently disabled by default. The rules can still be turned off. If you're worried about disruptions, change your Composer constraint to ~2.0.14 to avoid minor version bumps.

What's Changed

  • Fix multisite extension discovery by scanning all sites/*/ directories by @dpagini in #956
  • Add stubs for daterange field type by @ceesgeene in #786
  • Infer return type from class-string in ClassResolver extensions by @mglaman in #965
  • Fix inverted isCount cache key logic in EntityQueryType by @mglaman in #966
  • Add LoggerFromFactoryPropertyAssignmentRule by @mglaman in #968
  • Add EntityStorageDirectInjectionRule by @mglaman in #969
  • Document opt-in rules and bleedingEdge parameters by @mglaman in #970
  • Add entity-type-id custom PHPDoc type by @mglaman in #972
  • Allow \Drupal usage check on render elements by @mglaman in #973
  • Fix InspectorTypeExtension compatibility with PHPStan 2.1.47 mixed~null type by @mglaman in #976
  • Move phpstan_fixtures test data to tests/src/Rules/data by @mglaman in #974
  • Add rule to detect Symfony\Component\Yaml\Yaml::parse() usage by @mglaman in #978
  • Add rules to detect missing CacheableMetadata parameter in entity operation methods and hooks by @mglaman in #979

New Contributors

Full Changelog: 2.0.13...2.0.14

2.0.13

07 Apr 19:34
1b7b283

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.0.12...2.0.13

2.0.12

20 Mar 20:11
a574f84

Choose a tag to compare

What's Changed

  • Make FieldItemListPropertyReflection entity property nullable by @Niklan in #950
  • Fix method.alreadyNarrowedType from all QueryInterface::accessCheck()s (#825) by @travis-bradbury in #951
  • Use container to resolve PHPStan built-in rules in tests by @mglaman in #954
  • Add TodoCommentWithIssueUrlRule to flag @todo comments referencing the current issue by @mglaman in #953

New Contributors

Full Changelog: 2.0.11...2.0.12

2.0.11

25 Feb 17:54
4e1caa0

Choose a tag to compare

What's Changed

  • Entity count query use non-negative-int for execute return type by @mglaman in #919
  • Add drupal/core-composer-scaffold to allow-plugins by @mglaman in #931
  • Bump actions/cache from 4 to 5 by @dependabot[bot] in #928
  • Bump actions/checkout from 5 to 6 by @dependabot[bot] in #925
  • Bump bluehorndigital/setup-drupal from 1.1.0 to 1.2.0 by @dependabot[bot] in #934
  • Allow Symfony 8. by @longwave in #933
  • Add check for isPropertyHook method in IgnoreDeprecationsScope by @mondrake in #935
  • Setup for Claude Code by @mglaman in #936
  • Remove FilterProcessResult test case from RenderCallbackRuleTest by @mglaman in #940
  • Remove RevisionableStorageInterfaceStubTest by @mglaman in #942
  • Replace ~11.0.0 and ~11.1.0 with ~11.2.0 and ~11.3.0 in CI matrix by @mglaman in #943

Full Changelog: 2.0.10...2.0.11

2.0.10

22 Oct 17:54
2574aac

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.0.9...2.0.10

2.0.9

05 Aug 14:22
fed292e

Choose a tag to compare

What's Changed

  • 🐛 Narrow only by existing return types by @dpi in #903
  • Migrate PHPUnit configuration across PHPUnit major versions by @dpi in #907
  • IDs can be strings, RevisionableStorageInterface::deleteRevision should accept string ids by @dpi in #904
  • ✨ Narrow return value of getLinkTemplate by whether hasLinkTemplate was called beforehand by @dpi in #906
  • ✨ Narrow return value of getKey by whether hasKey was called beforehand by @dpi in #905

Full Changelog: 2.0.8...2.0.9

2.0.8

04 Aug 20:26
0328209

Choose a tag to compare

What's Changed

  • Add RevisionableStorageInterface::createRevision generic for return type by @dpi in #894
  • Url::access return type changes depending on a parameter by @dpi in #896
  • IDs can be strings, RevisionableStorageInterface::loadRevision should accept string ids by @dpi in #895
  • Fix badly formatted doc for Url::access and add tests by @dpi in #898
  • Allow installers v2 so we can get rid of PHP 8.4 errors by @dpi in #899
  • Narrow return value of EntityInterface->id() by previous calls to isNew on an instance of EntityInterface by @dpi in #900
  • Fix implicit nullable parameter on PHP 8.4 by @dpi in #897

Full Changelog: 2.0.7...2.0.8

2.0.7

22 May 18:06
42cca54

Choose a tag to compare

What's Changed

  • Overridden EntityReferenceFieldItemListInterface::referencedEntities generics error by @mglaman in #881
  • Improve the InspectorTypeExtension and its tests by @Niklan in #871
  • Stub EntityTypeManagerInterface::getDefinition for conditional null return by @mglaman in #883
  • Allow disabling return type and stub extensions by @mglaman in #884

Full Changelog: 2.0.6...2.0.7

1.3.9

22 May 16:49
973a4e8

Choose a tag to compare

What's Changed

  • Overridden EntityReferenceFieldItemListInterface::referencedEntities generics error by @mglaman in #879

Full Changelog: 1.3.8...1.3.9