Skip to content

Remove Git Updater Lite dependency#237

Open
afragen wants to merge 5 commits into
fairpm:release_1.5.0from
afragen:remove-GUL
Open

Remove Git Updater Lite dependency#237
afragen wants to merge 5 commits into
fairpm:release_1.5.0from
afragen:remove-GUL

Conversation

@afragen
Copy link
Copy Markdown
Contributor

@afragen afragen commented Aug 26, 2025

Do NOT merge until fair-plugin has a registered DID and it is set in the plugin headers.

This will remove the GIt Updater Lite dependency for updating the fair-plugin.

See #236

Signed-off-by: Andy Fragen <andy@thefragens.com>
@afragen afragen requested review from costdev and rmccue August 26, 2025 17:49
@costdev
Copy link
Copy Markdown
Member

costdev commented Aug 26, 2025

Remove the require_once from plugin.php too.

Signed-off-by: Andy Fragen <andy@thefragens.com>
costdev
costdev previously approved these changes Aug 27, 2025
@costdev
Copy link
Copy Markdown
Member

costdev commented Aug 27, 2025

For other reviewers

As stated in the PR's description:

Do NOT merge until fair-plugin has a registered DID and it is set in the plugin headers.

@Ipstenu Ipstenu added this to the 1.2 milestone Oct 27, 2025
@Ipstenu
Copy link
Copy Markdown
Contributor

Ipstenu commented Oct 27, 2025

@afragen I'm flagging this for 1.2 :)

@afragen afragen marked this pull request as ready for review October 27, 2025 19:45
Signed-off-by: Andy Fragen <andy@thefragens.com>
Signed-off-by: Andy Fragen <andy@thefragens.com>
@costdev costdev modified the milestones: 1.2, 1.3 Dec 10, 2025
@costdev
Copy link
Copy Markdown
Member

costdev commented Dec 10, 2025

Blocked by #236

@toderash toderash moved this to Review in FAIR Connect Jan 5, 2026
@cdils cdils added the blocked Unable to be worked on. label Jan 12, 2026
@cdils cdils modified the milestones: 1.3, future Jan 12, 2026
@cdils cdils changed the base branch from main to release_1.5.0 May 14, 2026 17:25
@kasparsd
Copy link
Copy Markdown
Contributor

I believe since the 1.4 the plugin is using the DID update mechanism instead of the bundled ( new Git_Updater\Lite( PLUGIN_FILE ) )->run() since the DID updater is hooked after the lite into site_transient_update_plugins and takes over the response.

Secondly, the git-updater doesn't appear to work with the DID suffixed plugin directories like https://api.fair.pm/git-updater/v1/update-api/?slug=fair-32405b (returns Specified repo does not exist) so it would fail for all setups where the plugin directly was recently moved (on 1.4 upgrade).

@afragen
Copy link
Copy Markdown
Contributor Author

afragen commented May 18, 2026

@kasparsd Git Updater does work with hashed slugs in plugins or themes directories.

We were not yet removing this as there was concern that if we did, anyone still on a version earlier than FAIR Connect 1.4.1 wouldn't see any updates.

@afragen
Copy link
Copy Markdown
Contributor Author

afragen commented May 18, 2026

That endpoint is accurate as there is not an installed repository at wp-content/plugins/fair-32405b in that site.

@kasparsd
Copy link
Copy Markdown
Contributor

kasparsd commented May 19, 2026

Git Updater does work with hashed slugs in plugins or themes directories.

@afragen Can you please elaborate on this? On future upgrades from v1.4 the DID update path is used which also triggers the directory rename to include the did-hash. I confirmed this by lowering a v1.4 install to v1.3.9 which then upgraded to v1.4 using the v1.4 code, and it used the DID upgrade path (and applied the plugin directory rename).

after-1 4-upgrades

The Git_Updater\Lite in v1.4+ still triggers but it now uses the fair-32405b slug against the API https://api.fair.pm/wp-json/git-updater/v1/update-api/?slug=fair-32405b which returns:

{"error":"Specified repo does not exist."}

Even if it did return a response, the lifecycle order of hooks makes the DID response override the git-updater response effectively making it not functional.

So older versions with bundled Git_Updater\Lite can still function and work but for anything above v1.4 it isn't really needed or used.

anyone still on a version earlier than FAIR Connect 1.4.1 wouldn't see any updates.

Can you please elaborate on that? Every version of FAIR connect until (and including) 1.4 has the Git_Updater\Lite and can update using the bundled Git_Updater\Lite in those versions. We definitely need to keep the Git_Updater\Lite API endpoints around but the library isn't really needed in the plugin.

@afragen
Copy link
Copy Markdown
Contributor Author

afragen commented May 19, 2026

I thought we fixed it so that if a package was installed via DID it would retain the hashed slug and if it was installed by any other means then the slug would stay unhashed. This would prevent any updates from resulting in a deactivated plugin. This was previously tested and working.

Can you provide explicit instructions on how your testing changed the slug? Was it due to new code changes?

@kasparsd
Copy link
Copy Markdown
Contributor

@afragen I just reported it here #502. The instructions are in there -- when on 1.4.0 (installed via ZIP) I fake-downgrade to 1.3.9 and run the update.

@afragen
Copy link
Copy Markdown
Contributor Author

afragen commented May 19, 2026

I'm confused. It appears that your installation of the plugin is incorrect.

The plugin slug should be fair-plugin or fair-plugin-didhash. What you have is neither of those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Unable to be worked on.

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

6 participants