-
Notifications
You must be signed in to change notification settings - Fork 1
feat: upgrade to Drupal 11 with a Docker-free backend and dev containers #29
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
Open
Decipher
wants to merge
24
commits into
develop
Choose a base branch
from
feat/drupal-11-upgrade-and-devtools
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
15cd21c
feat(drupal): upgrade to Drupal 11.4.5
Decipher a778ca4
feat(devtools): add a Docker-free local backend workflow
Decipher 8595159
fix(ddev): update the DDEV commands for Drupal 11
Decipher f0d1795
feat(scripts): one-command setup and lifecycle scripts
Decipher 28376da
feat(nuxt): point the frontend at the local backend for static genera…
Decipher 97b0e26
feat(devcontainer): add a dev container that sets the site up on create
Decipher a91e15f
feat(vscode): add debug configurations and extension recommendations
Decipher f25824e
build(lint): add the lint suite
Decipher c4348db
ci: replace Gitpod with GitHub Actions and GitLab CI
Decipher 1d67cc7
docs: rewrite the README for the new setup flow
Decipher ab8de85
feat(setup): tell Windows users what does work, up front
Decipher cbd8f3d
feat(lando): add a Lando backend option
Decipher 9802031
fix(dev): refuse to start when the frontend port is taken
Decipher 01e0c81
ci: test the DDEV, Lando and dev container environments
Decipher 6daa973
docs: document the Lando and Windows workflows
Decipher 3830da6
fix(drupal): drop the private reference from the patch message
Decipher 4b38602
fix(devcontainer): stop mise resolving to a vfox release
Decipher c4b81a1
ci: update the GitHub Actions to v7, and let Renovate own the updates
Decipher 40d9575
fix(lint): match the host past a URL's userinfo
Decipher 4b61d13
test(scripts): cover the setup scripts and the repository config
Decipher bda2196
docs: add a changelog and version alongside Druxt
Decipher d5c810e
fix(setup): install on the documented Node 16 and PHP 8.3
Decipher 46c6a09
fix(dev): take the next free port when 3000 is busy
Decipher 19b2bdd
fix(drupal): hold decoupled_router below 2.0.7
Decipher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "extends": ["@commitlint/config-conventional"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| Lando | ||
| Landofile | ||
| Stanislav | ||
| appserver | ||
| behaviour | ||
| bmewburn | ||
| bootstrapvue | ||
| commitlint | ||
| davidanson | ||
| dbaeumer | ||
| ddev | ||
| devpod | ||
| docroot | ||
| drush | ||
| druxt | ||
| druxtjs | ||
| endswith | ||
| extensionless | ||
| gdlib | ||
| giget | ||
| hverlin | ||
| instantiator | ||
| intelephense | ||
| interruptible | ||
| knip | ||
| lando | ||
| libasound | ||
| libfreetype | ||
| libgbm | ||
| libicu | ||
| libjpeg | ||
| libnotify | ||
| libnss | ||
| libonig | ||
| libsqlite | ||
| libxss | ||
| libxtst | ||
| libzip | ||
| lndo | ||
| makedirs | ||
| mbstring | ||
| namelist | ||
| nohup | ||
| nuxt | ||
| nuxtjs | ||
| nvmrc | ||
| opcache | ||
| openssl | ||
| openvscode | ||
| phpsab | ||
| phpstan | ||
| phpunit | ||
| repository | ||
| setuptools | ||
| shivammathur | ||
| starterkit | ||
| startswith | ||
| tokenless | ||
| trixie | ||
| valeryan | ||
| vfox | ||
| xauth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "files": ["**/*.{js,mjs,cjs,vue,json,jsonc,md,yml,yaml}"], | ||
| "dictionaryDefinitions": [{ "name": "project-words", "path": "./.cspell-project-words.txt" }], | ||
| "dictionaries": ["project-words", "bash", "misc", "node", "softwareTerms"], | ||
| "ignorePaths": [ | ||
| ".git/", | ||
| "node_modules/", | ||
| "nuxt/", | ||
| "drupal/", | ||
| "coverage/", | ||
| "*.lock", | ||
| "package-lock.json", | ||
| "*.svg", | ||
| "*.png", | ||
| "*.jpg", | ||
| "*.gif", | ||
| "*.ico", | ||
| "*.min.*", | ||
| ".devcontainer/extensions/*/*.vsix" | ||
| ], | ||
| "useGitignore": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| { | ||
| "name": "Druxt Quickstart (Serverless)", | ||
| "image": "mcr.microsoft.com/devcontainers/base:trixie", | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/node:1": { | ||
| "version": "16.17.0" | ||
| }, | ||
| "ghcr.io/devcontainers/features/php:1": { | ||
| "version": "8.4", | ||
| "installComposer": true | ||
| }, | ||
| // Installed through gh-release rather than the mise feature: that | ||
| // feature asks for the "latest" jdx/mise release and does not expose | ||
| // a tag filter, and mise now publishes vfox-* releases from the same | ||
| // repository. The resolver picked vfox-v2026.8.15, found no matching | ||
| // asset, and every container build failed. The regex keeps us on | ||
| // mise's own v-tags while still tracking the newest one. | ||
| "ghcr.io/devcontainers-extra/features/gh-release:1": { | ||
| "repo": "jdx/mise", | ||
| "binaryNames": "mise", | ||
| // mise ships the same build as .tar.gz, .tar.xz, .tar.zst and an | ||
| // extensionless binary; without this the resolver finds four | ||
| // matches and refuses to choose. This is the value the mise | ||
| // feature passes. | ||
| "assetRegex": ".tar.gz$", | ||
| "releaseTagRegex": "^v[0-9]+\\.[0-9]+\\.[0-9]+$" | ||
| }, | ||
| "ghcr.io/devcontainers/features/github-cli:1": {} | ||
| }, | ||
| // Pin the backend port: .devtools/start otherwise auto-discovers the | ||
| // first free port from 8888 up, and a container that picked 8889 would | ||
| // sit behind a forward that only maps 8888. | ||
| "containerEnv": { | ||
| "WEBSERVER_PORT": "8888", | ||
| // Node and PHP are provided by the devcontainer features above - | ||
| // mise.toml's pins are for host users. Without this, `mise install` | ||
| // (including the mise extension's missing-tools check) tries to | ||
| // BUILD PHP from source via the vfox-php plugin inside the | ||
| // container, which is slow, redundant, and fails on missing build | ||
| // deps (gdlib). mise tasks (`mise run setup` etc.) are unaffected. | ||
| "MISE_DISABLE_TOOLS": "node,php" | ||
| }, | ||
| "forwardPorts": [8888, 3000], | ||
| "portsAttributes": { | ||
| "8888": { | ||
| "label": "Drupal backend (drupal/.devtools)", | ||
| "onAutoForward": "silent" | ||
| }, | ||
| "3000": { | ||
| "label": "Nuxt frontend", | ||
| "onAutoForward": "silent" | ||
| } | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "settings": { | ||
| // Absolute path to where the mise feature installs the binary | ||
| // (gh-release feature default binLocation). The extension's | ||
| // default bare "mise" value trips its workspace-binary security | ||
| // check - a bare name is treated as workspace-relative, fails | ||
| // to hash (ENOENT), and re-prompts for approval on every config | ||
| // reload. An absolute machine-scope path never prompts. | ||
| "mise.binPath": "/usr/local/bin/mise" | ||
| }, | ||
| "extensions": [ | ||
| "hverlin.mise-vscode", | ||
| "davidanson.vscode-markdownlint", | ||
| "streetsidesoftware.code-spell-checker", | ||
| "EditorConfig.EditorConfig", | ||
| "redhat.vscode-yaml", | ||
| "bmewburn.vscode-intelephense-client", | ||
| "ValeryanM.vscode-phpsab", | ||
| "SanderRonde.phpstan-vscode", | ||
| "xdebug.php-debug", | ||
| "Stanislav.vscode-drupal", | ||
| "Vue.volar", | ||
| "dbaeumer.vscode-eslint" | ||
| ] | ||
| } | ||
| }, | ||
| "postCreateCommand": "bash .devcontainer/post-create.sh", | ||
| "remoteUser": "vscode" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Dev container setup. The official PHP feature (ghcr.io/devcontainers/ | ||
| # features/php) builds PHP from source with no "extensions" option - | ||
| # gd isn't compiled in at all. Drupal core needs it regardless of what | ||
| # any composer.json platform override was told (its own installer does | ||
| # an independent runtime check). No sodium needed here - unlike | ||
| # quickstart/quickstart-druxt-site-tome, this repo has no simple_oauth/ | ||
| # consumers (and so no lcobucci/jwt) at all. | ||
| set -euo pipefail | ||
|
|
||
| echo "==> Installing system dependencies" | ||
| sudo apt-get update | ||
| # python3-setuptools: trixie ships Python 3.13, which dropped the | ||
| # distutils stdlib module entirely - old node-gyp (bundled with this | ||
| # repo's pinned Node 16's npm) still imports it, and setuptools ships a | ||
| # compatible shim. Same fix this project's own CI pipeline already | ||
| # needed for the same reason. | ||
| sudo apt-get install -y python3 python3-setuptools build-essential libjpeg-dev libpng-dev libwebp-dev libfreetype-dev zlib1g-dev | ||
|
|
||
| CONF_DIR=$(php --ini | grep 'Scan for additional .ini files' | sed 's/.*: *//') | ||
| # The PHP feature ships Xdebug globally active - every php/composer run | ||
| # stalls trying to reach a debug client and logs a warning. Off by | ||
| # default; `npm run xdebug` re-enables it per-process with -d flags. | ||
| echo 'xdebug.mode=off' | sudo tee "$CONF_DIR/zz-xdebug-off.ini" > /dev/null | ||
|
|
||
|
|
||
| echo "==> Building gd (not compiled in by the PHP feature at all)" | ||
| # gd is not a real standalone PECL package for current PHP versions - | ||
| # it is a bundled core extension that only gets built via a configure | ||
| # flag (--with-jpeg/--with-webp/--with-freetype) during PHP's own | ||
| # compile. `pecl install gd` fails with "No releases available" even | ||
| # with a fully up-to-date channel, because there is nothing there to | ||
| # install. Build ext/gd directly from PHP's own source tree instead - | ||
| # the same technique the PHP feature itself uses as its xdebug fallback. | ||
| PHP_FULL_VERSION=$(php -r 'echo PHP_VERSION;') | ||
| # mktemp, not a fixed /tmp path: predictable names are open to symlink | ||
| # swaps by any local process between download and extract. | ||
| PHP_SRC_TMP="$(mktemp -d)" | ||
| trap 'rm -rf "$PHP_SRC_TMP"' EXIT | ||
| GD_BUILD_DIR="$PHP_SRC_TMP/gd" | ||
| mkdir -p "$GD_BUILD_DIR" | ||
| curl -fsSL "https://www.php.net/distributions/php-${PHP_FULL_VERSION}.tar.gz" -o "$PHP_SRC_TMP/php-src.tar.gz" | ||
| tar -xzf "$PHP_SRC_TMP/php-src.tar.gz" -C "$GD_BUILD_DIR" --strip-components=3 "php-${PHP_FULL_VERSION}/ext/gd" | ||
| ( | ||
| cd "$GD_BUILD_DIR" | ||
| phpize | ||
| ./configure --with-jpeg --with-webp --with-freetype | ||
| make -j"$(nproc)" | ||
| make install | ||
| ) | ||
| echo 'extension=gd' | sudo tee "$CONF_DIR/gd.ini" > /dev/null | ||
|
|
||
| # Fail fast if the gd build above didn't actually take - composer and | ||
| # Drupal's installer both hard-require it, and a broken build surfacing | ||
| # here beats a confusing failure mid-provision. | ||
| php -r "exit(extension_loaded('gd') ? 0 : 1);" || { echo "gd extension failed to load" >&2; exit 1; } | ||
|
|
||
|
|
||
| echo "==> Trusting this repo's mise.toml" | ||
| mise trust | ||
|
|
||
| echo "==> Running npm install (triggers the full setup pipeline)" | ||
| # --loglevel=error: the root devDependencies are lint tooling that | ||
| # requires Node 22 (CI runs them there); installing them under the | ||
| # app's pinned Node 16 works fine but emits a wall of EBADENGINE | ||
| # warnings that drowns the real setup output on first run. | ||
| npm install --loglevel=error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Backend URL the Nuxt frontend connects to. | ||
| # | ||
| # You normally never edit this by hand: | ||
| # - `npm run setup` / `make setup` starts the local PHP backend and | ||
| # rewrites BASE_URL to it, e.g. http://127.0.0.1:8888 | ||
| # - For DDEV, keep the project URL below instead. | ||
| BASE_URL=http://quickstart-druxt-serverless.ddev.site |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,19 @@ | ||
| <!--- Provide a general summary of your changes in the title above --> | ||
|
|
||
| ## Types of changes | ||
|
|
||
| <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
|
|
||
| - [ ] Bug fix (a non-breaking change which fixes an issue) | ||
| - [ ] New feature (a non-breaking change which adds functionality) | ||
| - [ ] Breaking change (fix or feature that would cause existing functionality to change) | ||
|
|
||
|
|
||
| ## Description | ||
|
|
||
| <!--- Describe your changes in detail --> | ||
| <!--- Why is this change required? What problem does it solve? --> | ||
| <!--- If it resolves an open issue, please link to the issue here. For example "Resolves: #1337" --> | ||
|
|
||
| ## Screenshots/Media | ||
|
|
||
| ## Screenshots/Media: | ||
| <!--- Add any screenshots or other type of media to demonstrate your change --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Semantic Pull Requests: validate the pull request TITLE, not the | ||
| # commits inside it. | ||
| # | ||
| # The app's default accepts a PR when *either* the title or the commits | ||
| # are conventional. These repos squash-merge, so the title becomes the | ||
| # merge commit's subject - a well-committed PR with a prose title passed | ||
| # the check, then broke `lint:commit` on develop for every later push. | ||
| titleOnly: true |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: druxt/quickstart-druxt-serverless
Length of output: 180
🏁 Script executed:
Repository: druxt/quickstart-druxt-serverless
Length of output: 9084
🏁 Script executed:
Repository: druxt/quickstart-druxt-serverless
Length of output: 728
🌐 Web query:
Node.js documentation --experimental-test-coverage added v18.15.0 --test v18.17.0💡 Result:
The --experimental-test-coverage command-line flag was added to Node.js in version 19.7.0 and 18.15.0 [1]. The --test flag, which invokes the built-in Node.js test runner, was added in version 18.0.0 and 16.17.0 [2][3][4].
Citations:
🏁 Script executed:
Repository: druxt/quickstart-druxt-serverless
Length of output: 13849
🌐 Web query:
site:nodejs.org/api/cli.html "--experimental-test-coverage" "v18.15.0"💡 Result:
The --experimental-test-coverage flag was introduced in Node.js version 18.15.0 [1]. This command-line option is used to generate a code coverage report when running tests with the built-in node:test runner [1]. When enabled in conjunction with the --test flag, it provides insights into which parts of your code are being executed during the test suite [1]. Please note that at the time of its introduction in v18.15.0, this feature was marked as experimental [1].
Citations:
🌐 Web query:
site:nodejs.org/api/test.html "experimental-test-coverage" "v18.17.0"💡 Result:
There is no software package or version named experimental-test-coverage v18.17.0. Instead, --experimental-test-coverage is a command-line flag used within the Node.js test runner [1][2]. The reference to v18.17.0 relates to the Node.js version history, where features such as the skip, todo, and only shorthands for the test runner were added in Node.js versions v20.2.0 and v18.17.0 [1][2]. When the Node.js binary is executed with the --experimental-test-coverage flag, the built-in test runner collects code coverage statistics and reports them upon completion of the tests [1]. This flag allows for the generation of coverage reports, including LCOV files, when combined with appropriate test reporters [1]. The functionality is considered experimental (Stability: 1) [1].
Citations:
🏁 Script executed:
Repository: druxt/quickstart-druxt-serverless
Length of output: 11535
Pin the devcontainer to Node 22.
The devcontainer pins Node 16.17.0, which does not support
--experimental-test-coverage. Root lint and coverage CI use Node 22. Align the devcontainer with Node 22.🤖 Prompt for AI Agents