Repository navigation
Conversation
A test process loads WordPress once and creates one application per test, so the callbacks of a flushed application stayed in $wp_filter. Pollora\Testing\IsolatesWordPressHooks puts the hooks back to what the load left after each test. Refs #741
fix(modules): level the bundled module package.json with module-default v1.0.0
The tag list of a template could only be read anonymously, which GitHub limits to 60 requests an hour for each address: from a shared runner no theme was generated. When modules.versions.github_token is set, the requests to api.github.com now carry it, and nothing else does. Refs #747
fix(modules): authenticate the GitHub API requests of the downloader
… its origin WordPress sends the headers of a request again when it follows a redirect, whatever host it leads to. A request that carries headers beyond Accept now has its redirects followed by HttpGet, only under the same scheme, host and port, up to five.
fix(blocks): add the current @WordPress packages with pollora:make:block
pollora:make:theme and pollora:make:plugin list the tags of their template on api.github.com, anonymously in CI, and the limit is per IP address of a shared runner: the E2E jobs failed with HTTP 403. The tag is now read with git ls-remote and ordered by the framework's own ModuleDownloader. The plugin fixture passes it as --repo-version, so its checksum is still verified. pollora:install takes no version: when, and only when, it was refused the list of tags, the theme is generated afterwards with the same command and an explicit version. No token is added to CI or DDEV.
ci(e2e): read template tags over git instead of api.github.com
feat(testing): isolate WordPress hooks between tests
…est process WordPress includes functions.php and plugin main files once per process, while a test process builds one application per test: only the first one was asked to register the theme and the plugins. The calls of pollora_register() made while WordPress loads are now repeated for each later application, what they hooked into the actions of the load runs again, and the callbacks they replace are unhooked. Under unit tests only. The files of app/inc are now included once per process: a second registration declared their functions again. Fixes #749
The latest Rector refuses to run on a skip naming a rule that does not exist. Rector 2.8 only warned that both were deprecated and never registered.
Rector 2.9.2 removes them, among them methods the code under test calls or reflects.
A mutant runs only the tests that cover its line: the files that describe a process across ordered tests assert in another test than the one that records.
…ration fix(testing): register themes and plugins in every application of a test process
A response that sets or queues a cookie, whose request has a session, or beside which a Cache-Control forbidding shared storage was already sent, is now answered private instead of public.
chore(release): 13.45.2
The files that watch what one application leaves to the next spread the scenario over several tests, which only held when all of them ran, in order. The mutation gate runs the tests covering a source file: on the pull request into main, where src/Testing is new, it selected some of them and refused to score.
test(testing): follow successive applications within one test
The pull request into main scores every file new since the previous release. With the new testing classes it was cancelled at the default of 30 minutes, in the middle of the mutation gate.
ci(harness): give the quality gates up to 90 minutes
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Release 13.45.2, a security release. See the
[v13.45.2]section of the CHANGELOG.wordpress.sessionsenabled, which is the framework default whenconfig/wordpress.phplacks the key, theRoute::wp()routes ofroutes/web.phpare no longer stored by shared caches. If the front end needs no session, set'sessions' => false. Purge any shared cache after upgrading.[Unreleased], including GitHub API authentication of thepollora:make:*downloads (pollora:make:theme cannot authenticate to the GitHub API, so it fails under the anonymous rate limit #747), theme replay in tests (Testing: the theme is registered only in the first application of a test process #749) and the isolation of WordPress hooks in tests.What was checked and what is not proved: see #753.