Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type-safety for ExtensionPluginManager #88

Open
wants to merge 1 commit into
base: 2.23.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Reader/ExtensionPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*
* @inheritDoc
*/
protected $aliases = [
protected array $aliases = [

Check failure on line 36 in src/Reader/ExtensionPluginManager.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Psalm [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-action@v1, ...

NonInvariantPropertyType

src/Reader/ExtensionPluginManager.php:36:21: NonInvariantPropertyType: Property Laminas\Feed\Reader\ExtensionPluginManager::$aliases has type array<array-key, mixed>, not invariant with Laminas\ServiceManager\ServiceManager::$aliases of type <empty> (see https://psalm.dev/265)

Check failure on line 36 in src/Reader/ExtensionPluginManager.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Psalm [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-action@v1, ...

NonInvariantDocblockPropertyType

src/Reader/ExtensionPluginManager.php:36:21: NonInvariantDocblockPropertyType: Property Laminas\Feed\Reader\ExtensionPluginManager::$aliases has type array<array-key, mixed>, not invariant with Laminas\ServiceManager\ServiceManager::$aliases of type array<array-key, string> (see https://psalm.dev/267)
'atomentry' => Extension\Atom\Entry::class,
'atomEntry' => Extension\Atom\Entry::class,
'AtomEntry' => Extension\Atom\Entry::class,
Expand Down Expand Up @@ -143,7 +143,7 @@
*
* @inheritDoc
*/
protected $factories = [
protected array $factories = [

Check failure on line 146 in src/Reader/ExtensionPluginManager.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Psalm [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-action@v1, ...

NonInvariantPropertyType

src/Reader/ExtensionPluginManager.php:146:21: NonInvariantPropertyType: Property Laminas\Feed\Reader\ExtensionPluginManager::$factories has type array<array-key, mixed>, not invariant with Laminas\ServiceManager\ServiceManager::$factories of type <empty> (see https://psalm.dev/265)

Check failure on line 146 in src/Reader/ExtensionPluginManager.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Psalm [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-action@v1, ...

NonInvariantDocblockPropertyType

src/Reader/ExtensionPluginManager.php:146:21: NonInvariantDocblockPropertyType: Property Laminas\Feed\Reader\ExtensionPluginManager::$factories has type array<array-key, mixed>, not invariant with Laminas\ServiceManager\ServiceManager::$factories of type array<string, Laminas\ServiceManager\Factory\FactoryInterface|callable(Psr\Container\ContainerInterface, null|string, array<array-key, mixed>|null):object|class-string<Laminas\ServiceManager\Factory\FactoryInterface>> (see https://psalm.dev/267)
Extension\Atom\Entry::class => InvokableFactory::class,
Extension\Atom\Feed::class => InvokableFactory::class,
Extension\Content\Entry::class => InvokableFactory::class,
Expand Down Expand Up @@ -197,10 +197,10 @@
*
* @var bool
*/
protected $sharedByDefault = false;
protected bool $sharedByDefault = false;

Check failure on line 200 in src/Reader/ExtensionPluginManager.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Psalm [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-action@v1, ...

NonInvariantPropertyType

src/Reader/ExtensionPluginManager.php:200:20: NonInvariantPropertyType: Property Laminas\Feed\Reader\ExtensionPluginManager::$sharedByDefault has type bool, not invariant with Laminas\ServiceManager\ServiceManager::$sharedByDefault of type <empty> (see https://psalm.dev/265)

/** @inheritDoc */
public function validate(mixed $instance)
public function validate(mixed $instance) : void
{
if (
$instance instanceof AbstractEntry
Expand Down