From f3b7287ca909548eaeda9dbfbe32b533716bf1ea Mon Sep 17 00:00:00 2001 From: "Garrett W." Date: Mon, 23 Dec 2024 09:49:06 +0000 Subject: [PATCH 1/5] created devcontainer config, updated dependabot --- .devcontainer/devcontainer.json | 38 +++++++++++++++++++++++++++++++++ .github/dependabot.yaml | 19 +++++++++++++---- 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..70337886c2 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,38 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/php +{ + "name": "PHP", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/php:1-8.2-bullseye", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/node:1": {} + }, + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + "extensions": [ + "ikappas.composer", + "editorconfig.editorconfig", + "junstyle.php-cs-fixer", + "ms-vscode.makefile-tools", + "recca0120.vscode-phpunit" + ] + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + 8080 + ], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html; test -f composer.json && composer install" + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 1a9f9d8f13..fb8b26f5f1 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -3,7 +3,8 @@ version: 2 updates: - - allow: + - package-ecosystem: "composer" + allow: - dependency-type: "development" commit-message: include: "scope" @@ -12,18 +13,28 @@ updates: labels: - "dependency" open-pull-requests-limit: 10 - package-ecosystem: "composer" schedule: interval: "weekly" versioning-strategy: "increase" - - commit-message: + - package-ecosystem: "github-actions" + commit-message: include: "scope" prefix: "github-actions" directory: "/" labels: - "dependency" open-pull-requests-limit: 10 - package-ecosystem: "github-actions" + schedule: + interval: "weekly" + + - package-ecosystem: "devcontainers" + commit-message: + include: "scope" + prefix: "devcontainers" + directory: "/" + labels: + - "dependency" + open-pull-requests-limit: 10 schedule: interval: "weekly" From 0ce9d2e41e772799f38087e37b302587e68fddfd Mon Sep 17 00:00:00 2001 From: "Garrett W." Date: Sun, 27 Jul 2025 16:26:01 +0000 Subject: [PATCH 2/5] updated php version and composer extension --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 70337886c2..242ad11d99 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "PHP", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/php:1-8.2-bullseye", + "image": "mcr.microsoft.com/devcontainers/php:1-8.4-bullseye", // Features to add to the dev container. More info: https://containers.dev/features. "features": { @@ -16,7 +16,7 @@ // Configure properties specific to VS Code. "vscode": { "extensions": [ - "ikappas.composer", + "DEVSENSE.composer-php-vscode", "editorconfig.editorconfig", "junstyle.php-cs-fixer", "ms-vscode.makefile-tools", From 6a921f25e28d6b70c4f91fc3fac659a125fd24cd Mon Sep 17 00:00:00 2001 From: "Garrett W." Date: Sun, 27 Jul 2025 17:40:28 +0000 Subject: [PATCH 3/5] now everything starts up automatically --- .devcontainer/devcontainer.json | 6 +++++- .devcontainer/post-create.sh | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 .devcontainer/post-create.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 242ad11d99..15ba61a15b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -31,7 +31,11 @@ ], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html; test -f composer.json && composer install" + "postCreateCommand": "sudo .devcontainer/post-create.sh && sudo chmod a+x \"$(pwd)\" && sudo ln -s \"$(pwd)\" /var/www/html", + "waitFor": "postCreateCommand", + "postAttachCommand": { + "Server": "apache2ctl start" + } // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100755 index 0000000000..c7161b9344 --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +test -f composer.json && composer install + +sed -i 's/Listen 80$//' /etc/apache2/ports.conf \ + && sed -i 's//ServerName 127.0.0.1\n/' /etc/apache2/sites-enabled/000-default.conf \ + && rm -rf /var/www/html From 470f9a1ce5ff897a428c0074eaf0be59d50ba839 Mon Sep 17 00:00:00 2001 From: "Garrett W." Date: Sun, 27 Jul 2025 17:45:06 +0000 Subject: [PATCH 4/5] rm non de-facto-standard extensions --- .devcontainer/devcontainer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 15ba61a15b..d1411c2902 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,9 +18,7 @@ "extensions": [ "DEVSENSE.composer-php-vscode", "editorconfig.editorconfig", - "junstyle.php-cs-fixer", - "ms-vscode.makefile-tools", - "recca0120.vscode-phpunit" + "ms-vscode.makefile-tools" ] } }, From fb6b6064b913f9109ad0f8c06cee20bbe541baed Mon Sep 17 00:00:00 2001 From: "Garrett W." Date: Sun, 27 Jul 2025 17:49:15 +0000 Subject: [PATCH 5/5] stupid tabs.. --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d1411c2902..de7a2802ee 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -31,9 +31,9 @@ // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": "sudo .devcontainer/post-create.sh && sudo chmod a+x \"$(pwd)\" && sudo ln -s \"$(pwd)\" /var/www/html", "waitFor": "postCreateCommand", - "postAttachCommand": { - "Server": "apache2ctl start" - } + "postAttachCommand": { + "Server": "apache2ctl start" + } // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root"