// Create an alias for WriterInterface so it's easier to remember
class_alias(WriterInterface::class, SimpleConfig::class);
This class alias may(!) make it easier to remember but causes trouble in DI compilation:
Type Error occurred when creating object: XXX\Setup\Patch\Data\XXX, Argument 2 passed to MarkShust\SimpleData\Setup\Patch\SimpleDataPatch::__construct() must be an instance of MarkShust\SimpleData\Api\Config\SimpleConfig, instance of Magento\Framework\App\Config\Storage\Writer given, called in xxx/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121
No matter what the root cause here is, the error message is super confusing if you don't know about the class alias (and you shouldn't have to).
This class alias may(!) make it easier to remember but causes trouble in DI compilation:
No matter what the root cause here is, the error message is super confusing if you don't know about the class alias (and you shouldn't have to).
Is there any reason not to drop it?