Skip to content

fix: resolve post by percent-encoded slug/URI when post_name is stored encoded (#3582)#3611

Merged
jasonbahl merged 11 commits intomainfrom
fix/3582-slug-percent-encoded
Mar 10, 2026
Merged

fix: resolve post by percent-encoded slug/URI when post_name is stored encoded (#3582)#3611
jasonbahl merged 11 commits intomainfrom
fix/3582-slug-percent-encoded

Conversation

@jasonbahl
Copy link
Copy Markdown
Collaborator

@jasonbahl jasonbahl commented Mar 6, 2026

Summary

Tests

fixes: #3582

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
wpgraphql-com Ready Ready Preview, Comment Mar 9, 2026 10:40pm

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.2%. Comparing base (1d2a997) to head (3cac9d8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
plugins/wp-graphql/src/Data/NodeResolver.php 85.7% 4 Missing ⚠️
plugins/wp-graphql/src/Request.php 66.7% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              main   #3611   +/-   ##
=======================================
  Coverage     83.2%   83.2%           
- Complexity    5161    5174   +13     
=======================================
  Files          286     286           
  Lines        22483   22511   +28     
=======================================
+ Hits         18703   18727   +24     
- Misses        3780    3784    +4     
Flag Coverage Δ
wp-graphql-acf-wpunit-twentytwentyfive-single 77.1% <ø> (ø)
wp-graphql-wpunit-twentytwentyfive-multisite 84.2% <83.9%> (+<0.1%) ⬆️
wp-graphql-wpunit-twentytwentyfive-single 84.2% <83.9%> (+<0.1%) ⬆️
wp-graphql-wpunit-twentytwentyone-multisite 84.2% <83.9%> (+<0.1%) ⬆️
wp-graphql-wpunit-twentytwentyone-single 84.2% <83.9%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
plugins/wp-graphql/src/Request.php 57.7% <66.7%> (+0.2%) ⬆️
plugins/wp-graphql/src/Data/NodeResolver.php 83.9% <85.7%> (+0.1%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ests

Ensures composer install runs in plugins/wp-graphql when testing
wp-graphql-ide and wp-graphql-smart-cache so the core plugin can load
and dependent tests see WPGraphQL available.
- wp-graphql: add @var WP_Query for $retry_query in NodeResolver (PHPStan)
- wp-graphql-smart-cache: guard constants with defined() to avoid redefinition
- wp-graphql-smart-cache: bootstrap PHPStan from ../wp-graphql/wp-graphql.php
- lint: install WPGraphQL core deps when running PHPStan for smart-cache/ide
- NodeResolver: align equals in retry block (PHPCS MultipleStatementAlignment)
- lint: use github.workspace for WPGraphQL core install path
- smart-cache: remove deprecated checkMissingIterableValueType, add ignoreErrors
Use explicit run step with working-directory so core plugin vendor is
created before PHPStan runs; add composer:v2 to PHPStan job so
composer is available.
…s in CI

Use load-wp-graphql-autoload.php to require core plugin vendor/autoload.php
using __DIR__, so the path resolves correctly regardless of CWD when PHPStan
runs. Fixes 'class not found' errors for GraphQL/WPGraphQL in lint job.
- Use scanFiles for axepress/wp-graphql-stubs (match IDE/ACF) instead of
  loading core plugin autoloader; remove load-wp-graphql-autoload.php
- Lint: remove Install WPGraphQL core step and composer:v2 (no longer needed)
- Add PHPStan ignores for stub/runtime type mismatches (Error $node,
  setPersistedQueryLoader closure, deadCode.unreachable in can_load_plugin)
@jasonbahl jasonbahl merged commit a473d9b into main Mar 10, 2026
66 of 67 checks passed
@jasonbahl jasonbahl deleted the fix/3582-slug-percent-encoded branch March 10, 2026 16:40
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.

Slug query returns null when post_name is stored as percent-encoded (non-ASCII slugs: Korean, Japanese, etc.)

1 participant