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

Validate PHP classnames in di.xml files via schema #8743

Merged
merged 2 commits into from
Mar 11, 2017
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion app/code/Magento/Captcha/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
</arguments>
</type>
<type name="Magento\Checkout\Block\Cart\Sidebar">
<plugin name="login_captcha" type="\Magento\Captcha\Model\Cart\ConfigPlugin" sortOrder="50" />
<plugin name="login_captcha" type="Magento\Captcha\Model\Cart\ConfigPlugin" sortOrder="50" />
</type>
</config>
18 changes: 9 additions & 9 deletions app/code/Magento/Catalog/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
</arguments>
</type>
<type name="Magento\CatalogInventory\Model\Config\Backend\ShowOutOfStock">
<plugin name="showOutOfStockValueChanged" type="\Magento\Catalog\Model\Plugin\ShowOutOfStockConfig"/>
<plugin name="showOutOfStockValueChanged" type="Magento\Catalog\Model\Plugin\ShowOutOfStockConfig"/>
</type>
<virtualType name="Magento\Catalog\Block\Category\Widget\Link" type="Magento\Catalog\Block\Widget\Link">
<arguments>
Expand Down Expand Up @@ -474,23 +474,23 @@
<plugin name="productListingAttributesCaching" type="Magento\Catalog\Plugin\Model\ResourceModel\Config" />
</type>
<preference for="Magento\Catalog\Api\ProductLinkTypeListInterface" type="Magento\Catalog\Model\Product\LinkTypeProvider" />
<preference for="Magento\Catalog\Api\Data\ProductLinkAttributeInterface" type="\Magento\Catalog\Model\ProductLink\Attribute" />
<preference for="Magento\Catalog\Api\Data\ProductLinkAttributeInterface" type="Magento\Catalog\Model\ProductLink\Attribute" />
<preference for="Magento\Catalog\Api\Data\ProductLinkTypeInterface" type="Magento\Catalog\Model\ProductLink\Type" />
<preference for="Magento\Catalog\Api\ProductLinkManagementInterface" type="Magento\Catalog\Model\ProductLink\Management" />
<preference for="Magento\Catalog\Api\Data\ProductLinkInterface" type="Magento\Catalog\Model\ProductLink\Link" />
<preference for="\Magento\Catalog\Api\CategoryLinkManagementInterface" type="\Magento\Catalog\Model\CategoryLinkManagement" />
<preference for="Magento\Catalog\Api\CategoryLinkManagementInterface" type="Magento\Catalog\Model\CategoryLinkManagement" />
<preference for="Magento\Catalog\Api\Data\ProductWebsiteLinkInterface" type="Magento\Catalog\Model\ProductWebsiteLink" />
<preference for="Magento\Catalog\Api\ProductWebsiteLinkRepositoryInterface" type="Magento\Catalog\Model\ProductWebsiteLinkRepository" />
<preference for="\Magento\Catalog\Api\CategoryLinkRepositoryInterface" type="\Magento\Catalog\Model\CategoryLinkRepository" />
<preference for="Magento\Catalog\Api\CategoryLinkRepositoryInterface" type="Magento\Catalog\Model\CategoryLinkRepository" />
<preference for="Magento\Catalog\Api\Data\ProductCustomOptionInterface" type="Magento\Catalog\Model\Product\Option" />
<preference for="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" type="\Magento\Catalog\Model\Product\Option\Repository" />
<preference for="Magento\Catalog\Api\ProductCustomOptionRepositoryInterface" type="Magento\Catalog\Model\Product\Option\Repository" />
<preference for="Magento\Catalog\Api\Data\ProductCustomOptionTypeInterface" type="Magento\Catalog\Model\Product\Option\Type" />
<preference for="Magento\Catalog\Api\ProductTierPriceManagementInterface" type="\Magento\Catalog\Model\Product\TierPriceManagement" />
<preference for="Magento\Catalog\Api\ScopedProductTierPriceManagementInterface" type="\Magento\Catalog\Model\Product\ScopedTierPriceManagement" />
<preference for="Magento\Catalog\Api\ProductTierPriceManagementInterface" type="Magento\Catalog\Model\Product\TierPriceManagement" />
<preference for="Magento\Catalog\Api\ScopedProductTierPriceManagementInterface" type="Magento\Catalog\Model\Product\ScopedTierPriceManagement" />
<preference for="Magento\Catalog\Api\Data\ProductTierPriceInterface" type="Magento\Catalog\Model\Product\TierPrice" />
<preference for="Magento\Catalog\Api\Data\CategoryProductLinkInterface" type="Magento\Catalog\Model\CategoryProductLink" />
<preference for="Magento\Catalog\Api\ProductCustomOptionTypeListInterface" type="Magento\Catalog\Model\ProductOptions\TypeList" />
<preference for="Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface" type="\Magento\Catalog\Model\Product\Option\Value" />
<preference for="Magento\Catalog\Api\Data\ProductCustomOptionValuesInterface" type="Magento\Catalog\Model\Product\Option\Value" />
<preference for="Magento\Catalog\Api\Data\CustomOptionInterface" type="Magento\Catalog\Model\CustomOptions\CustomOption" />
<preference for="Magento\Catalog\Api\Data\ProductOptionInterface" type="Magento\Catalog\Model\ProductOption" />
<preference for="Magento\Catalog\Api\Data\CategoryLinkInterface" type="Magento\Catalog\Model\CategoryLink" />
Expand Down Expand Up @@ -843,7 +843,7 @@
<argument name="collectionProcessor" xsi:type="object">Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor</argument>
</arguments>
</type>
<type name="\Magento\Catalog\Model\CategoryList">
<type name="Magento\Catalog\Model\CategoryList">
<arguments>
<argument name="collectionProcessor" xsi:type="object">Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor</argument>
</arguments>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</argument>
</arguments>
</type>
<type name="\Magento\Framework\Pricing\Render\PriceBox">
<type name="Magento\Framework\Pricing\Render\PriceBox">
<plugin name="catalog_price_box_key" type="Magento\Catalog\Block\Category\Plugin\PriceBoxTags" />
</type>
</config>
12 changes: 6 additions & 6 deletions app/code/Magento/CatalogImportExport/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\CatalogImportExport\Model\Export\RowCustomizerInterface" type="Magento\CatalogImportExport\Model\Export\RowCustomizer\Composite" />
<type name="Magento\ImportExport\Model\Import">
<plugin name="catalogProductFlatIndexerImport" type="\Magento\CatalogImportExport\Model\Indexer\Product\Flat\Plugin\Import" />
<plugin name="invalidatePriceIndexerOnImport" type="\Magento\CatalogImportExport\Model\Indexer\Product\Price\Plugin\Import" />
<plugin name="invalidateStockIndexerOnImport" type="\Magento\CatalogImportExport\Model\Indexer\Stock\Plugin\Import" />
<plugin name="invalidateEavIndexerOnImport" type="\Magento\CatalogImportExport\Model\Indexer\Product\Eav\Plugin\Import" />
<plugin name="invalidateProductCategoryIndexerOnImport" type="\Magento\CatalogImportExport\Model\Indexer\Product\Category\Plugin\Import" />
<plugin name="invalidateCategoryProductIndexerOnImport" type="\Magento\CatalogImportExport\Model\Indexer\Category\Product\Plugin\Import" />
<plugin name="catalogProductFlatIndexerImport" type="Magento\CatalogImportExport\Model\Indexer\Product\Flat\Plugin\Import" />
<plugin name="invalidatePriceIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Product\Price\Plugin\Import" />
<plugin name="invalidateStockIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Stock\Plugin\Import" />
<plugin name="invalidateEavIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Product\Eav\Plugin\Import" />
<plugin name="invalidateProductCategoryIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Product\Category\Plugin\Import" />
<plugin name="invalidateCategoryProductIndexerOnImport" type="Magento\CatalogImportExport\Model\Indexer\Category\Product\Plugin\Import" />
</type>
<type name="Magento\CatalogImportExport\Model\Import\Product\Validator">
<arguments>
Expand Down
8 changes: 4 additions & 4 deletions app/code/Magento/CatalogInventory/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

