QUALITY PATCH

ACSD-56842: The deferred proxies and proxy factories are missing after running setup:di:compile

The deferred proxies and proxy factories are missing after running setup:di:compile. Quality patch ACSD-56842 for setup/src applies to Magento Open Source and Adobe Commerce 2.4.2 to 2.4.6-p15.

Categories
Other
Components
setup/src
Origin
adobe-commerce-support
Since QPT
1.1.46

Issue

The deferred proxies and proxy factories are missing after running setup:di:compile.

Steps to reproduce

1. Create a custom module named Magento_CustomModule. 1. In the etc folder of the module, create a di.xml with this content: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Catalog\Model\ProductLink\CollectionProvider"> <arguments> <argument name="providers" xsi:type="array"> <item name="crosssell" xsi:type="object"> Magento\Catalog\Model\ProductLink\CollectionProvider\Crosssell\Proxy </item> <item name="upsell" xsi:type="object">Magento\Catalog\Model\ProductLink\CollectionProvider\Upsell\Proxy</item> <item name="related" xsi:type="object">Magento\Catalog\Model\ProductLink\CollectionProvider\Related\Proxy</item> </argument> </arguments> </type> <type name="Magento\Catalog\Model\Product"> <arguments> <argument name="catalogProductStatus" xsi:type="object"> Magento\Catalog\Model\Product\Attribute\Source\Status\Proxy </argument> <argument name="productLink" xsi:type="object"> Magento\Catalog\Model\Product\Link\Proxy </argument> </arguments> </type> </config> 1. Set the Production mode: bin/magento deploy:mode:set production. 1. Delete the generated folder from the magento root. 1. Run the command bin/magento setup:di:compile. 1. Check the generated folder.

Adobe's page lists 2.4.2 - 2.4.6-p3 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Adobe scheduled the permanent fix for 2.4.7.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-56842. On Cloud, add ACSD-56842 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-56842/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/magento2-base
Packages across compatible versions (1): magento/magento2-base

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.