Skip to content

Releases: mglaman/phpstan-drupal

1.1.4

29 Dec 22:29
f51ff1a
Compare
Choose a tag to compare

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

22 Dec 22:18
76d9e0b
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.1.2...1.1.3

1.1.2

15 Dec 22:16
fecdf4c
Compare
Choose a tag to compare

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

Full Changelog: 1.1.1...1.1.2

1.1.1

29 Nov 01:52
165429a
Compare
Choose a tag to compare

Major fix for sites without drupal/core-dev

This release includes fixes for Class PHPUnit\Framework\TestCase not found. errors!

testcase-not-found

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

Full Changelog: 1.1.0...1.1.1

1.1.0

24 Nov 22:34
337bc36
Compare
Choose a tag to compare

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

12 Nov 19:46
20b043c
Compare
Choose a tag to compare

What's Changed

  • Use isSuperTypeOf to detect if module handler by @mglaman in #233

Full Changelog: 1.0.2...1.0.3

1.0.2

12 Nov 16:55
1f803a2
Compare
Choose a tag to compare

What's Changed

  • Ignore defaultTheme on abstract test classes by @mglaman in #230
  • Only error on defaultTheme for testing profiles by @mglaman in #231

Full Changelog: 1.0.1...1.0.2

1.0.1

10 Nov 22:06
d66a20f
Compare
Choose a tag to compare

What's Changed

  • Fix remaining test and analysis errors by @mglaman in #219
  • Resolve return of ClassResolver::getInstanceFromDefinition by @brambaud in #220
  • Handle shortcut service aliasing by @mglaman in #224

Full Changelog: 1.0.0...1.0.1

1.0.0

01 Nov 15:22
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.12.15...1.0.0

0.12.15

06 Oct 20:20
1d65da8
Compare
Choose a tag to compare

🥳 Features:

  • Dynamic return type extension for \Drupal::service #190