Releases: mglaman/phpstan-drupal
Releases · mglaman/phpstan-drupal
1.1.0
Backwards compatibility warning
1.1.0 has introduced a breaking change in the configuration schema. See below for more information.
What's Changed
- Test drupal container related type inference by @brambaud in #227
- BrowserTestBaseDefaultThemeRule false positives with UpdatePathTests by @mglaman in #235
- Update branch alias in composer.json by @jibran in #236
- Test EntityInterface return type by @brambaud in #237
- Allow magic methods for variables of type FieldItemListInterface by @eiriksm in #244
- Support entity query execute dynamic return type whether it is a count query or not by @brambaud in #241
- Support entity class return type extension from entity storage methods by @brambaud in #239
- EntityDataRepository for entity type data by @mglaman in #250
- Use entity storage class inferred from entity type by @mglaman in #251
Full Changelog: 1.0.3...1.1.0
Configuration changes
The drupal.entityTypeStorageMapping
allowed specifying what storage classes were used for different entity types. With #239, support was added to specify what entity class an entity type uses. With #250 the way entity type information is configured has been changed.
Previously:
parameters:
drupal:
entityTypeStorageMapping:
node: Drupal\node\NodeStorage
taxonomy_term: Drupal\taxonomy\TermStorage
user: Drupal\user\UserStorage
Now there is an entityMapping
property so that we can handle future enhancements with entity type static analysis.
parameters:
drupal:
entityMapping:
node:
class: Drupal\node\Entity\Node
storage: Drupal\node\NodeStorage
taxonomy_term:
class: Drupal\taxonomy\Entity\Term
storage: Drupal\taxonomy\TermStorage
user:
class: Drupal\user\Entity\User
storage: Drupal\user\UserStorage
block:
class: Drupal\block\Entity\Block
1.0.3
1.0.2
1.0.1
1.0.0
0.12.15
0.12.14
0.12.13
0.12.12
0.12.11
This patch release adds new rules to help catch deprecations from Drupal 8 to Drupal 9 in context-aware plugins and config entities. See https://www.drupal.org/project/upgrade_status/issues/3161052
🥳 Features: