Skip to content

ci: drop the phiki capture-offset patch, which phiki 2.2.1 made obsolete - #60

Open
dereuromark wants to merge 1 commit into
mainfrom
drop-phiki-patch
Open

dereuromark wants to merge 1 commit into
mainfrom
drop-phiki-patch

Conversation

@dereuromark

Copy link
Copy Markdown
Contributor

Every CI job on this repository fails at composer install, and has since phiki released 2.2.1:

patch-phiki-offsets: anchor not found - phiki changed, re-check the upstream fix.
Script php scripts/patch-phiki-offsets.php handling the post-update-cmd event returned with error code 1
##[error]Process completed with exit code 1.

Six jobs, all dying before they compile anything - PHPStan, both syntax checks, both test matrices, Plugin Check and WP Integration.

scripts/patch-phiki-offsets.php patched a v2.2.0 bug in phiki's capture-offset recovery, and its own header said:

Remove when the upstream fix ships.

It has shipped. The anchor is missing precisely because that code changed upstream. There is no composer.lock here, so every install resolves the latest phiki - which means every install has been failing rather than only new ones.

The failure was never a false alarm to silence: the script correctly refused to patch code it no longer recognized. It needed acting on.

Sibling precedent. wp-carve carried the identical patch, removed it on the same reasoning, and has been running phiki v2.2.1 unpatched since - its changelog records the removal explicitly.

Removed from three places: the post-install-cmd / post-update-cmd hooks, scripts/build.sh (where a comment noted the hooks do not fire under --working-dir, so it invoked the script directly), and the script itself.

Verified locally: composer install completes and resolves phiki v2.2.1, and phpunit, phpstan and phpcs all run and pass - none of which could execute before this.

Noticed while working on #58 and split out, because it blocks every branch rather than that one. #58 wants a rebase once this lands.

Separately, scripts/build.sh copies composer.lock into its temp dir and the repository does not have one. Not touched here, but it will bite the deploy path.

Copilot AI lite review requested due to automatic review settings August 27, 2026 23:25
@dereuromark dereuromark added the bug Something isn't working label Aug 27, 2026
Every CI job on this repository fails at `composer install`, and has since
phiki released 2.2.1:

    patch-phiki-offsets: anchor not found - phiki changed, re-check the
    upstream fix.
    Script php scripts/patch-phiki-offsets.php handling the post-update-cmd
    event returned with error code 1

The script patched a v2.2.0 bug in phiki's capture-offset recovery, and its own
header said to remove it when the upstream fix shipped. It has: the anchor is
missing precisely because that code changed. There is no composer.lock here, so
every install resolves the latest phiki and every install has been failing.

The failure is not a false alarm to be silenced - it is the script correctly
refusing to patch code it no longer recognizes. What it needed was acting on.

sibling precedent: wp-carve carried the identical patch, removed it on the same
reasoning, and has been running phiki v2.2.1 unpatched since.

Removed from the composer hooks, from scripts/build.sh - where a comment noted
the hooks do not fire under --working-dir - and the script itself. Verified:
composer install completes and resolves phiki v2.2.1; phpunit, phpstan and
phpcs all run and pass, none of which could execute before.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix CI by removing the now-obsolete phiki capture-offset patch script that was previously applied during installs/builds.

Changes:

  • Deletes scripts/patch-phiki-offsets.php (previously used to patch phiki/phiki v2.2.0).
  • (Intended per PR description, but not present in the provided diffs) Remove references to that script from Composer hooks and the dist build script.
Suppressed comments (1)

scripts/patch-phiki-offsets.php:1

  • This PR deletes scripts/patch-phiki-offsets.php, but composer.json and scripts/build.sh still invoke it (e.g. post-install-cmd / post-update-cmd and an explicit call in build.sh). As-is, composer install will fail with “Could not open input file scripts/patch-phiki-offsets.php” (and dist builds will fail too). Either keep the script, or update those call sites to remove/empty the hooks and delete the build-step invocation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings August 27, 2026 23:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread scripts/build.sh
Comment on lines 26 to 28
echo "Installing production dependencies..."
cp "$PLUGIN_DIR/composer.json" "$PLUGIN_DIR/composer.lock" "$TMP_DIR/"
php "$(command -v composer)" install --working-dir="$TMP_DIR" --no-dev --optimize-autoloader --no-interaction --no-scripts --quiet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants