From ee26dbaed587e5a49aa3e9bf2c788096f3534a20 Mon Sep 17 00:00:00 2001 From: Dan Feder Date: Mon, 27 Dec 2021 12:54:36 -0500 Subject: [PATCH 1/3] New docker host config; same for all platforms --- assets/docker/docker-compose.common.yml | 2 ++ assets/docker/etc/php/xdebug-linux.ini | 8 ----- .../etc/php/{xdebug-macos.ini => xdebug.ini} | 2 +- composer.lock | 32 +++++++++---------- src/Command/XdebugCommands.php | 6 ++-- 5 files changed, 21 insertions(+), 29 deletions(-) delete mode 100644 assets/docker/etc/php/xdebug-linux.ini rename assets/docker/etc/php/{xdebug-macos.ini => xdebug.ini} (88%) diff --git a/assets/docker/docker-compose.common.yml b/assets/docker/docker-compose.common.yml index 5aa5dfe9..63143852 100755 --- a/assets/docker/docker-compose.common.yml +++ b/assets/docker/docker-compose.common.yml @@ -69,6 +69,8 @@ services: - ~/.ssh:/root/.ssh - ~/.aws:/root/.aws - composer:/root/.composer + extra_hosts: + - "host.docker.internal:host-gateway" volumes: composer: diff --git a/assets/docker/etc/php/xdebug-linux.ini b/assets/docker/etc/php/xdebug-linux.ini deleted file mode 100644 index d190f83b..00000000 --- a/assets/docker/etc/php/xdebug-linux.ini +++ /dev/null @@ -1,8 +0,0 @@ -[xdebug] -zend_extension=xdebug.so -xdebug.start_with_request=yes -xdebug.discover_client_host=true -xdebug.client_host=172.20.0.1 -xdebug.cli_color=2 -xdebug.remote_handler=dbgp -xdebug.mode=debug diff --git a/assets/docker/etc/php/xdebug-macos.ini b/assets/docker/etc/php/xdebug.ini similarity index 88% rename from assets/docker/etc/php/xdebug-macos.ini rename to assets/docker/etc/php/xdebug.ini index eb34fe4d..527fe00b 100644 --- a/assets/docker/etc/php/xdebug-macos.ini +++ b/assets/docker/etc/php/xdebug.ini @@ -6,4 +6,4 @@ xdebug.client_host=host.docker.internal xdebug.client_port=9003 xdebug.cli_color=2 xdebug.remote_handler=dbgp -xdebug.mode=develop,debug +xdebug.mode=debug diff --git a/composer.lock b/composer.lock index 57e18658..ee101640 100644 --- a/composer.lock +++ b/composer.lock @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.208.5", + "version": "3.208.7", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "58fa9d8b522b0afa260299179ff950c783ff0ee1" + "reference": "41a800dd7cf5c4ac0ef9bf8db01e838ab6a3698c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/58fa9d8b522b0afa260299179ff950c783ff0ee1", - "reference": "58fa9d8b522b0afa260299179ff950c783ff0ee1", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/41a800dd7cf5c4ac0ef9bf8db01e838ab6a3698c", + "reference": "41a800dd7cf5c4ac0ef9bf8db01e838ab6a3698c", "shasum": "" }, "require": { @@ -143,9 +143,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.208.5" + "source": "https://github.com/aws/aws-sdk-php/tree/3.208.7" }, - "time": "2021-12-13T20:17:56+00:00" + "time": "2021-12-21T19:16:39+00:00" }, { "name": "composer/semver", @@ -397,30 +397,30 @@ }, { "name": "consolidation/output-formatters", - "version": "4.1.2", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "5821e6ae076bf690058a4de6c94dce97398a69c9" + "reference": "27cf221f6e59b1debed0c6c94015e78cd5f10e24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/5821e6ae076bf690058a4de6c94dce97398a69c9", - "reference": "5821e6ae076bf690058a4de6c94dce97398a69c9", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/27cf221f6e59b1debed0c6c94015e78cd5f10e24", + "reference": "27cf221f6e59b1debed0c6c94015e78cd5f10e24", "shasum": "" }, "require": { "dflydev/dot-access-data": "^1.1.0", "php": ">=7.1.3", - "symfony/console": "^4|^5", - "symfony/finder": "^4|^5" + "symfony/console": "^4|^5|^6", + "symfony/finder": "^4|^5|^6" }, "require-dev": { "php-coveralls/php-coveralls": "^2.4.2", "phpunit/phpunit": ">=7", "squizlabs/php_codesniffer": "^3", - "symfony/var-dumper": "^4", - "symfony/yaml": "^4", + "symfony/var-dumper": "^4|^5|^6", + "symfony/yaml": "^4|^5|^6", "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { @@ -450,9 +450,9 @@ "description": "Format text by applying transformations provided by plug-in formatters.", "support": { "issues": "https://github.com/consolidation/output-formatters/issues", - "source": "https://github.com/consolidation/output-formatters/tree/4.1.2" + "source": "https://github.com/consolidation/output-formatters/tree/4.2.0" }, - "time": "2020-12-12T19:04:59+00:00" + "time": "2021-12-27T14:30:41+00:00" }, { "name": "consolidation/robo", diff --git a/src/Command/XdebugCommands.php b/src/Command/XdebugCommands.php index 7f3a6bb4..79f5f013 100644 --- a/src/Command/XdebugCommands.php +++ b/src/Command/XdebugCommands.php @@ -34,10 +34,8 @@ public function xdebugStart() { $this->xdebugCheck(); - $platform = getenv("PLATFORM"); - $sourceFile = ($platform == 'Darwin') ? 'xdebug-macos.ini' : 'xdebug-linux.ini'; $dktlRoot = Util::getDktlDirectory(); - $this->io()->text("Creating new xdebug.ini file for {$platform} platform."); + $this->io()->text("Creating new xdebug.ini file."); $f = 'src/docker/etc/php/xdebug.ini'; if (file_exists($f)) { @@ -45,7 +43,7 @@ public function xdebugStart() } $result = $this->taskWriteToFile($f) - ->textFromFile("$dktlRoot/assets/docker/etc/php/$sourceFile") + ->textFromFile("$dktlRoot/assets/docker/etc/php/xdbeug.ini") ->run(); Util::directoryAndFileCreationCheck($result, $f, $this->io()); From b355f5abec42cc935cae406bae53d00060e6ffef Mon Sep 17 00:00:00 2001 From: Dan Feder Date: Fri, 25 Feb 2022 18:17:41 -0500 Subject: [PATCH 2/3] Fix xdebug.ini --- assets/docker/etc/php/xdebug.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/docker/etc/php/xdebug.ini b/assets/docker/etc/php/xdebug.ini index 527fe00b..c606e9a8 100644 --- a/assets/docker/etc/php/xdebug.ini +++ b/assets/docker/etc/php/xdebug.ini @@ -1,9 +1,9 @@ [xdebug] -zend_extension=xdebug +zend_extension=xdebug.so xdebug.start_with_request=yes xdebug.discover_client_host=true -xdebug.client_host=host.docker.internal xdebug.client_port=9003 +xdebug.client_host=host.docker.internal xdebug.cli_color=2 xdebug.remote_handler=dbgp -xdebug.mode=debug +xdebug.mode=develop,debug \ No newline at end of file From e23b207f08ea6660869b310a93c59be6ca2ce70f Mon Sep 17 00:00:00 2001 From: Dan Feder Date: Tue, 29 Mar 2022 08:00:15 -0400 Subject: [PATCH 3/3] Typo --- src/Command/XdebugCommands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/XdebugCommands.php b/src/Command/XdebugCommands.php index 79f5f013..602c2cea 100644 --- a/src/Command/XdebugCommands.php +++ b/src/Command/XdebugCommands.php @@ -43,7 +43,7 @@ public function xdebugStart() } $result = $this->taskWriteToFile($f) - ->textFromFile("$dktlRoot/assets/docker/etc/php/xdbeug.ini") + ->textFromFile("$dktlRoot/assets/docker/etc/php/xdebug.ini") ->run(); Util::directoryAndFileCreationCheck($result, $f, $this->io());