Closed
Description
Preconditions
- Using Magento 2.2.4
- PHP 7.0.30
Steps to reproduce
- Create new module
- Create di.xml, events.xml, crontab.xml additionally to needed module.xml
- Fill all files correctly with its nessecary headers but dont put any children in it
Example fordi.xml
:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
</config>
- run
php bin/magento setup:upgrade && php bin/magento cache:flush && php bin/magento cache:clean
Expected result
- Upgrade + Flush + Clean should run fine trough, page is loading afterwards in developer mode
Actual result
- Upgrade runs fine, Cache Flush triggers the error (cache:clean does not)
- Error Message:
[Magento\Framework\Exception\LocalizedException]
Invalid XML in file /var/www/html/app/code/Vendor/Modulename/etc/events.xml:
Element 'config': Missing child element(s). Expected is ( event ).
Line: 2
This is not logically as it should render fine, process the file even with no config in it, as it process other files.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release