Magento 2 Vendor Module and App/code Issues

We recently came across a recurring (and annoying) problem with some of our Magento 2 modules. The issue was that when ever composer install/update was called the module would be copied to app/code and thus cause class name conflicts with the canonical module in vendor. The fix for this was hard to find and it turns out the Magento 2’s documentation needs updating. To fix the problem, look to your module’s composer.json and find the extra field. Read On →

Magento Admins Black Friday Survival Public Service Announcement

Magento Site Being Flooded with Buyers, Struggling with Server Load? If your Magento site is currently being flooded with orders and visitors and the server is struggling to cope then I have one simple and easy to action tip for you: Do as little as possible in the admin Did you know that every time you update product details and other wise change things in the admin then you are likely to cause one or both of the indexes and caches to require a flush? Read On →

Magento 2 - Error Running Setup:upgrade

When trying to update a Magento 2 database recently using: php bin/magento setup:upgrade I also tried: php bin/magento setup:upgrade --keep-generated I got the following error: [Exception] Warning: file_get_contents(.../var/di/setup.ser): failed to open stream: No such file or directory in .../vendor/magento/framework /App/ObjectManager/ConfigLoader/Compiled.php on line 28 It looks like a regression was introduced in 2.1.0 that stops you running setup:upgrade after running setup:di:compile. A temporary fix for this is to remove all contents from var/di and var/generation, run the update and then re-compile. Read On →

Magento 2 Migrations

Contents Introduction Magento 1.x Migrations Magento 2.x Migrations Edmonds Commerce Migrations Introduction Database Migrations See also: https://en.wikipedia.org/wiki/Schema_migration Database migrations are a way of setting database state pragmatically, it is used in various frameworks, platforms and ORMs like Laravel’s Eloquent, Symfony’s Doctrine among many. There are many different use cases for migrations during development, they can be used to reduce the technical debt to a database during development allowing it to be a decoupled part of the project. Read On →

Installing Libsodium and Pecl-libsodium on Centos7 and Php7

If you would like to work with state of the art encryption techniques in your PHP project then you need to check out libsodium and the corresponding PHP library, pecl-libsodium Getting it installed on your centos7 and PHP7 box though can be a little tricky Here is a bash script which will install all the required depencies and get it working: #!/usr/bin/env bash if [[ "$(whoami)" != "root" ]] then Read On →

Basic Clustat and Clusvcadm Usage

I had to work on one of UKFasts clustered servers today and learnt a few new commands. I wanted to record these here mainly for my future self but hopefully you’ll find them useful too. clustat This is the first command you’ll want to run (as root) on the server. This will give you the current status of all the cluster nodes and services. clusvcadm This is the command you’ll use to managage services (such as mysql). Read On →