<preference for="Magento\CatalogInventory\Model\Spi\StockRegistryProviderInterface" type="Magento\CatalogInventory\Model\StockRegistryProvider" />
<preference for="Magento\CatalogInventory\Model\Spi\StockStateProviderInterface" type="Magento\CatalogInventory\Model\StockStateProvider" />
<preference for="Magento\CatalogInventory\Model\ResourceModel\QtyCounterInterface" type="\Magento\CatalogInventory\Model\ResourceModel\Stock" />

<preference for="Magento\CatalogInventory\Model\ResourceModel\QtyCounterInterface" type="Magento\CatalogInventory\Model\ResourceModel\Stock" />
<type name="Magento\Catalog\Model\Product\Attribute\Repository">
<plugin name="filterCustomAttribute" type="Magento\CatalogInventory\Model\Plugin\FilterCustomAttribute" />
</type>
Expand All @@ -58,7 +58,7 @@
</arguments>
</type>
<type name="Magento\Store\Model\ResourceModel\Group">
<plugin name="storeGroupResourceAroundBeforeSave" type="\Magento\CatalogInventory\Model\Indexer\Stock\Plugin\StoreGroup"/>
<plugin name="storeGroupResourceAroundBeforeSave" type="Magento\CatalogInventory\Model\Indexer\Stock\Plugin\StoreGroup"/>
</type>
<type name="Magento\Catalog\Block\Product\View">
<plugin name="quantityValidators" type="Magento\CatalogInventory\Block\Plugin\ProductView" />
Expand All @@ -69,7 +69,7 @@
</arguments>
</type>
<type name="Magento\Catalog\Model\Product">
<plugin name="catalogInventoryAfterLoad" type="\Magento\CatalogInventory\Model\Plugin\AfterProductLoad"/>
<plugin name="catalogInventoryAfterLoad" type="Magento\CatalogInventory\Model\Plugin\AfterProductLoad"/>
</type>
<type name="Magento\Catalog\Api\ProductRepositoryInterface">
<plugin name="catalogInventoryAroundSave" sortOrder="20" type="Magento\CatalogInventory\Model\Plugin\AroundProductRepositorySave"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\ConfigurableProduct\Model\AttributeOptionProviderInterface">
<plugin name="getInStockAttributeOptionsPlugin" type="\Magento\CatalogInventoryConfigurableProduct\Plugin\GetInStockAttributeOptionsPlugin"/>
<plugin name="getInStockAttributeOptionsPlugin" type="Magento\CatalogInventoryConfigurableProduct\Plugin\GetInStockAttributeOptionsPlugin"/>
</type>
</config>
4 changes: 2 additions & 2 deletions app/code/Magento/CatalogSearch/etc/adminhtml/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<argument name="storage" xsi:type="object">Magento\CatalogSearch\Model\Session\Storage</argument>
</arguments>
</virtualType>
<type name="\Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front">
<plugin name="search_weigh" type="\Magento\CatalogSearch\Block\Plugin\FrontTabPlugin" />
<type name="Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front">
<plugin name="search_weigh" type="Magento\CatalogSearch\Block\Plugin\FrontTabPlugin" />
</type>
</config>
12 changes: 6 additions & 6 deletions app/code/Magento/CatalogSearch/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<preference for="Magento\Framework\Search\Dynamic\DataProviderInterface" type="Magento\CatalogSearch\Model\Adapter\Mysql\Dynamic\DataProvider" />
<preference for="Magento\Framework\Search\Adapter\OptionsInterface" type="Magento\CatalogSearch\Model\Adapter\Options" />
<preference for="Magento\CatalogSearch\Model\Search\FilterMapper\FilterStrategyInterface" type="Magento\CatalogSearch\Model\Search\FilterMapper\FilterContext"/>
<preference for="\Magento\CatalogSearch\Model\Indexer\IndexSwitcherInterface" type="\Magento\CatalogSearch\Model\Indexer\IndexSwitcherProxy"/>
<preference for="Magento\CatalogSearch\Model\Indexer\IndexSwitcherInterface" type="Magento\CatalogSearch\Model\Indexer\IndexSwitcherProxy"/>
<type name="Magento\CatalogSearch\Model\Indexer\IndexerHandlerFactory">
<arguments>
<argument name="configPath" xsi:type="const">Magento\CatalogSearch\Model\ResourceModel\EngineInterface::CONFIG_ENGINE_PATH</argument>
Expand Down Expand Up @@ -69,7 +69,7 @@
</type>
<type name="Magento\Catalog\Model\ResourceModel\Attribute">
<plugin name="catalogsearchFulltextIndexerAttribute" type="Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Attribute"/>
<plugin name="catalogsearchAttributeSearchWeightCache" type="\Magento\CatalogSearch\Model\Attribute\SearchWeight"/>
<plugin name="catalogsearchAttributeSearchWeightCache" type="Magento\CatalogSearch\Model\Attribute\SearchWeight"/>
</type>
<type name="Magento\Framework\Search\EntityMetadata" />
<virtualType name="Magento\Framework\Search\ProductEntityMetadata" type="Magento\Framework\Search\EntityMetadata">
Expand Down Expand Up @@ -256,22 +256,22 @@
</argument>
</arguments>
</type>
<type name="\Magento\CatalogSearch\Model\Indexer\IndexerHandler">
<type name="Magento\CatalogSearch\Model\Indexer\IndexerHandler">
<arguments>
<argument name="indexScopeResolver" xsi:type="object">\Magento\CatalogSearch\Model\Indexer\Scope\ScopeProxy</argument>
</arguments>
</type>
<type name="\Magento\CatalogSearch\Model\Indexer\IndexStructure">
<type name="Magento\CatalogSearch\Model\Indexer\IndexStructure">
<arguments>
<argument name="indexScopeResolver" xsi:type="object">\Magento\CatalogSearch\Model\Indexer\Scope\ScopeProxy</argument>
</arguments>
</type>
<type name="\Magento\CatalogSearch\Model\Indexer\Scope\IndexSwitcher">
<type name="Magento\CatalogSearch\Model\Indexer\Scope\IndexSwitcher">
<arguments>
<argument name="indexScopeResolver" xsi:type="object">\Magento\CatalogSearch\Model\Indexer\Scope\ScopeProxy</argument>
</arguments>
</type>
<type name="\Magento\CatalogSearch\Model\Indexer\Scope\ScopeProxy">
<type name="Magento\CatalogSearch\Model\Indexer\Scope\ScopeProxy">
<arguments>
<argument name="states" xsi:type="array">
<item name="use_temporary_table" xsi:type="string">\Magento\CatalogSearch\Model\Indexer\Scope\TemporaryResolver</item>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<plugin name="customer_account" type="Magento\Customer\Controller\Plugin\Account" />
</type>
<type name="Magento\Checkout\Block\Cart\Sidebar">
<plugin name="customer_cart" type="\Magento\Customer\Model\Cart\ConfigPlugin" />
<plugin name="customer_cart" type="Magento\Customer\Model\Cart\ConfigPlugin" />
</type>
<type name="Magento\Framework\Session\SessionManager">
<plugin name="session_checker" type="Magento\Customer\CustomerData\Plugin\SessionChecker" />
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Developer/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<argument name="pageConfigRendererFactory" xsi:type="object">Magento\Developer\Model\View\Page\Config\RendererFactory</argument>
</arguments>
</type>
<type name="\Magento\Developer\Console\Command\XmlCatalogGenerateCommand">
<type name="Magento\Developer\Console\Command\XmlCatalogGenerateCommand">
<arguments>
<argument name="formats" xsi:type="array">
<item name="phpstorm" xsi:type="object">Magento\Developer\Model\XmlCatalog\Format\PhpStorm</item>
Expand Down
16 changes: 8 additions & 8 deletions app/code/Magento/Downloadable/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@
</argument>
</arguments>
</type>
<preference for="\Magento\Downloadable\Api\LinkRepositoryInterface" type="\Magento\Downloadable\Model\LinkRepository" />
<preference for="\Magento\Downloadable\Api\SampleRepositoryInterface" type="\Magento\Downloadable\Model\SampleRepository" />
<preference for="\Magento\Downloadable\Api\Data\LinkInterface" type="\Magento\Downloadable\Model\Link" />
<preference for="\Magento\Downloadable\Api\Data\SampleInterface" type="\Magento\Downloadable\Model\Sample" />
<preference for="\Magento\Downloadable\Api\Data\File\ContentInterface" type="\Magento\Downloadable\Model\File\Content" />
<preference for="\Magento\Downloadable\Api\Data\File\ContentUploaderInterface" type="\Magento\Downloadable\Model\File\ContentUploader" />
<preference for="\Magento\Downloadable\Model\Product\TypeHandler\TypeHandlerInterface" type="\Magento\Downloadable\Model\Product\TypeHandler\TypeHandler" />
<preference for="\Magento\Downloadable\Api\Data\DownloadableOptionInterface" type="\Magento\Downloadable\Model\DownloadableOption" />
<preference for="Magento\Downloadable\Api\LinkRepositoryInterface" type="Magento\Downloadable\Model\LinkRepository" />
<preference for="Magento\Downloadable\Api\SampleRepositoryInterface" type="Magento\Downloadable\Model\SampleRepository" />
<preference for="Magento\Downloadable\Api\Data\LinkInterface" type="Magento\Downloadable\Model\Link" />
<preference for="Magento\Downloadable\Api\Data\SampleInterface" type="Magento\Downloadable\Model\Sample" />
<preference for="Magento\Downloadable\Api\Data\File\ContentInterface" type="Magento\Downloadable\Model\File\Content" />
<preference for="Magento\Downloadable\Api\Data\File\ContentUploaderInterface" type="Magento\Downloadable\Model\File\ContentUploader" />
<preference for="Magento\Downloadable\Model\Product\TypeHandler\TypeHandlerInterface" type="Magento\Downloadable\Model\Product\TypeHandler\TypeHandler" />
<preference for="Magento\Downloadable\Api\Data\DownloadableOptionInterface" type="Magento\Downloadable\Model\DownloadableOption" />
<type name="Magento\Framework\EntityManager\Operation\ExtensionPool">
<arguments>
<argument name="extensionActions" xsi:type="array">
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/GoogleOptimizer/etc/adminhtml/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<type name="Magento\Catalog\Model\Category\DataProvider">
<plugin name="google_optimizer_category_data_provider" type="Magento\GoogleOptimizer\Model\Plugin\Catalog\Category\DataProvider" />
</type>
<type name="\Magento\Catalog\Ui\DataProvider\Product\Form\NewCategoryDataProvider">
<type name="Magento\Catalog\Ui\DataProvider\Product\Form\NewCategoryDataProvider">
<plugin name="google_optimizer_product_new_category_data_provider" type="Magento\GoogleOptimizer\Model\Plugin\Catalog\Product\Category\DataProvider" />
</type>
</config>
2 changes: 1 addition & 1 deletion app/code/Magento/GroupedProduct/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<type name="Magento\Catalog\Model\Product\Initialization\Helper\ProductLinks">
<plugin name="GroupedProduct" type="Magento\GroupedProduct\Model\Product\Initialization\Helper\ProductLinks\Plugin\Grouped" />
</type>
<type name="\Magento\Catalog\Model\ResourceModel\Product\Link">
<type name="Magento\Catalog\Model\ResourceModel\Product\Link">
<plugin name="groupedProductLinkProcessor" type="Magento\GroupedProduct\Model\ResourceModel\Product\Link\RelationPersister" />
</type>
<type name="Magento\Catalog\Model\ProductLink\Converter\ConverterPool">
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</arguments>
</type>
<virtualType name="Magento\Paypal\Block\WpsBml\Shortcut" type="Magento\Paypal\Block\Bml\Shortcut"></virtualType>
<type name="\Magento\Paypal\Helper\Data">
<type name="Magento\Paypal\Helper\Data">
<arguments>
<argument name="methodCodes" xsi:type="array">
<item name="expressCheckout" xsi:type="const">Magento\Paypal\Model\Config::METHOD_WPP_EXPRESS</item>
Expand Down
Loading