Releases: mglaman/phpstan-drupal
1.1.4
What's Changed
- Add phpstan prophecy suggestion by @ptt-homme in #282
- Add phpstan/phpstan-phpunit to the suggested packages list by @ptt-homme in #283
- Add documentation for contrib entity mapping by @mglaman in #285
- Add tips to the extends internal class rule errors by @mglaman in #286
- Add return type extensions for AccessResult methods by @mglaman in #287
Full Changelog: 1.1.3...1.1.4
1.1.3
What's Changed
- Expand list of entity type storages by @ptt-homme in #277
- Allow ::referencedEntities on field items by @eiriksm in #265
New Contributors
- @ptt-homme made their first contribution in #277
Full Changelog: 1.1.2...1.1.3
1.1.2
Highlights
With #264 we have added the ability to look up discovered extensions, which should greatly improve the rules which load files called by module_load_include
and ModuleHandlerInterface::loadInclude
. Previously these two rules had to re-scan for extensions whenever the function or method was analyzed.
What's Changed
- Fail to map a service with a parent which overrides its parent too by @brambaud in #260
- Detect when a class extends a class that has been flagged as
@internal
by @brambaud in #248 - issue #142: resolve incorrect $reflection definition by @eugene-brit in #178
- Add 10.0.x to tests by @mglaman in #269
- Make the discovered Drupal extensions accessible via a service by @brambaud in #264
- Respect
@property
annotations on Entity classes by @jacktonkin in #268
New Contributors
- @eugene-brit made their first contribution in #178
- @jacktonkin made their first contribution in #268
Full Changelog: 1.1.1...1.1.2
1.1.1
Major fix for sites without drupal/core-dev
This release includes fixes for Class PHPUnit\Framework\TestCase not found.
errors!
Note you must have this in your phpstan.neon
if drupal/core-dev
is missing:
excludePaths:
- */tests/src/*/*.php
What's Changed
- Support dynamic return type of Drupal\Core\Url::toString by @brambaud in #255
- Support parent definition service by @brambaud in #256
- Avoid false positives when PHPUnit doesn't exist. by @codebymikey in #216
- Fix incompatibility without drupal/core-dev by @mglaman in #246
New Contributors
- @codebymikey made their first contribution in #216
Full Changelog: 1.1.0...1.1.1
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