Closed (fixed)
Project:
Entity repository
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2021 at 11:00 UTC
Updated:
19 Oct 2023 at 13:49 UTC
Jump to comment: Most recent
Entity repository has following variable.
/**
* The bundles.
*
* @var array
* The bundles
*/
protected $bundles;
And taxonomy term repository has
/**
* The taxonomy vocabularies to check.
*
* @var array
* The taxonomy vocabularies to check.
*/
protected $vocabularies = [];
If we typehint those, we can also typehint in subclasses (and this is where phpstan otherwise complains about, hence this patch).
This is a breaking change however.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mallezieComment #5
jeroentI guess this also means entity_repository will have a dependency on PHP 8+ ?
Comment #6
malleziePrimitive types typehinting is supported since 7.4. So that would be the minimum required. (I'm running on php 7.4)
Comment #7
jeroentMerged to 2.0.x. Thanks!