-
Spin up a CentOS 7 server on Digital Ocean with 2G memory using Test Ocean stack. It may also be run from within a
centos:7
Docker container.terraform apply -var droplet_image=centos-7-x64 -var droplet_size=2gb -var droplet_count=1
-
SSH into the server (dropping into root via
sudo -i
) then run the following to execute the script.curl -s https://raw.githubusercontent.com/davidalger/docker-images-php/master/scripts/php74-build.sh?t=$(date +%s) | bash
#!/usr/bin/env bash | |
set -euo pipefail | |
trap 'error "$(printf "Command \`%s\` on line $LINENO failed with exit code $?" "$BASH_COMMAND")"' ERR | |
## setup functions for use throughout the script | |
function error { | |
>&2 printf "\033[31mERROR\033[0m: $@\n" | |
} | |
function :: { |
#!/usr/bin/env bash | |
set -euo pipefail | |
trap 'error "$(printf "Command \`%s\` on line $LINENO failed with exit code $?" "$BASH_COMMAND")"' ERR | |
function error { | |
>&2 printf "\033[31mERROR\033[0m: $@\n" | |
} | |
function fatal { | |
error "$@" |
--- webroot/vendor/magento/framework/Setup/ConsoleLogger.php 2020-06-02 17:09:24.000000000 -0500 | |
+++ webroot/vendor/magento/framework/Setup/ConsoleLogger.php 2020-06-02 17:23:51.000000000 -0500 | |
@@ -67,7 +67,7 @@ | |
public function log($message) | |
{ | |
$this->terminateLine(); | |
- $this->console->writeln('<detail>' . $message . '</detail>'); | |
+ $this->console->writeln('<detail>' . $this->logPrefix() . $message . '</detail>'); | |
} | |
#cloud-config | |
packages: | |
- epel-release # required for jq installation to succeed | |
write_files: | |
- path: /usr/local/bin/mount-scratch-disks | |
owner: root:root | |
permissions: '0700' | |
content: | | |
#!/bin/bash |
Sometimes console commands use DI in a way that instantiates objects which have side-effects or do a lot of work to initialize themselves in the __construct
method. This generally will surface in one of two ways:
a) Errors when running bin/magento due to application scope not being set
b) Inability to run setup:install from-scratch due to a module instantiating an object which relies on tables which do not exist yet creating errors such as the following:
Table 'magento_integration_tests.flag' doesn't exist
Appling this patch will cause Magento to output a list of all shared instances instantiated by the ObjectManager during the DI process. This can be useful in debugging the above issues. Inspect the output for Command
classes, and then trace down what is instantiated following the last Command
class, and you may find the class that is at fault. Once you have this information, a bit of trial and error may be used such as disabling modules or appending \Proxy
to injected classes (remember to fl
#!/bin/bash | |
function version { | |
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; | |
} | |
# version operator version true/false (1/0) | |
UNITS=( | |
"(2.5.7 -le 2.5.6.9 0)" | |
"(2.4.10 -lt 2.4.9 0)" |
-- Dissalow non-deterministic use of columns not named in GROUP BY | |
-- See: https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html | |
SET SESSION sql_mode = CONCAT_WS(",", (SELECT @@session.sql_mode), 'ONLY_FULL_GROUP_BY'); | |
DROP PROCEDURE IF EXISTS deleteDuplicateCoupons; | |
DELIMITER $$ | |
CREATE PROCEDURE deleteDuplicateCoupons() |