Closed
Description
This issue is similar to #4470
Preconditions (*)
- Magento 2.3.0/1
- PHP 7.2
Steps to reproduce (*)
- Create a simple module with a vendor name which contains at least one number (ex. Mage2Vendor)
- Add a custom indexer to the module just like on the devdocs
<indexer id="mage2module_url_rewrites" view_id="mage2module_url_rewrites" class="Mage2Vendor\Module\Model\Indexer\UrlRewrites">
<title translate="true">Title.</title>
<description translate="true">Description.</description>
</indexer>
- setup:upgrade
Expected result (*)
- Normal Upgrade output & module gets properly installed.
Actual result (*)
- Console trows an error at running scheme:
Running schema recurring...The XML in file "/root/app/code/Mage2Vendor/Module/etc/indexer.xml" is invalid:
Element 'indexer', attribute 'class': [facet 'pattern'] The value 'Mage2Vendor\Module\Model\Indexer\UrlRewrites' is not accepted by the pattern '[a-zA-Z\\]+'.
Line: 3
Element 'indexer', attribute 'class': 'Mage2Vendor\Module\Model\Indexer\UrlRewrites' is not a valid value of the atomic type 'classType'.
Line: 3
Note
If you bypass the first issue by editing Magento/Framework/Indexer/etc/indexer.xsd
the same issue happens with the mview.xml file.
Running data recurring...The XML in file "/root/app/code/Mage2Vendor/Module/etc/mview.xml" is invalid:
Element 'view', attribute 'class': [facet 'pattern'] The value 'Mage2Vendor\Module\Model\Indexer\UrlRewrites' is not accepted by the pattern '[a-zA-Z\\]+'.
Line: 3
Element 'view', attribute 'class': 'Mage2Vendor\Module\Model\Indexer\UrlRewrites' is not a valid value of the atomic type 'classType'.
Line: 3