rubenpixelpro / magento2-modules

Module creation in Magento 2
6 stars 15 forks source link

Class declaration file starting with a lower case character. #1

Open otanay opened 3 years ago

otanay commented 3 years ago

Files that declare Classes should start with an upper case character. e.g. /app/code/Pixelpro/Helloworld/Block/link.php

This is shown in both the udemy course and here in the repo, but it will cause an error with Magento 2.3.4 Solution: Change the filename to start with an upper case character. e.g. /app/code/Pixelpro/Helloworld/Block/Link.php

This is based on the rule that Magento2 modules should be coded to the PSR-4 standards. https://devdocs.magento.com/guides/v2.3/extension-dev-guide/bk-extension-dev-guide.html https://www.php-fig.org/psr/psr-4/

luizrosalba commented 2 years ago

Still getting Class "Pixelpro\Helloworld\Block\Link" does not exist even after renaming with Magento 2.3.4