Skip to content

Commit 01e7000

Browse files
committed
Merge branch 'release/5.1.0'
2 parents 5cf9197 + d5130df commit 01e7000

File tree

4 files changed

+20
-35
lines changed

4 files changed

+20
-35
lines changed

scaffold/optional/docker-compose.osx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ services:
3333
SITE_ADMIN_EMAIL: [email protected]
3434
SITE_ADMIN_USERNAME: admin
3535
SITE_ADMIN_PASSWORD: password
36-
XDEBUG_CONFIG: "remote_host=docker.for.mac.localhost"
36+
XDEBUG_CONFIG: "remote_host=host.docker.internal"
3737
volumes:
3838
- nfsmount:/code
3939
- ./shared:/shared
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignored:
2+
- DL3008

scaffold/optional/docker/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# This dockerfile takes the current users uid/gid at build time and adjusts reality
22
# so that the running user for www-data is actually the same as the launching user.
3-
FROM uofa/s2i-shepherd-drupal
3+
FROM uofa/s2i-shepherd-drupal:composer2
44

55
ARG USER_ID
66
ARG GROUP_ID
77
ARG PHP_VERSION="7.4"
88

9+
# Ensure shell is what we want.
10+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
11+
912
# Need to switch from www-data to root to do the change of uid
1013
USER 0:0
1114

@@ -31,17 +34,17 @@ fi
3134

3235
# Upgrade all currently installed packages and install additional packages.
3336
RUN apt-get update \
34-
&& apt-get -y install php-sqlite3 php-xdebug php-cli git wget sudo unzip vim \
37+
&& apt-get -y --no-install-recommends install openssh-client php-sqlite3 php-xdebug php-cli git wget sudo unzip vim \
3538
&& sed -ri 's/^zend.assertions\s*=\s*-1/zend.assertions = 1/g' /etc/php/${PHP_VERSION}/cli/php.ini \
3639
&& apt-get -y autoremove && apt-get -y autoclean && apt-get clean && rm -rf /var/lib/apt/lists /tmp/* /var/tmp/*
3740

3841
# Blackfire
3942
# Similar to https://blackfire.io/docs/integrations/docker/php-docker#debugging-the-php-probe
40-
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
41-
&& wget --quiet --output-document /tmp/blackfire-probe.tar.gz https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
43+
RUN version="$(php -r 'echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;')" \
44+
&& wget -q -O /tmp/blackfire-probe.tar.gz "https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version" \
4245
&& mkdir -p /tmp/blackfire \
4346
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
44-
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
47+
&& mv /tmp/blackfire/blackfire-*.so "$(php -r 'echo ini_get('\''extension_dir'\'');')/blackfire.so" \
4548
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://127.0.0.1:8707\n" > /etc/php/${PHP_VERSION}/apache2/conf.d/blackfire.ini \
4649
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
4750

scaffold/required/RoboFileBase.php

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ public function ensureDirectories() {
192192
* Clean config and files, then install Drupal and module dependencies.
193193
*/
194194
public function buildInstall() {
195-
$this->devConfigWriteable();
196-
197195
// @TODO: When is this really used? Automated builds - can be random values.
198196
$successful = $this->_exec("$this->drush_cmd site:install " .
199197
$this->getDrupalProfile() .
@@ -207,9 +205,6 @@ public function buildInstall() {
207205
" --site-mail=\"" . $this->config['site']['mail'] . "\"")
208206
->wasSuccessful();
209207

210-
// Re-set settings.php permissions.
211-
$this->devConfigReadOnly();
212-
213208
$this->checkFail($successful, 'drush site:install failed.');
214209

215210
$this->devCacheRebuild();
@@ -338,6 +333,15 @@ public function configImport() {
338333
$this->checkFail($successful, 'Config import failed.');
339334
}
340335

336+
/**
337+
* Config import backwards compatibility for restore/upgrade.
338+
*
339+
* @deprecated To be removed once all apps move to D9.
340+
*/
341+
public function configImportPlus() {
342+
$this->configImport();
343+
}
344+
341345
/**
342346
* Exports Drupal configuration.
343347
*
@@ -370,7 +374,6 @@ public function configExportOld(): void {
370374
* Turns on twig debug mode, autoreload on and caching off.
371375
*/
372376
public function devTwigDebugEnable() {
373-
$this->devConfigWriteable();
374377
$this->taskReplaceInFile($this->services_yml)
375378
->from('debug: false')
376379
->to('debug: true')
@@ -384,7 +387,6 @@ public function devTwigDebugEnable() {
384387
->to('cache: false')
385388
->run();
386389
$this->devAggregateAssetsDisable();
387-
$this->devConfigReadOnly();
388390
$this->say('Clearing Drupal cache...');
389391
$this->devCacheRebuild();
390392
$this->say('Done. Twig debugging has been enabled');
@@ -394,7 +396,6 @@ public function devTwigDebugEnable() {
394396
* Turn off twig debug mode, autoreload off and caching on.
395397
*/
396398
public function devTwigDebugDisable() {
397-
$this->devConfigWriteable();
398399
$this->taskReplaceInFile($this->services_yml)
399400
->from('debug: true')
400401
->to('debug: false')
@@ -407,7 +408,6 @@ public function devTwigDebugDisable() {
407408
->from('c: false')
408409
->to('cache: true')
409410
->run();
410-
$this->devConfigReadOnly();
411411
$this->say('Clearing Drupal cache...');
412412
$this->devCacheRebuild();
413413
$this->say('Done. Twig debugging has been disabled');
@@ -437,26 +437,6 @@ public function devAggregateAssetsEnable() {
437437
$this->say('Asset Aggregation is now enabled.');
438438
}
439439

440-
/**
441-
* Make config files write-able.
442-
*/
443-
public function devConfigWriteable() {
444-
$this->setPermissions("$this->application_root/sites/default/services.yml", '0664');
445-
$this->setPermissions("$this->application_root/sites/default/settings.php", '0664');
446-
$this->setPermissions("$this->application_root/sites/default/settings.local.php", '0664');
447-
$this->setPermissions("$this->application_root/sites/default", '0775');
448-
}
449-
450-
/**
451-
* Make config files read only.
452-
*/
453-
public function devConfigReadOnly() {
454-
$this->setPermissions("$this->application_root/sites/default/services.yml", '0444');
455-
$this->setPermissions("$this->application_root/sites/default/settings.php", '0444');
456-
$this->setPermissions("$this->application_root/sites/default/settings.local.php", '0444');
457-
$this->setPermissions("$this->application_root/sites/default", '0555');
458-
}
459-
460440
/**
461441
* Imports a database, updates the admin user password and applies updates.
462442
*

0 commit comments

Comments
 (0)