Skip to content

Releases: mglaman/phpstan-drupal

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

0.12.14

29 Sep 19:48
8709438
Compare
Choose a tag to compare

🥳 Features:

  • Detect when deprecated services are fetched from the container #205

🛠 Task:

  • Clean up PHPUnit bootstrap inclusion #203

0.12.13

27 Aug 13:50
c149cae
Compare
Choose a tag to compare

🐞 Bug fix:

  • Update ConfigEntityConfigExportRule to only run if the ConfigEntity class is annotated (not just with a phpDoc present) #200

0.12.12

21 Jul 20:47
548fa7c
Compare
Choose a tag to compare

🥳 Features:

  • Verify that BrowserTestBase::$defaultTheme is populated by child class #191

🐞 Bug fix:

  • Anonymous classes trigger errors with version 0.12.11 #194

0.12.11

16 Jul 21:50
e53fa7b
Compare
Choose a tag to compare

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:

  • Detect missing config_export annotation key #188
  • Detect deprecated context annotation value #186