You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.github/workflows/phpunit.yml only tested against WP 6.9. Running the suite manually against WP trunk (7.0) surfaces a real failure: test_FrmStylesController::test_front_head fails on an unrelated WP core incorrect-usage notice.
What changed
Added {php: 8.0, wordpress: trunk} to the PHPUnit matrix, alongside the existing 6.9 entries rather than replacing them (transition period - happy to drop 6.9 once trunk actually ships, per the issue's own "Michael's call" on that).
test_front_head(): WP core's own wp_maybe_inline_styles() flags a core stylesheet's dist asset as unreadable whenever the WP checkout under test doesn't have its built dist/ files on disk - a property of the checkout (a released branch ships them pre-built; an unbuilt trunk checkout doesn't), not the WP version itself. Nothing Formidable enqueues is involved. Discard the notice if caught rather than requiring it to fire (setExpectedIncorrectUsage() would have required it to fire on every matrix entry, breaking the still-passing 6.9 jobs - caught in self-review before this shipped).
First trunk CI run exposed a second, unrelated instance of the same underlying gap: test_FrmFormTemplatesController::test_enqueue_assets errored on a missing wp-admin/css/view-transitions.min.css (same "unbuilt trunk checkout has no dist assets" cause, different core code path). Rather than patching every test that happens to touch a core enqueue path one at a time, added a build step for the trunk leg only (npm ci && npm run build:dev, matching what WordPress core's own CI runs before its PHPUnit suite - :dev so the output lands in src/, where WP_DEVELOP_DIR points here, instead of a separate build/ package directory).
Added fail-fast: false - the first trunk failure cancelled both 6.9 jobs before they reported their own result, so there was no actual confirmation the fix left them unaffected.
How verified
Real local PHPUnit run against a WP-core-test-lib checkout on the 7.0 branch (dist assets unbuilt, matching the trunk leg's environment): confirmed red on master (Unexpected incorrect usage notice for wp_maybe_inline_styles), green with the test_front_head fix. Full styles group (18 tests) green after. PHPCS clean on the changed test file. Workflow YAML validated with yaml.safe_load.
Pushed, watching CI for the asset-build addition and the fail-fast: false change - will confirm once it's in and report back if anything's still red.
WP core's own wp_maybe_inline_styles() (unrelated to anything Formidable
enqueues) can flag a core stylesheet's dist asset as unreadable whenever the
WP checkout under test doesn't have its built dist/ files on disk - a
property of the checkout (a released branch ships them pre-built; an
unbuilt trunk checkout doesn't), not the WP version itself. Discard the
notice if it's caught rather than requiring it to fire, so the same test
passes whether or not this environment hits it.
Added trunk alongside the existing 6.9 pin rather than replacing it, so this
can be dropped once WP 7.0 actually ships and 6.9 is no longer the oldest
supported version worth testing.
We reviewed changes in 0f12ebb...d5f0002 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The reason will be displayed to describe this comment to others. Learn more.
Access to an undefined property test_FrmStylesController::$caught_doing_it_wrong
This issue is raised when an attempt is made to access an undefined property.
This may not have been intended, and it is advisable to give the code another look to make sure the property is defined in the scope it is used in.
The first trunk run exposed a second, unrelated pre-existing incompatibility:
test_FrmFormTemplatesController::test_enqueue_assets errored on a missing
wp-admin/css/view-transitions.min.css, since a raw trunk checkout has no
built dist/minified assets (a release branch ships them pre-built). Same
root cause as the test_front_head fix, different core code path - rather
than patching every test that happens to touch a core enqueue path
one-by-one, build the missing assets in the trunk leg itself, the same way
WordPress core's own CI does before running its PHPUnit suite.
Also added fail-fast: false - the first trunk failure cancelled both 6.9
jobs before they reported their own result, so there was no actual
confirmation the fix didn't affect them.
The runner's default Node (22.23.2) is older than trunk's own engines.node
requirement (>=24.18.0 as of this writing) - npm ci refused to run at all
(EBADENGINE). Read the version from the checkout's own .nvmrc instead of
assuming the runner default, since this requirement moves with trunk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
.github/workflows/phpunit.ymlonly tested against WP 6.9. Running the suite manually against WP trunk (7.0) surfaces a real failure:test_FrmStylesController::test_front_headfails on an unrelated WP core incorrect-usage notice.What changed
{php: 8.0, wordpress: trunk}to the PHPUnit matrix, alongside the existing 6.9 entries rather than replacing them (transition period - happy to drop 6.9 once trunk actually ships, per the issue's own "Michael's call" on that).test_front_head(): WP core's ownwp_maybe_inline_styles()flags a core stylesheet's dist asset as unreadable whenever the WP checkout under test doesn't have its builtdist/files on disk - a property of the checkout (a released branch ships them pre-built; an unbuilt trunk checkout doesn't), not the WP version itself. Nothing Formidable enqueues is involved. Discard the notice if caught rather than requiring it to fire (setExpectedIncorrectUsage()would have required it to fire on every matrix entry, breaking the still-passing 6.9 jobs - caught in self-review before this shipped).test_FrmFormTemplatesController::test_enqueue_assetserrored on a missingwp-admin/css/view-transitions.min.css(same "unbuilt trunk checkout has no dist assets" cause, different core code path). Rather than patching every test that happens to touch a core enqueue path one at a time, added a build step for the trunk leg only (npm ci && npm run build:dev, matching what WordPress core's own CI runs before its PHPUnit suite -:devso the output lands insrc/, whereWP_DEVELOP_DIRpoints here, instead of a separatebuild/package directory).fail-fast: false- the first trunk failure cancelled both 6.9 jobs before they reported their own result, so there was no actual confirmation the fix left them unaffected.How verified
Real local PHPUnit run against a WP-core-test-lib checkout on the
7.0branch (dist assets unbuilt, matching the trunk leg's environment): confirmed red onmaster(Unexpected incorrect usage notice for wp_maybe_inline_styles), green with thetest_front_headfix. Fullstylesgroup (18 tests) green after. PHPCS clean on the changed test file. Workflow YAML validated withyaml.safe_load.Pushed, watching CI for the asset-build addition and the
fail-fast: falsechange - will confirm once it's in and report back if anything's still red.Closes Strategy11/formidable-pro#6676
🤖 Generated with Claude Code