Skip to content

Fix Parse.ly Content API compatibility - #485

Open
adamehirsch wants to merge 3 commits into
alleyinteractive:developfrom
adamehirsch:fix/issue-281-parsely-content-api
Open

adamehirsch wants to merge 3 commits into
alleyinteractive:developfrom
adamehirsch:fix/issue-281-parsely-content-api

Conversation

@adamehirsch

@adamehirsch adamehirsch commented Oct 5, 2026 •

Copy link
Copy Markdown

Sat down with my little robot friends to try and fix #281 .

  • wp-parsely 3.17 removed the legacy Analytics_Posts_API class.
  • wp-curate now supports wp-parsely 3.20.4 and later, using its Content API service.
  • Converts comma-separated tags to the arrays expected by the Content API.
  • Uses scalar section values, as required by wp-parsely 3.20.4+.
  • Preserves existing cache keys and public filter arguments.
  • Uses the already-validated $parsely instance instead of rereading $GLOBALS.
  • Adds regression coverage for the 3.20.4 version boundary and empty tag values.

Testing

  • PHPCS passed.
  • PHPStan passed with no errors.
  • PHPUnit passed: 22 tests and 108 assertions.
  • Confirmed the ProPublica VIP local environment loads wp-parsely 3.24.1 and exposes the Content API service.

@adamehirsch
adamehirsch marked this pull request as ready for review October 6, 2026 13:39

@mogmarsh mogmarsh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@adamehirsch Thanks for the submission!
This looks good, and I'm approving it...
However, if you feel up for it, I wouldn't mind a few changes. We are fine with only supporting wp-parsely 3.20.4 and later (because that version is already over a year old), so the PR could be updated to return early if the plugin doesn't exist or it's older than 3.20.3. This should simplify things a lot. If you're not up for it, let me know and I'll merge this in, or bring it into our repo and make the changes myself.
Let me know if you have any questions.

Thanks!

@adamehirsch

Copy link
Copy Markdown
Author

@mogmarsh --

I'm totally fine to make the change -- won't that mean that upgrading will require us to bump both this and wp-parsely in rapid succession, as wp-curate will start returning early with our current (outdated) wp-parsely? Can we upgrade them both in one PR or will we have to make the changes atomically?

@kevinfodness

Copy link
Copy Markdown
Member

@adamehirsch we can upgrade them both in one PR and test the effects.

@adamehirsch

Copy link
Copy Markdown
Author

Updated to require wp-parsely 3.20.4+. This removes the legacy client fallback and pre-3.20.4 section conversion while retaining Content API tag normalization. We'll expect to test and update wp-curate and wp-parsely together in one PR, once Alley endorses.

@adamehirsch

Copy link
Copy Markdown
Author

Dependabot check seems to have skipped for some reason, but this is ready to check/deploy from my side, @mogmarsh

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.

Parsely integration not compatible with wp-parsely 3.17

3 participants