Repository navigation
Fix template pitfalls found in the LUP upgrade - #638
Merged
Merged
Conversation
The lifecycle script runs on the host, where the Composer script installs the drop-in at public/content/object-cache.php. The old path did not exist, and a single & let the setup race the removal.
prettier --write . ignores the file list lint-staged passes and rewrites the whole repository on every commit.
engines.npm requires >=11.16.0 but packageManager pinned npm@10.7.0.
Each package's webpack and postcss config re-exports the root one, which Turborepo did not hash, so a change to either could restore a stale build/. PostCSS also reads the T2 custom media definitions installed by Composer.
The filter still listed the old ESLint files and missed eslint.config.js, jsconfig.json, psalm.xml, turbo.json, browsersync.config.js, .npmrc, .wp-env.json and .copilotignore, so they were deployed.
wp theme enable --network prints an error on a single-site install. Guard it so a single-site setup runs without errors.
There is no config folder, deployments run on GitHub Actions rather than Codeship, and WP_SITEURL is derived from WP_HOME in wp-config.php.
The cron job was guarded by repository_owner == 'Emilia-Capital', so it never ran in any Dekode repository.
The table is a log, not content. Projects that do not use Patchstack have no such table, so the pattern matches nothing there.
Compare against the fork flag instead of a hardcoded repository owner, so repositories created from the template outside DekodeInteraktiv still run the cron job.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Short Introduction
Fixes nine small problems in the template that came up while upgrading innovativeanskaffelser (LUP) to PHP 8.4 and WordPress 7.1 on top of Project Base. Each fix is its own commit; the last commit revises the
security-deps.ymlfix.Description
.wp-env.jsonafterStartrunsrm ./wp-content/object-cache.php, but lifecycle scripts run on the host, where the Composer script installs the drop-in atpublic/content/object-cache.php. The&also lets the setup race the removal.rm -f ./public/content/object-cache.php && npm run wp-env …lint-stagedprettier --write .ignores the file list lint-staged passes and rewrites the whole repository on every commit.prettier --writepackageManagernpm@10.7.0whileengines.npmrequires>=11.16.0.npm@11.16.0turbo.jsonwebpack.config.jsandpostcss.config.jsre-export the root ones, which Turborepo does not hash, so changing a root config can restore a stalebuild/. PostCSS also reads the T2 custom media file that Composer installs.globalDependencies:webpack.config.js,postcss.config.js,composer.lockeslint.config.js,jsconfig.json,psalm.xml,turbo.json,browsersync.config.js,.npmrc,.wp-env.jsonor.copilotignore.setup-main-site.shwp theme enable --networkprints an error on a single-site install.wp core is-installed --networksucceeds.INSTALLATION.mdconfigfolder that no longer exist, and listsWP_SITEURLas a setting althoughwp-config.phpderives it fromWP_HOME.security-deps.ymlrepository_owner == 'Emilia-Capital', so the cron run never happens in a Dekode repository.github.event.repository.fork == false. No hardcoded owner, so repositories created from the template elsewhere still run it.anonymize.config.json.*_patchstack_event_log$withpurge. Projects without Patchstack have no such table, so it matches nothing.Steps to Test/Replicate
Checked:
package.json,turbo.json,.wp-env.jsonandanonymize.config.jsonparse as JSON,security-deps.ymlparses as YAML, andsetup-main-site.shpassesbash -n.wp core is-installed --networkexits 1 on a single-site install, so the guard skips the command there.turbo run build --dry=jsonlists the three new global inputs, andlint-stagedruns on staged files only.Not checked:
security-deps.ymlfork condition on GitHub: only the YAML parsing and Prettier were checked.setup-main-site.sh.wp-envitself (no Docker available): the newrmpath follows from where the Composer script writes the file.Screenshots
Not applicable.
Checklist
Dekode coding standards