Skip to content

Releases: alleyinteractive/mantle-framework

v1.22.0

Choose a tag to compare

@github-actions github-actions released this 03 Jul 03:13
Immutable release. Only release title and notes can be modified.
bdd5533

Changed

  • Updated the alleyinteractive/wp-type-extensions requirement to allow >=3.0.0 <6.0.0.

v1.21.0

Choose a tag to compare

@github-actions github-actions released this 24 Jun 18:16
Immutable release. Only release title and notes can be modified.
6c4e6e0

Changed

  • The minimum supported PHP version is now 8.3. The framework and every package now require php: ^8.3; PHP 8.2 is no longer supported. The CI test matrix and the Rector target version were updated to match. This is a backwards-incompatible change for projects still running PHP 8.2.

  • The framework is now fully PSR-4 compliant (#812). Class, trait, interface, and enum names — and the published package names (which remain lowercase-hyphenated, e.g. mantle-framework/http-client) — are unchanged, so this is not a breaking change.

  • Every package's files and namespace directories were renamed to match their class/trait/interface/enum names. - The source tree was restructured from src/mantle/ to src/Mantle/, with each package directory PascalCased to match its namespace (e.g. http-clientHttp_Client, rest-apiREST_API). - The root autoload was collapsed to a single "Mantle\\": "src/Mantle/" PSR-4 mapping. - The alleyinteractive/composer-wordpress-autoloader dependency was removed entirely; classes now resolve through Composer's native PSR-4 autoloader. - The App\-namespaced scaffolding stubs under framework/resources/application-structure/ are intentionally left as-is (they are templates published into new applications, not autoloaded framework code) and remain excluded from the classmap.

Fixed

  • Cache: Repository::remember() and remember_forever() now return the computed value on a cache miss instead of the boolean result of storing it.
  • Cache: Repository::pull() now returns the cached value (or the default when absent) instead of always returning the default.
  • HTTP Client: Pending_Request::retry() now applies the configured delay between retries (the value was stored under a key that send() never read, so retries always ran with no delay).
  • HTTP: Response now serializes Jsonable and Arrayable payloads via to_json()/to_array() instead of json_encode()-ing the raw object.
  • HTTP: Request::offsetExists() no longer throws a TypeError when the request has no route parameters set.
  • HTTP: Route::get_request_parameters() no longer fatals when route parameters are unset; it returns an empty array.
  • HTTP: bearer_token() now returns null for non-Bearer Authorization headers instead of the raw header value.
  • Database: Builder::without() now removes eager-loaded relations correctly (it compared array keys instead of values and removed nothing).
  • Database: Reading a queued term attribute now returns all queued terms instead of only the first.
  • Database: Has_One_Or_Many::save() no longer issues a spurious query (and possible fatal) via $model->first() when resolving the object name.
  • Queue: The WordPress provider now sets job locks to an absolute expiry timestamp, so locked jobs are no longer treated as immediately unlocked.
  • Queue: The scheduler now caps the number of scheduled batches at max_concurrent_batches instead of over-scheduling.
  • Console: Application::test() now passes the command name (not the command instance) to the tester.
  • Console: option() no longer discards falsy option values (e.g. 0, '', false) in favour of the default.
  • Support: defer() now finishes the request before running the deferred callback.
  • Support: Stringable::split() defaults to an unlimited split (-1) so it actually splits on a regex pattern.
  • Support: Str::mask() now respects the supplied encoding when building the trailing segment.

v1.20.0

Choose a tag to compare

@github-actions github-actions released this 11 Jun 13:49
1ed1841

Added

  • Added support for a configurable wp-content directory name via the WP_CONTENT_DIR_NAME environment variable.
    Mantle previously hard-coded wp-content when detecting whether the codebase already lives inside a WordPress installation and when resolving the installation root. This broke custom layouts such as Bedrock (which uses app). The directory name now defaults to wp-content and can be overridden with WP_CONTENT_DIR_NAME. Setting it to a value that does not appear in the project path also lets a plugin/theme that lives inside a WordPress install opt into an isolated test installation.

Changed

  • The mantle-framework/testing package is now fully PSR-4 compliant: files and directories were renamed to match their class/trait names. Class and trait names are unchanged, so this is not a breaking change.

v1.19.4

Choose a tag to compare

@github-actions github-actions released this 08 Jun 15:05
536effa

Fixed

  • Preserve $_wp_post_type_features between tests in Preserves_Globals.

    When a test called unregister_post_type(), the post type itself was restored from the snapshot on the next test, but its features (title, editor, etc.) were not. post_type_supports() then returned false for the supposedly-restored post type.

Changed

  • Pin symfony/dom-crawler to ^7.4.12.

v1.19.3

Choose a tag to compare

@github-actions github-actions released this 20 Apr 15:32
d37a354

Fixed

v1.19.2

Choose a tag to compare

@github-actions github-actions released this 10 Feb 15:28
7a786ec

Fixed

  • Fixed issue with class not being found because of case-sensitivity in the autoloader on some filesystems.

v1.19.1

Choose a tag to compare

@github-actions github-actions released this 05 Feb 17:22
d5e3447

Fixed

  • Fixed potential issue with bad typing on the Query Monitor package.

v1.19.0

Choose a tag to compare

@github-actions github-actions released this 30 Jan 16:16
502eec7

Fix issue introduced in v1.18.1 with packages being moved to require-dev.
New projects that depend on alleyinteractive/mantle-framework should require on the newly created mantle-framework/testing-dependencies package. Projects that depend on mantle-framework/testkit are not affected. Because mantle-framework/testing-dependencies also requires PHPUnit, you can also drop that as a dependency if you were requiring it directly.

To upgrade your project, run the following commands:

# If you were requiring PHPUnit directly. 
composer remove phpunit/phpunit --dev

# Require the new testing dependencies package. 
composer require alleyinteractive/mantle-framework/testing-dependencies --dev

Projects that depend only on Mantle Testkit (mantle-framework/testkit) are not affected.

v1.18.2

Choose a tag to compare

@github-actions github-actions released this 29 Jan 16:21
ec82ec3

Fixed

  • Fix issue with query monitor throwing a fatal error with a miss-matched type.

v1.18.1

Choose a tag to compare

@github-actions github-actions released this 28 Jan 21:39
d17ae14

Changed

  • Moved spatie/phpunit-snapshot-assertions to require-dev for the root package.