It may well be that our online catalogue is not updated yet. We have a vast network of ingredients, our supply chain team will be happy to entertain any ingrendient enquiry.
Have you ever wondered how easy it is to check the quality of your own code, your colleagues' code, or a third-party module you want to use on a Magento project?
The Magento development team has created the Magento Extension Quality Program Coding Standard (Magento EQP), which allows you to check the code compliance with the standard, as well as identify the following shortcomings:
- SQL queries execution in the loop;- use of dangerous functions;- use of super-global variables;- excessive code complexity;- Unjustified collections loads.
Installation
You can install the Magento EQP via Composer, running this CLI command:
git clone https://github.com/magento/magento-coding-standard.gitcd magento-coding-standardcomposer install
In case you don't have the composer, you can download it here.
Checking
To check the code (which is, for example, in the /path/to/your/extension folder), go to the Magento EQP folder:
cd /path/to/magento-coding-standard
and run the following
When you update Magento 2, Magento extensions or switching git branches on your dev environment, sometimes you can get the error:
The following modules are outdated: Vendor_Module schema: current version - x.x.x, required version - z.z.z
To solve this issue, please do next:
1. Try to get the latest extension code. Run CLI command in the Magento root directory:
composer install
If you get troubles with running this command, then just skip it, and move to step 2.
2. Try to upgrade your database. Run CLI command:
php bin/magento setup:upgrade
3. If step 1 and 2 didn't help, then navigate to your database and run this SQL Query (don't forget to change the text in bold):
UPDATE `table_prfix_setup_module` SET schema_version="z.z.z", data_version="z.z.z" WHERE module="Vendor_Module";
"table_prfix_" can be found in app/etc/env.php, note that it can be empty.