Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .docker/main/.profile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Remove /opt/drupal/vendor/bin from $PATH.
PATH=$(echo "$PATH" | sed -e "s/:\/opt\/drupal\/vendor\/bin//")
2 changes: 1 addition & 1 deletion .docker/main/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM drupal:11-php8.3-apache
FROM drupal:11-php8.2-apache

ENV PHP_INI_PATH="$PHP_INI_DIR/conf.d/php.ini"
ENV DRUPAL_PATH="/opt/drupal"
Expand Down
8 changes: 2 additions & 6 deletions .docker/main/drupal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require": {
"composer/installers": "^2",
"drupal/core-composer-scaffold": "*",
"drupal/core-recommended": "^11",
"drupal/core-recommended": "^10",
"drupal/core-vendor-hardening": "*",
"jigarius/drall": "*"
},
Expand All @@ -34,8 +34,7 @@
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"drupal/core-vendor-hardening": true,
"phpro/grumphp": true
"drupal/core-vendor-hardening": true
}
},
"extra": {
Expand Down Expand Up @@ -73,8 +72,5 @@
"type:drupal-custom-theme"
]
}
},
"require-dev": {
"phpro/grumphp": "^2"
}
}
2 changes: 1 addition & 1 deletion .docker/main/empty-drupal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require": {
"composer/installers": "^2",
"drupal/core-composer-scaffold": "*",
"drupal/core-recommended": "^11",
"drupal/core-recommended": "^10",
"drupal/core-vendor-hardening": "*",
"jigarius/drall": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: ['ubuntu-latest']
php-versions: ['8.3', '8.4']
php-versions: ['8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ provision/drupal:

cp /opt/drall/.docker/main/drupal/composer.json /opt/drupal/ || echo "Skipping: drupal/composer.json"
rm -f /opt/drupal/composer.lock
rm -Rf /opt/drupal/vendor
composer --working-dir=/opt/drupal install --no-progress
cp -r /opt/drall/.docker/main/drupal/drush /opt/drupal/ || echo "Skipping: drupal/drush"
cp -r /opt/drall/.docker/main/drupal/web/sites /opt/drupal/web/ || echo "Skipping: drupal/web/sites"
Expand Down Expand Up @@ -52,6 +53,7 @@ provision/empty-drupal:
mkdir -p /opt/empty-drupal
cp /opt/drall/.docker/main/empty-drupal/composer.json /opt/empty-drupal/ || echo "Skipping: empty-drupal/composer.json"
rm -f /opt/empty-drupal/composer.lock
rm -Rf /opt/empty-drupal/vendor
composer --working-dir=/opt/empty-drupal install --no-progress
cp /opt/drall/.docker/main/empty-drupal/web/sites/sites.php /opt/empty-drupal/web/sites/sites.php

Expand All @@ -78,6 +80,8 @@ provision/drupal/database:

.PHONY: provision/drall
provision/drall:
rm -f /opt/drall/composer.lock
rm -Rf /opt/drall/vendor
composer install --working-dir=/opt/drall --no-progress


Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"homepage": "https://github.com/jigarius/drall",
"require": {
"php": ">= 8.3",
"php": ">= 8.2",
"amphp/pipeline": "^1.2",
"amphp/process": "^2",
"consolidation/filter-via-dot-access-data": "^2.0",
Expand Down
14 changes: 6 additions & 8 deletions src/Command/ExecCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,11 @@ protected function initialize(InputInterface $input, OutputInterface $output): v
}

private function checkOptionsSeparator(InputInterface $input, OutputInterface $output): void {
if (!method_exists($input, 'getRawTokens')) {
return;
}
// @todo Use ::getRawTokens() when Symfony Console 7.x becomes a compulsory requirement.
$rawTokens = preg_split('/\s+/', (string) $input);

// If options are present, an options separator (--) is required.
if (in_array('--', $input->getRawTokens(TRUE))) {
if (in_array('--', $rawTokens)) {
return;
}

Expand All @@ -138,12 +137,11 @@ private function checkOptionsSeparator(InputInterface $input, OutputInterface $o
}

private function checkObsoleteOptions(InputInterface $input, OutputInterface $output): void {
if (!method_exists($input, 'getRawTokens')) {
return;
}
// @todo Use ::getRawTokens() when Symfony Console 7.x becomes a compulsory requirement.
$rawTokens = preg_split('/\s+/', (string) $input);

// If obsolete --drall-* options are present, then abort.
foreach ($input->getRawTokens(TRUE) as $token) {
foreach ($rawTokens as $token) {
if (str_starts_with($token, '--drall-')) {
$output->writeln(<<<EOT
In Drall 4.x, all <comment>--drall-*</comment> options have been renamed.
Expand Down
1 change: 0 additions & 1 deletion src/Model/Placeholder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ enum Placeholder: string {
case Site = '@@site';

// Represents the site's directory under "DRUPAL/sites/".
// @todo Rename to @@dir.
case Directory = '@@dir';

// Represents keys in the $sites array.
Expand Down
8 changes: 5 additions & 3 deletions test/Integration/Command/ExecCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,11 @@ public function testCatchStdErrOutput(): void {
// Ignore the Drush Version.
$output = preg_replace('@(Drush version :) ([\d|\.|-]+)@', '$1 x.y.z', $process->getOutput());

$this->assertOutputEquals(<<<EOF
[info] Starting bootstrap to none
[info] Drush bootstrap phase 0
$this->assertOutputContainsString(<<<EOF
[info] Drush bootstrap phase 0
EOF, $output);

$this->assertOutputContainsString(<<<EOF
Drush version : x.y.z
✔ default: Done

Expand Down