Releases: mglaman/phpstan-drupal
Releases · mglaman/phpstan-drupal
1.1.20
1.1.19
1.1.18
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
1.1.16
1.1.15
1.1.14
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 ofservices
by @mglaman in #375
Full Changelog: 1.1.13...1.1.14
1.1.13
1.1.12
1.1.11
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
- Optimize BrowserTestBaseDefaultThemeRule by @neclimdul in #323
- BrowserTestBaseDefaultThemeRule namespace check by @mglaman in #319
- Resolve conflicts on root with drupal/core-dev:10.0.x by @mglaman in #324
- Update constants by @mallezie in #332
- Update README.md by @mallezie in #333
- Provide a stub for twig_escape_filter by @neclimdul in #327
- drupal/core:10.0.x requires PHP 8.1 by @mglaman in #345
- Fix HEAD fails on branch alias for build integration jobs by @mglaman in #346
- Add stubs for core field types by @mglaman in #344
New Contributors
- @neclimdul made their first contribution in #323
- @mallezie made their first contribution in #332
Full Changelog: 1.1.10...1.1.11