Repository navigation
fix(template): default to Starter 1.2.5 and fix update/create failures - #16
Merged
Merged
Conversation
`sympress new` without --template-version still created projects from Starter 1.1.8, so every new project missed the security fixes released in Starter 1.2.2 to 1.2.5 (.htaccess hardening, debug log location, doctor sudoers rule, Symfony security updates in the deployment lock). The built-in default is now Starter 1.2.5, and the catalog also pins the commit that tag points to (b403cc0). The default must resolve to that commit or the run stops; with --no-remote-manifest the pinned commit is used directly instead of an unchecked tag lookup later.
`project:update` looked up the project's templateId in the built-in catalog before loading the snapshot manifest that defines it, so every project created with --manifest failed with "Unknown template", and always failed with --no-remote-manifest. When the recorded template is not built in, the update now starts from a definition built from .sympress/project.json (id, package, repository, version). A snapshot or explicit manifest still replaces it, and the existing identity check still rejects redirects.
When project:create failed after the clone (checkout error, manifest redirect, broken composer.json, .sympress being a file), the partial project stayed behind, sometimes with .git and a .env holding the admin password, and the next attempt stopped with "Target directory is not empty". The generator now removes the directory it created, or empties the directory that was empty before, when anything fails before the starter setup runs. A failing setup still keeps the project so it can be rerun. Most of the diff is re-indentation; review with `git show -w`.
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.
Problem
Findings #1, #2 and #8 of the Fable re-audit (2026-11-22):
sympress newwithout--template-versionstill created projects from Starter 1.1.8, so new projects missed the security fixes of Starter 1.2.2–1.2.5.project:updatefailed withUnknown templatefor every project created from a manifest template, because the template id was looked up in the built-in catalog before the snapshot manifest was loaded (always with--no-remote-manifest).project:createfailed after the clone, the half-created project (sometimes with.gitand.envwith the admin password) stayed behind and blocked the next attempt.Fix
1.2.5, pinned to the commit of tagv1.2.5(b403cc00866a5fcb189dadd2b211f4cb198a5e78, verified viagh api repos/SymPress/starter/git/ref/tags/v1.2.5, lightweight tag pointing at a commit). The default must resolve to that commit, otherwise the run stops; with--no-remote-manifestthe pinned commit is used directly. Explicit--template-version/--repositorybehave as before. README and manifest fallback updated.project:updatebuilds a template definition from.sympress/project.jsonwhen the recorded template is not built in; manifests still replace it and the redirect check still applies.git show -w(mostly re-indentation).Tests
testDefaultStarterIsPinnedToReleaseCommit,testDefaultVersionMustResolveToPinnedRevision,testDryRunKeepsTemplateFromManifestThatIsNotBuiltIn,testFailedCreationRemovesTheHalfCreatedProject; each fails without its fix.composer tests(72 tests),static-analysis,cs,validate --strictgreen locally.bin/sympress new x --dry-run -n --no-setupagainst GitHub showssympress/starter:1.2.5atb403cc0….Release
No release commit here; the follow-up security PR carries
chore(release): prepare 0.4.0.