Skip to content

Commit

Permalink
Update make xdebug to PHP 8.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
alxp committed May 19, 2024
1 parent 2c0794a commit 6c009c7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,20 @@ TARGET_MAX_CHAR_NUM=20
IS_DRUPAL_PSSWD_FILE_READABLE := $(shell test -r secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD -a -w secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD && echo 1 || echo 0)
CMD := $(shell [ $(IS_DRUPAL_PSSWD_FILE_READABLE) -eq 1 ] && echo 'tee' || echo 'sudo -k tee')

PHP_VERSION=83
LATEST_VERSION := $(shell curl -s https://api.github.com/repos/desandro/masonry/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/')

PHP_FPM_PID=/var/run/php-fpm7/php-fpm7.pid
ifeq ($(shell expr $(TAG) \>= 3.2), 1)
PHP_FPM_PID=/var/run/php-fpm83/php-fpm83.pid
PHP_FPM_PID=/var/run/php-fpm${PHP_VERSION}/php-fpm83.pid
else ifeq ($(shell expr $(TAG) \>= 3.0), 1)
PHP_FPM_PID=/var/run/php-fpm82/php-fpm82.pid
PHP_FPM_PID=/var/run/php-fpm${PHP_VERSION}/php-fpm${PHP_VERSION}.pid
else ifeq ($(shell expr $(TAG) \>= 2.0), 1)
PHP_FPM_PID=/var/run/php-fpm81/php-fpm81.pid
PHP_FPM_PID=/var/run/php-fpm${PHP_VERSION}/php-fpm${PHP_VERSION}.pid
endif



#############################################
## Default Rule ##
#############################################
Expand Down Expand Up @@ -696,9 +699,9 @@ wait-for-drupal-locally:
## Turn on xdebug.
xdebug:
sleep 6
docker compose exec -T drupal with-contenv bash -lc "apk add php82-pecl-xdebug"
docker cp scripts/extra/xdebug.ini $$(docker compose ps -q drupal):/etc/php82/conf.d/xdebug.ini
-docker compose exec -T drupal with-contenv bash -lc "chown root:root /etc/php82/conf.d/xdebug.ini"
docker compose exec -T drupal with-contenv bash -lc "apk add php${PHP_VERSION}-pecl-xdebug"
docker cp scripts/extra/xdebug.ini $$(docker compose ps -q drupal):/etc/php${PHP_VERSION}/conf.d/xdebug.ini
-docker compose exec -T drupal with-contenv bash -lc "chown root:root /etc/php${PHP_VERSION}_/conf.d/xdebug.ini"
docker compose restart drupal
sleep 6
docker compose exec -T drupal with-contenv bash -lc "php -i | grep xdebug"

0 comments on commit 6c009c7

Please sign in to comment.