diff --git a/Dockerfile b/Dockerfile index 01d170d..e32adcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM drupal:8.9.20 +FROM drupal:9.3.16-php8.0 MAINTAINER devel@goalgorilla.com # Install packages. @@ -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');" @@ -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 diff --git a/ci/Dockerfile b/ci/Dockerfile index 0c7bd88..317afc8 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -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 ### diff --git a/composer.json b/composer.json index 36ce008..41921fe 100644 --- a/composer.json +++ b/composer.json @@ -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" diff --git a/dev/Dockerfile b/dev/Dockerfile index cf3613d..f8d41a0 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -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 ### @@ -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 ###