Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to use Drupal 9.3 #19

Merged
merged 13 commits into from
Jun 16, 2022
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
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM drupal:8.9.20
FROM drupal:9.3.16-php8.0
MAINTAINER [email protected]

# Install packages.
Expand Down Expand Up @@ -28,8 +28,9 @@ RUN docker-php-ext-install zip bcmath exif sockets

# Install Composer.
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php && \
mv composer.phar /usr/local/bin/composer && \
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
mv composer.phar /usr/local/bin/composer && \
php -r "unlink('composer-setup.php');"


Expand All @@ -46,7 +47,7 @@ WORKDIR /var/www/html/
RUN chown -R www-data:www-data *

# Install Drush launcher.
RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.4.2/drush.phar && \
RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.10.1/drush.phar && \
chmod +x drush.phar && \
mv drush.phar /usr/local/bin/drush

Expand Down
1 change: 0 additions & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ RUN composer install --prefer-dist --no-interaction
# Unfortunately, adding the composer vendor dir to the PATH doesn't seem to work. So:
RUN ln -s /root/.composer/vendor/bin/behat /usr/local/bin/behat
RUN ln -s /root/.composer/vendor/bin/phpunit /usr/local/bin/phpunit
RUN ln -s /var/www/vendor/bin/drupal /usr/local/bin/drupal

### CI SPECIFIC - END ###

Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,29 @@
"require": {
"blackfire/php-sdk": "^v1.27.1",
"drupal/redis": "^1.5",
"drush/drush": "10.*@stable",
"drush/drush": "11.*@stable",
"goalgorilla/open_social": "dev-main",
"goalgorilla/open_social_scripts": "^2.0"
"goalgorilla/open_social_scripts": "^3.1"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "~0.7.1",
"drupal/coder": "^8.3",
"drupal/composer_deploy": "^1.6",
"drupal/core-dev": "~9.2.13",
"drupal/core-dev": "~9.3.16",
"drupal/devel": "^4.1",
"drupal/drupal-extension": "^4.1",
"drupal/upgrade_status": "^3.11",
"jcalderonzumba/gastonjs": "~1.2.0",
"jcalderonzumba/mink-phantomjs-driver": "~0.3.3",
"phpstan/phpstan": "1.4.6",
"mglaman/phpstan-drupal": "1.1.12",
"phpstan/phpstan": "1.7.1",
"mglaman/phpstan-drupal": "1.1.17",
"mikey179/vfsstream": "^1.6",
"palantirnet/drupal-rector": "^0.12",
"phpmd/phpmd": "^2.10",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "1.1.1",
"slevomat/coding-standard": "^7.0",
"squizlabs/html_codesniffer": "*",
"symplify/easy-coding-standard": "^9.4"
Expand Down
37 changes: 18 additions & 19 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RUN composer install --prefer-dist --no-interaction
# Unfortunately, adding the composer vendor dir to the PATH doesn't seem to work. So:
RUN ln -s /root/.composer/vendor/bin/behat /usr/local/bin/behat
RUN ln -s /root/.composer/vendor/bin/phpunit /usr/local/bin/phpunit
RUN ln -s /var/www/vendor/bin/drupal /usr/local/bin/drupal

### CI SPECIFIC - END ###

Expand All @@ -28,33 +27,33 @@ RUN docker-php-ext-configure gmp
RUN docker-php-ext-install gmp

# Xdebug.
RUN pecl install xdebug-2.9.8 && \
RUN pecl install xdebug-3.1.1 && \
docker-php-ext-enable xdebug && \
sed -i '1 a xdebug.remote_autostart=true' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.remote_mode=req' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.remote_handler=dbgp' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.remote_connect_back=1 ' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.remote_port=9000' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.remote_host=127.0.0.1' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.remote_enable=1' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
sed -i '1 a xdebug.client_port=9003' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.mode=debug' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.discover_client_host=true' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.client_host=host.docker.internal' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
sed -i '1 a xdebug.idekey=PHPSTORMi' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

# Blackfire
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& architecture=$(uname -m) \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
# @todo Fix PHP 8 based blackfire installation
#RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
# && architecture=$(uname -m) \
# && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
# && mkdir -p /tmp/blackfire \
# && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
# && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
# && printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
# && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz

RUN php -r "opcache_reset();"

# @todo Remove these steps as it is not required for latest Docker desktop.
# Contains the Mac hack to get the permissions to work for development.
# Set user 1000 and group staff to www-data, enables write permission.
# https://github.com/boot2docker/boot2docker/issues/581#issuecomment-114804894
RUN usermod -u 1000 www-data
RUN usermod -G staff www-data
#RUN usermod -u 1000 www-data
#RUN usermod -G staff www-data

### DEV SPECIFIC - END ###

Expand Down