magento / catalog-storefront

Open Software License 3.0
7 stars 18 forks source link

CatalogExportApi autogeneration #430

Closed magento-engcom-team closed 3 years ago

magento-engcom-team commented 4 years ago

Description

Autogenerated CatalogExportApi classes must be placed into generated folder.

AC:

magento-engcom-team commented 4 years ago

The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/SFAPP-140

m2-assistant[bot] commented 4 years ago

Hi @magento-engcom-team. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


bricht commented 4 years ago

@magento I am working on this

bricht commented 3 years ago

setup:di:compile does not work with this currently, because it does not regenerate our DTOS. -No way to get around deletion of the files I think. \Magento\Setup\Console\CompilerPreparation::handleCompilerEnvironment deletes the whole generated folder.

-If we do the following then it works. Add our generator class here \Magento\Setup\Module\Di\App\Task\OperationFactory::$operationsDefinitions Add our generator class here \Magento\Setup\Console\Command\DiCompileCommand::getOperationsConfiguration

Obviously move the generator logic out of Rrecurring.php and into another class which can be reused from lets say \Magento\Setup\Module\Di\App\Task\Operation\DtoGenerator (new class) which checks whether the ExportApiModule exists at all. Or we pass params to it.

Either way seems like we currently need to modify Task\OperationFactory and Command\DiCompileCommand

bricht commented 3 years ago

Or maybe we could move the configuration for compiling in di.xml and add a custom step to collect this configuration, make it extendable. But need to check more how this could be done.