First we need to install Brew, the dependency for the Mac:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
MacOS Monterney comes without PHP. Valet+ uses a special version of PHP that you can install like this:
<?xml version="1.0"?> | |
<ruleset name="PHPMD" | |
xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | |
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
<description>PHPMD</description> | |
<!-- Exclude files --> | |
<exclude-pattern>phpserver/*</exclude-pattern> |
<?php | |
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; | |
use Rector\Config\RectorConfig; | |
return static function (RectorConfig $rectorConfig): void { | |
$rectorConfig->rule(CompleteDynamicPropertiesRector::class); | |
// Define directories to check | |
$directories = [ |
cat composer.json | | |
jq 'if .extra then . else . + {"extra": {}} end' | | |
jq --indent 4 '.extra["magento-deploy-ignore"] = { | |
"*": [ | |
"/CHANGELOG.md", | |
"/.gitignore", | |
"/.htaccess.sample", | |
"/.php-cs-fixer.dist.php", | |
"/.user.ini", | |
"/COPYING.txt", |
<?php | |
$doc1 = new DOMDocument(); | |
$doc1->load('dev/tests/integration/phpunit.xml'); | |
$xmlToAdd = new DOMDocument(); | |
$xmlToAdd->loadXML('<coverage> | |
<exclude> | |
<directory suffix=".php">../../../app/code/Magento</directory> | |
<directory>../../../app/code/*/*/Test</directory> |
commit cb985f7401925639e25f55b93cdb44613fcfa1a9 | |
Author: Tjitse Efdé <[email protected]> | |
Date: Tue Nov 8 14:30:19 2022 +0100 | |
M245 fix setup:static-content:deploy timeout (https://github.com/magento/magento2/commit/12a9eacaf57baf1dbd71b22cbd9ada32f3ffa479) | |
diff --git a/Collector/Collector.php b/Collector/Collector.php | |
index b09001a..441d165 100644 | |
--- a/Collector/Collector.php | |
+++ b/Collector/Collector.php |
<?php | |
// Copied from https://github.com/weprovide/valet-plus/blob/2.x/cli/drivers/Magento2ValetDriver.php | |
class CustomMagento2ValetDriver extends Magento2ValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath |
#!/usr/bin/env bash | |
# exit when any command fails | |
set -e | |
# keep track of the last executed command | |
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG | |
# echo an error message before exiting | |
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT |
#!/bin/zsh | |
sed=$(which sed) | |
if [ "$(uname -s)" = "Darwin" ] | |
then | |
sed=$(which gsed) | |
fi | |
# Fix incorrect date format. For example 1-01-2021 | |
$sed -i -E "s/^([0-9])-([0-9]{2})-([0-9]{4})/0\1-\2-\3/" CHANGELOG.md |
#!/usr/bin/env bash | |
# Generates the Magento multistore config based on the base url list that's provided by n98-magerun2 | |
# You can place the output in pub/index.php | |
IFS=' | |
' | |
magerun2=$(which n98-magerun2) | |
[ -z "$magerun2" ] && echo "Cannot find magerun2, exiting." && exit 1 | |
echo "switch (\$_SERVER['HTTP_HOST']) {" |