Skip to content

Releases: mglaman/phpstan-drupal

1.1.20

07 Jun 14:33
f9d8493
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.1.19...1.1.20

1.1.19

04 Jun 20:40
b3dac21
Compare
Choose a tag to compare

What's Changed

  • Replace AccessibleReturnTypeExtension with stub for AccessibleInterface by @mglaman in #419
  • Add EntityInterface stub by @mglaman in #425

Full Changelog: 1.1.18...1.1.19

1.1.18

28 May 16:07
28f06af
Compare
Choose a tag to compare

What's Changed

  • Add stubs for ContentEntityInterface and FieldableEntityInterface by @mglaman in #413
  • Remove drupal-phpunit-hack.php by @mglaman in #415
  • Allow \Drupal calls in StreamWrapperInterface by @mglaman in #416
  • Update README.md by @webflo in #405
  • do not use DIRECTORY_SEPARATOR in error messages by @mglaman in #417

New Contributors

Full Changelog: 1.1.17...1.1.18

1.1.17

24 May 19:44
ff4f58b
Compare
Choose a tag to compare

Fixes with #409 allow using PHPStan without the rich node parser.

What's Changed

  • Enable richParserNodeVisitor for tests by @mglaman in #400
  • Explicit allowed class checks for #lazy_builder by @mglaman in #409
  • Fix PHPStan 1.7.0 incompatibilities by @mglaman in #410

Full Changelog: 1.1.16...1.1.17

1.1.16

13 Apr 21:05
2c72ac6
Compare
Choose a tag to compare

What's Changed

  • Entity query count and accessCheck order should not matter by @brambaud in #382
  • Move rules to rules.neon by @mglaman in #389
  • Start using slevomat/coding-standard rules by @mglaman in #390

Full Changelog: 1.1.15...1.1.16

1.1.15

06 Apr 21:05
b934beb
Compare
Choose a tag to compare

What's Changed

  • Report missing explicit access check on entity queries by @brambaud in #378
  • resolveFromStorage does not respect default phpDoc for generic storage interface by @mglaman in #379

Full Changelog: 1.1.14...1.1.15

1.1.14

23 Mar 21:04
479217b
Compare
Choose a tag to compare

What's Changed

  • Move getQuery method return type to own extension by @mglaman in #372
  • Entity storage with type hint prevent inferring entity query execute return type by @brambaud in #355
  • Update PHPUnit config and workflow by @mglaman in #373
  • Register stub files automatically by @mglaman in #374
  • Move Rules to rules out of services by @mglaman in #375

Full Changelog: 1.1.13...1.1.14

1.1.13

11 Mar 02:58
6150d44
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.1.12...1.1.13

1.1.12

23 Feb 22:16
ef7e62d
Compare
Choose a tag to compare

What's Changed

  • Mark \Drupal::VERSION as a dynamic constant by @mglaman in #349
  • FIXUP: Perform \Drupal::VERSION check for deprecated constants by @mglaman in #350
  • Rule for ConditionManager::createInstance() when 'context' is passed as array key by @mglaman in #351

Full Changelog: 1.1.11...1.1.12

1.1.11

18 Feb 21:34
57b5b16
Compare
Choose a tag to compare

Entity field analysis improvements

Field types provided by Drupal core have been stubbed to provide @property annotations. If you have a field value and it has been type hinted, PHPStan will not complain about accessing a non-existent property.

Example:

// EntityReferenceItem.
$entity_reference_field = $node->get('field_entity_reference')->first();
assert($entity_reference_field instanceof EntityReferenceItem);
assertType(EntityReferenceItem::class, $entity_reference_field);
assertType('int|string', $entity_reference_field->target_id);
assertType('Drupal\Core\Entity\EntityInterface', $entity_reference_field->entity);

Updated deprecated global constants

Drupal 9.3.x and 9.4.x deprecated more global constants. The rule to check for these has been updated.

What's Changed

New Contributors

Full Changelog: 1.1.10...1.1.11