Skip to content

chore(deps): update pollora/wp-rest requirement from ^2.0.3 to ^2.0.4 - #761

Open
dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/composer/develop/pollora/wp-rest-tw-2.0.4
Open

dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/composer/develop/pollora/wp-rest-tw-2.0.4

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 5, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on pollora/wp-rest to permit the latest version.

Release notes

Sourced from pollora/wp-rest's releases.

2.0.4

Fixed

  • WpRestDiscovery registered no route, and only logged an error, when its discovery ran without a reflection cache: the contract (DiscoveryInterface) makes the cache optional, but the class dereferenced it. It now reflects through a cache of its own when none is given.

Security

  • Can(parameter:) answers 403 (401 when logged out) when the named request parameter is absent or is not a positive integer, instead of calling current_user_can('edit_post', null), which WordPress resolves against the global $post.

Upgrade notes

  • A route using Can('edit_post', parameter: 'id') now refuses a request whose id is not a positive integer. The value is now passed to WordPress as an int. A custom meta capability that takes another kind of identifier through parameter (a slug, a UUID) is now always refused: write a Permission class that reads the parameter itself.
Changelog

Sourced from pollora/wp-rest's changelog.

[2.0.4] - 2026-11-26

Fixed

  • WpRestDiscovery registered no route, and only logged an error, when its discovery ran without a reflection cache: the contract (DiscoveryInterface) makes the cache optional, but the class dereferenced it. It now reflects through a cache of its own when none is given.

Security

  • Can(parameter:) answers 403 (401 when logged out) when the named request parameter is absent or is not a positive integer, instead of calling current_user_can('edit_post', null), which WordPress resolves against the global $post.

Upgrade notes

  • A route using Can('edit_post', parameter: 'id') now refuses a request whose id is not a positive integer. The value is now passed to WordPress as an int. A custom meta capability that takes another kind of identifier through parameter (a slug, a UUID) is now always refused: write a Permission class that reads the parameter itself.

[2.0.3] - 2026-11-23

Changed

  • Accepts pollora/discovery ^0.3 (^0.1 || ^0.2 || ^0.3 || ^1.0)

[2.0.2] - 2026-11-23

Changed

Security

  • Route callbacks no longer put back the current user captured when the route was registered. WordPress logs the user out of a cookie request that carries no nonce (rest_cookie_check_errors()) after the routes are registered, and the stale user was restored for the permission check and the handler, which undid that CSRF protection. current_user is no longer in the globals WpGlobals::wrap() captures by default; WpGlobals::addEssentialGlobal('current_user') still adds it.

Added

  • An integration suite (tests/Integration, composer test:integration) that registers routes with the real REST server and answers requests against a real WordPress and database. It is kept out of the default test run and out of the Composer archive.

[2.0.1] - 2026-11-19

Changed

  • Accepts pollora/discovery 0.2 (^0.1 || ^0.2 || ^1.0)

Internal

  • The Architecture test suite runs tests/Arch.php, which the default run left out

[2.0.0] - 2026-10-29

A major release: a route that declares no permission is refused.

Changed

  • A route without a permission is refused (rest_forbidden, 401 for a visitor, 403 for a logged-in user). Until now it stayed public and called _doing_it_wrong(). Declare permissionCallback: Everyone::class on the routes that are public on purpose, or a permission such as IsLoggedIn
  • The pollora/wp-rest/private_by_default filter now defaults to true. Return false to keep the routes without a permission public while a site migrates; WordPress is then told, with WP_DEBUG, which route to fix

... (truncated)

Commits
  • aaa82cf Merge pull request #47 from Pollora/release/2.0.4
  • c7e3714 chore: release 2.0.4
  • 37dc7eb Merge pull request #46 from Pollora/fix/audit-findings
  • 047cb89 fix(permissions): refuse Can(parameter:) when the value is not a positive int...
  • ae99da9 Merge pull request #45 from Pollora/chore/phpstan-level-10
  • ab86abb Merge pull request #44 from Pollora/chore/phpstan-level-9
  • 04875a1 Merge pull request #43 from Pollora/chore/phpstan-level-8
  • 1acf8b3 Merge pull request #42 from Pollora/chore/phpstan-level-7
  • 5c52fea Merge pull request #41 from Pollora/chore/phpstan-level-6
  • 11b4a3a Merge pull request #40 from Pollora/fix/discovery-without-reflection-cache
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [pollora/wp-rest](https://github.com/Pollora/wp-rest) to permit the latest version.
- [Release notes](https://github.com/Pollora/wp-rest/releases)
- [Changelog](https://github.com/Pollora/wp-rest/blob/main/CHANGELOG.md)
- [Commits](Pollora/wp-rest@2.0.3...2.0.4)

---
updated-dependencies:
- dependency-name: pollora/wp-rest
  dependency-version: 2.0.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Dec 5, 2026
@dependabot @github

dependabot Bot commented on behalf of github Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: automerge. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@github-actions
github-actions Bot enabled auto-merge (squash) December 5, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants