-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hello,
I’m encountering an issue where referencing a class with ::class
causes the referenced class to throw the following error in CI (but not locally):
Method Two::getDependencies() should return array but return statement is missing.
As an example, this happens when working with data patches that have dependencies:
<?php
declare(strict_types=1);
use Magento\Framework\Setup\Patch\DataPatchInterface;
class One implements DataPatchInterface
{
public static function getDependencies(): array
{
return [
Two::class, // <--------------------------------------------------------------
];
}
}
<?php
declare(strict_types=1);
use Magento\Framework\Setup\Patch\DataPatchInterface;
class Two implements DataPatchInterface
{
public static function getDependencies(): array
{
return [];
}
}
In this setup, the error is thrown in CI, even though everything runs fine locally.
Has anyone experienced this behavior? Could it be related to a specific configuration?
Any guidance on resolving this discrepancy would be greatly appreciated.
Metadata
Metadata
Assignees
Labels
No labels