Skip to content

chore(deps): update pollora/colt requirement from ^11.0 to ^11.1 - #704

Open
dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/composer/develop/pollora/colt-tw-11.1
Open

dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/composer/develop/pollora/colt-tw-11.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 24, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on pollora/colt to permit the latest version.

Release notes

Sourced from pollora/colt's releases.

11.1.0

Changed

  • No more N+1 queries (harness rule PERF-03), without changing the API. Query counts measured on 100 posts, each with its own author, image, terms and comments, before then after:
    • Post::get()->toArray() / toJson(): 502 then 7 queries (the image, terms, main_category, keywords attributes now load their relations once for the whole collection before serialising).
    • Reading $post->terms (or main_category, keywords) in a loop: 202 then 4. Reading $post->image in a loop: 302 then 5.
    • $menuItem->instance() and $menuItem->parent() in a loop over $menu->items: 204 then 6 (one query per target class). A second call on the same item queries again, as before.
    • $term->meta / $comment->meta in a loop over a collection: 201 then 2. Meta is still not loaded, nor serialised, until something reads it.
    • Posts now come back in a PostCollection, menu items in a MenuItemCollection, terms and comments in a MetaSiblingsCollection; all extend Eloquent's Collection.
  • $comment->hasReplies() in a loop over a collection of comments no longer runs one query per comment: the replies of the whole collection load in one query on the first call (2 queries for 100 comments, 101 before). Same result, same API.
  • Reading a lazy relation (author, comments, taxonomies, thumbnail) in a loop is still one query per post, as with any Eloquent model: load them with with() (12 queries for 100 posts).

Added

  • Tests that lock the query counts (tests/Unit/QueryCountTest.php) and a reusable query counter (tests/Support/QueryCounter.php).
Changelog

Sourced from pollora/colt's changelog.

[11.1.0] - 2026-11-19

Changed

  • No more N+1 queries (harness rule PERF-03), without changing the API. Query counts measured on 100 posts, each with its own author, image, terms and comments, before then after:
    • Post::get()->toArray() / toJson(): 502 then 7 queries (the image, terms, main_category, keywords attributes now load their relations once for the whole collection before serialising).
    • Reading $post->terms (or main_category, keywords) in a loop: 202 then 4. Reading $post->image in a loop: 302 then 5.
    • $menuItem->instance() and $menuItem->parent() in a loop over $menu->items: 204 then 6 (one query per target class). A second call on the same item queries again, as before.
    • $term->meta / $comment->meta in a loop over a collection: 201 then 2. Meta is still not loaded, nor serialised, until something reads it.
    • Posts now come back in a PostCollection, menu items in a MenuItemCollection, terms and comments in a MetaSiblingsCollection; all extend Eloquent's Collection.
  • $comment->hasReplies() in a loop over a collection of comments no longer runs one query per comment: the replies of the whole collection load in one query on the first call (2 queries for 100 comments, 101 before). Same result, same API.
  • Reading a lazy relation (author, comments, taxonomies, thumbnail) in a loop is still one query per post, as with any Eloquent model: load them with with() (12 queries for 100 posts).

Added

  • Tests that lock the query counts (tests/Unit/QueryCountTest.php) and a reusable query counter (tests/Support/QueryCounter.php).

[11.0.0] - 2026-10-28

A major release: the package requires PHP 8.3 and drops two traits. Read Upgrading below before updating.

Changed

  • Requires PHP 8.3 or later (PHP 8.2 is no longer maintained). CI runs on PHP 8.3 and 8.4, with Laravel 12 and 13.
  • declare(strict_types=1) in every file. A scalar of the wrong type passed to a typed parameter of this package now throws a TypeError instead of being converted. The package has many untyped parameters, which keep accepting what they accepted.
  • Return types on public methods, added where the code returns a single type: isApproved(): bool, isReply(): bool, hasReplies(): bool, hasTerm(): bool, getAvatarAttribute(): string, getKeywordsStrAttribute(): string, getFormat(): string|array|false, createModel(): object, __toString(): string and others. A model that overrides one of them with another return type must be updated.
  • Declared dependencies match what the code uses: illuminate/contracts and nesbot/carbon are required, illuminate/filesystem is not (nothing used it), and fakerphp/faker is a development dependency (only the test factories use it).
  • PasswordService declares its $hasher property: creating it dynamically is deprecated since PHP 8.2.
  • Post::getImageAttribute() is documented as string|null and returns null explicitly when the post has no thumbnail (same value as before); getPostInstance() and newFromBuilder() are documented as returning static.
  • The models declare the columns and relations the code reads with @property tags, for static analysis.
  • The package is checked by the Pollora harness: every gate blocks a merge (code style, PHPStan with a baseline of 52 reports that can only go down, Rector, dependency analysis, security patterns, public surface, tests).

Removed

  • Pollora\Colt\Concerns\AdvancedCustomFields: deprecated, it relied on a Pollora\Colt\Acf\AdvancedCustomFields class that was never part of the package and threw a LogicException. Read ACF values with get_field() or through the model's meta.
  • Pollora\Colt\Laravel\Auth\ResetsPasswords: the trait that stored a reset password with WordPress's hashing. A controller that used it must hash the password itself with Pollora\Colt\Services\PasswordService::makeHash() and save the user_pass of the user.

Upgrading

  1. Run PHP 8.3 or later.
  2. Remove use AdvancedCustomFields and use ResetsPasswords from your classes.
  3. If you override one of the methods listed under "Return types", give it a compatible return type.
  4. Run your tests: a TypeError points at a call that relied on a scalar being converted.
Commits
  • 0c64f18 Merge pull request #33 from Pollora/release/v11.1.0
  • 5d019ae chore: release v11.1.0
  • cc5c079 Merge pull request #32 from Pollora/fix/colt-hasreplies-docblock
  • b938c1c perf: load the replies of a comment collection at once in hasReplies()
  • 206d638 Merge pull request #31 from Pollora/fix/perf03-no-n-plus-one
  • 4ec0078 test(model): pin the meta siblings, the relation connection and the custom ti...
  • 25a4d3d test(model): pin the batching of post collections and menu item targets
  • bedfb53 chore(harness): tighten the ratchet (PHPStan baseline 52 to 48, coverage 96.6)
  • d382cce perf: remove N+1 queries when serialising posts, resolving menu items and rea...
  • fa54d46 Merge pull request #30 from Pollora/chore/harness-0.1.30
  • 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/colt](https://github.com/Pollora/colt) to permit the latest version.
- [Release notes](https://github.com/Pollora/colt/releases)
- [Changelog](https://github.com/Pollora/colt/blob/main/CHANGELOG.md)
- [Commits](Pollora/colt@11.0.0...11.1.0)

---
updated-dependencies:
- dependency-name: pollora/colt
  dependency-version: 11.1.0
  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 Nov 24, 2026
@dependabot @github

dependabot Bot commented on behalf of github Nov 24, 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) November 24, 2026 16:42
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