phpstan-drupal

Extension for PHPStan to allow analysis of Drupal code.

MIT License

Downloads
17.5M
Stars
181
Committers
56

Bot releases are hidden (Show)

phpstan-drupal - 1.1.28

Published by mglaman over 1 year ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.27...1.1.28

phpstan-drupal - 1.1.27

Published by mglaman over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.26...1.1.27

phpstan-drupal - 1.1.26

Published by mglaman almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.25...1.1.26

phpstan-drupal - 1.1.25

Published by mglaman over 2 years ago

Quick patch release following up on the RequestStack forward compatibility shim work in https://github.com/mglaman/phpstan-drupal/pull/446. This reduces the noise by only reporting an error when using the method deprecated in Symfony 5 and removed in Symfony 6.

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.24...1.1.25

phpstan-drupal - 1.1.24

Published by mglaman over 2 years ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.23...1.1.24

phpstan-drupal - 1.1.23

Published by mglaman over 2 years ago

Includes a hotfix for 1.1.22 to fix SymfonyCmfRoutingInClassMethodSignatureRule

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.22...1.1.23

phpstan-drupal - 1.1.22

Published by mglaman over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.21...1.1.22

phpstan-drupal - 1.1.21

Published by mglaman over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.20...1.1.21

phpstan-drupal - 1.1.20

Published by mglaman over 2 years ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.19...1.1.20

phpstan-drupal - 1.1.19

Published by mglaman over 2 years ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.18...1.1.19

phpstan-drupal - 1.1.18

Published by mglaman over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.17...1.1.18

phpstan-drupal - 1.1.17

Published by mglaman over 2 years ago

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

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.16...1.1.17

phpstan-drupal - 1.1.16

Published by mglaman over 2 years ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.15...1.1.16

phpstan-drupal - 1.1.15

Published by mglaman over 2 years ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.14...1.1.15

phpstan-drupal - 1.1.14

Published by mglaman over 2 years ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.13...1.1.14

phpstan-drupal - 1.1.13

Published by mglaman over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.12...1.1.13

phpstan-drupal - 1.1.12

Published by mglaman over 2 years ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.11...1.1.12

phpstan-drupal - 1.1.11

Published by mglaman over 2 years ago

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: https://github.com/mglaman/phpstan-drupal/compare/1.1.10...1.1.11

phpstan-drupal - 1.1.10

Published by mglaman over 2 years ago

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.9...1.1.10

phpstan-drupal - 1.1.9

Published by mglaman almost 3 years ago

This relaxes the constraints so that phpstan-drupal can be installed on the Drupal 10.0.x branch.

What's Changed

Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.8...1.1.9