Now you can easily view the statistics for PHP OPcache in your Magento admin panel. TCMP OPcache GUI displays current memory usage / hit rate / configuration values. You can optionally enable the display of all cached scripts, including details about them, and a quick reset link for the menu (Stores > Configuration > TCMP Studio > OPcache).
composer require tcmp/opcache
php bin/magento module:enable TCMP_OpCache
php bin/magento setup:updgrade
php bin/magento setup:static-content:deploy
Supports: Magento 2.x (System Requirements) / PHP 7.x (OPCache Documentation)
The source: https://github.com/theycallmepepper/m2-opcache-gui
Packagist listing: https://packagist.org/packages/tcmp/opcache
Charts built with Chart.js
Version for Magento 1 (and inspiration for this version): https://github.com/SchumacherFM/Magento-OpCache/
What is MEQP?
Magento EQP Coding Standard is a set of rules and sniffs for PHP_CodeSniffer tool.
It allows automatically check your code against some of the common Magento and PHP coding issues, like:
– raw SQL queries;
– SQL queries inside a loop;
– direct class instantiation;
– unnecessary collection loading;
– excessive code complexity;
– use of dangerous functions;
– use of PHP superglobals;
– code style issues
– and many others.
Read more about it and see the source: Github: Magento Marketplace EQP
How do I use it?
This tool can be run via CLI against any extension by giving it the path but you can also more tightly integrate it into your development workflow with the following steps:
mkdir meqp && cd meqp
git clone https://github.com/magento/marketplace-eqp.git .
Next open up PHPStorm and navigate to Preferences > Languages & Frameworks > PHP > Code Sniffer
You can set it to use the version of PHP_CodeSniffer installed with composer in the steps above. Just use “/path/to/your/docroot/meqp/vendor/bin/phpcs” as the path.
Next navigate to Preferences > Editor > Inspections > PHP > PHP Code Sniffer Validation
– Check “Show warnings as” and “Show Sniff Name”
– Choose MEQP2 from the down ( or MEQP1 for Magento 1.x code )
Originally posted as:
– Choose Coding Standard Custom
– Set your path tp the ruleset: “/path/to/your/docroot/meqp/MEQP2/ruleset.xml”
Thats it, now you can write your code according to Magento’s standards! You should see notifications right alongside your code indicating the issue and the sniff that is triggering it.
Updated for clarity and accuracy 3/25/2018.
If your module is correctly implementing interfaces and preferences for them in its di.xml then enabling web API access to your object’s repository should look something like the example shown below. You have the option of setting an ACL resource on any particular endpoint or making it publicly accessible for unauthenticated usage (maybe on the frontend of your site via AJAX?).
File Location: app/code/Vendor/Module/etc/webapi.xml
No syntax highlighting on this one. Not sure which part of this liked me trying to post XML the least…but that’s added to the backlog now! Thankfully < XMP > hasn’t been removed yet!
I released a little freebie this weekend, hope you enjoy. Feedback is welcome just open an issue or even better submit a pull request!
– Adds “Delete” to order actions in ACL
– Adds “Delete” to mass actions dropdown on Sales Order Grid
– Adds “Delete” to buttons on Sales Order View