Skip to content

v5: prepare stable release with Deployer Utils 1.x - #28

Merged
gaambo merged 13 commits into
mainfrom
v5
Nov 3, 2026
Merged

gaambo merged 13 commits into
mainfrom
v5

Conversation

@gaambo

@gaambo gaambo commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prepare v5 for release after use in several projects. Requires PHP 8.3+ and Deployer 8; removes Deployer 7 compatibility code.

  • Move generic Composer, npm, file, rsync, localhost, and backup helpers to stable gaambo/deployer-utils:^1.0.1.
  • Keep old WordPress helper classes as deprecated wrappers; WordPress tasks and recipe entry points remain available.
  • Support local and remote WP-CLI runtimes, including DDEV, with database dump path mapping.
  • Resolve relative database dump paths against each host's deploy_path consistently.
  • Refresh Composer packages and SHA-pinned GitHub Actions.
  • Run composer validate --strict in precommit, matching CI.
  • Document the v4-to-v5 upgrade steps in the changelog and link them from the README.

Upgrade notes

See Upgrading from v4.

  • Configure localhost deploy_path; the old example project_path setting was unused.
  • Relative dbdump_path now resolves against deploy_path, not current_path.
  • File-transfer paths starting with / now mean absolute filesystem paths.
  • Replace removed Utils::quote() with Deployer's quote().
  • Local WP-CLI defaults to localhost's current_path.
  • Localhost::run() honors runtimes; use runNative() for host-side commands.
  • Move generic helper imports to Gaambo\DeployerUtils; WPCLI stays in Gaambo\DeployerWordpress.

Validation

  • composer precommit passed: syntax lint, code style, PHPStan, strict Composer validation, all tests.
  • 102 tests / 437 assertions passed locally on PHP 8.3, 8.4, and 8.5.
  • PHPStan passed locally on PHP 8.3, 8.4, and 8.5.
  • All CI checks passed on c87dedc, including tests and code quality on PHP 8.3/8.4/8.5 and the Composer lock diff.
  • Composer audit reports no known vulnerabilities. The default-branch CodeSniffer alert is fixed here by 4.0.4.
  • Already used in several projects by the maintainer; no separate staging smoke test required.

Release checklist

  • Dependency/CI updates committed separately (04a8a09).
  • Migration docs committed separately (40efa8a).
  • Fold migration steps into the changelog (c87dedc); remove the separate migration file.
  • Push v5 and pass CI.
  • Update this PR for review.
  • Review and merge into main.
  • Close superseded Dependabot PR Bump the github-actions group across 1 directory with 4 updates #25 after its changes reach main.
  • Finalize the changelog with release date 2026-11-03 and prepare release notes before tagging.
  • Tag the final release commit v5.0.0 and publish a GitHub release with highlights, breaking changes, migration link, and full comparison from v4.0.1.
  • Verify Packagist, fresh Composer installation, and closure of the CodeSniffer alert.

No tag or release has been published by this PR preparation.

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Composer package changes
Prod Packages Operation Base Target
gaambo/deployer-utils New - v1.0.1
symfony/console Upgraded v7.4.13 v7.4.22
symfony/deprecation-contracts Upgraded v3.7.0 v3.7.1
symfony/polyfill-intl-grapheme Upgraded v1.38.1 v1.43.3
symfony/polyfill-intl-normalizer Upgraded v1.38.0 v1.43.0
symfony/polyfill-mbstring Upgraded v1.38.1 v1.43.3
symfony/process Upgraded v7.4.13 v7.4.22
symfony/service-contracts Upgraded v3.7.0 v3.7.3
symfony/string Upgraded v7.4.13 v7.4.22
symfony/yaml Upgraded v7.4.13 v7.4.22
Dev Packages Operation Base Target
myclabs/deep-copy Upgraded 1.13.4 1.14.0
nikic/php-parser Upgraded v5.7.0 v5.9.0
phpstan/phpstan Upgraded 2.2.1 2.3.4
phpunit/phpunit Upgraded 10.5.63 10.5.66
sebastian/recursion-context Upgraded 5.0.1 5.0.2
squizlabs/php_codesniffer Upgraded 4.0.1 4.0.4

@gaambo gaambo changed the title v5: migrate shared helpers to deployer utils v5: prepare stable release with Deployer Utils 1.x Nov 3, 2026
@gaambo
gaambo marked this pull request as ready for review November 3, 2026 12:53

@gaambo gaambo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline review notes. Summary in a separate PR comment.

Comment thread src/Utils.php Resolved
Comment thread CHANGELOG.md Resolved
Comment thread src/WPCLI.php Resolved
Comment thread src/WPCLI.php Resolved
Comment thread tasks/files.php Resolved
Comment thread composer.json Resolved
Comment thread src/Rsync.php Resolved
@gaambo

gaambo commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Review summary

CI passes on all checks. Nothing blocks the merge. Items 1, 2 and 5 are worth fixing before tagging v5.0.0. Details are in the inline review comments.

Spec (checked against the PR description)

  1. Utils wrapper drops the public isDeployerVersion(), parseStringArray() and parseStringOrNull(). This breaking change isn't in the changelog.
  2. Upgrade guide recommends an absolute dbdump_path, but the DDEV runtime can't map paths outside deploy_path.
  3. WPCLI::runCommand() passes ''/null straight to cwd. The old if ($path) check skipped cd for empty paths.
  4. Nit: runtimePaths uses str_replace across the whole command.

Standards
5. tasks/files.php finds the utils task file by hard-coded path, which breaks with path repositories and installer-paths. Suggest InstalledVersions::getInstallPath() and putting back composer-runtime-api.
6. autoload-dev relies on utils shipping /tests in its dist archive.
7. Rsync wrapper loses the RsyncConfig/RsyncOptions PHPStan type aliases.
8. README TOC link #wp-configphp doesn't match the heading "wp-config.php (Recommendation)". This was already broken before this PR.

@gaambo

gaambo commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Addressed the review in 36e8f38 and replied to/resolved all seven inline threads. Also fixed the README wp-config.php TOC anchor from summary item 8. Local precommit passed; 107 tests / 457 assertions pass on PHP 8.3, 8.4, and 8.5. Literal runtime-path replacement and shared test-support shipping remain by design, with their limits documented. Release date is 2026-11-03.

@gaambo
gaambo merged commit 1b2d0d1 into main Nov 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant