Extension for PHPStan to allow analysis of Drupal code.
MIT License
Bot releases are visible (Hide)
Published by mglaman almost 3 years ago
The RenderCallbackRule added in 1.1.5 had various flaws. This release should fix them:
#access_callback
– not an array, single callable.#lazy_builder
– an array, but of call_user_func_array values ([callable, args]
)service_name:method
style callbacks were not parsed, now they areFull Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.7...1.1.8
Published by mglaman almost 3 years ago
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.6...1.1.7
Published by mglaman almost 3 years ago
Hotfix.
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.5...1.1.6
Published by mglaman almost 3 years ago
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.4...1.1.5
Published by mglaman almost 3 years ago
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.3...1.1.4
Published by mglaman almost 3 years ago
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.2...1.1.3
Published by mglaman almost 3 years ago
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.
@internal
by @brambaud in https://github.com/mglaman/phpstan-drupal/pull/248
@property
annotations on Entity classes by @jacktonkin in https://github.com/mglaman/phpstan-drupal/pull/268
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.1...1.1.2
Published by mglaman almost 3 years ago
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
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.1.0...1.1.1
Published by mglaman almost 3 years ago
1.1.0 has introduced a breaking change in the configuration schema. See below for more information.
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.0.3...1.1.0
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
Published by mglaman almost 3 years ago
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.0.2...1.0.3
Published by mglaman almost 3 years ago
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.0.1...1.0.2
Published by mglaman almost 3 years ago
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/1.0.0...1.0.1
Published by mglaman almost 3 years ago
Full Changelog: https://github.com/mglaman/phpstan-drupal/compare/0.12.15...1.0.0
Published by mglaman about 3 years ago
🥳 Features:
Published by mglaman about 3 years ago
🥳 Features:
🛠 Task:
Published by mglaman about 3 years ago
🐞 Bug fix:
Published by mglaman over 3 years ago
🥳 Features:
🐞 Bug fix:
Published by mglaman over 3 years ago
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:
Published by mglaman over 3 years ago
🐞 Bug fixes:
GlobalDrupalDependencyInjectionRule
and autoloading when PHPUnit does not exist. Note: PHPStan still warns about autoloading and symbol discovery, still, but not crash.🥳 Features: