Releases: alleyinteractive/mantle-framework
Releases · alleyinteractive/mantle-framework
v1.4.1
v1.4.0
📢 Minimum PHP version is now 8.2. The framework supports 8.2 - 8.4.
Added
- ✨ Experimental feature ✨: Use the home URL as the base URL for testing rather than
WP_TESTS_DOMAIN
. This can be enabled by calling thewith_experimental_testing_url_host()
method of the installation manager or by setting theMANTLE_EXPERIMENTAL_TESTING_USE_HOME_URL_HOST
environment variable.
Once enabled, the home URL will be used as the base URL for testing rather the hard-codedWP_TESTS_DOMAIN
. It will also infer the HTTPS status from the home URL. - Added
with_option()
/with_home_url()
/with_site_url()
methods to the installation manager. - Add a
without_local_object_cache()
method to prevent theobject-cache.php
drop-in from being loaded locally. - Added a better
dump()
method to the response object when testing HTTP requests that will dump the request/response to the console.
Changed
- Removed support for PHP 8.1. The minimum PHP version is now 8.2.
- For projects that require PHPUnit 9, the
phpunit/phpunit
version is now set to^9.6.22
. - Upgraded to Symfony 7.0 packages.
- Disable
spatie/once
's cache if found during unit testing. - Ensure that the
QUERY_STRING
server variable is set when testing HTTP requests.
Fixed
- Ensure that built-in taxonomies properly register their rewrite rules during testing.
v1.3.3
Added
- Added
Mantle\Support\Helpers\capture
helper to capture output from a callback using output buffering.
Changed
- Updated the
Mantle\Support\Helpers\defer
helper to be able to used outside
of the Mantle Framework via theshutdown
hook.
Fixed
- Allow
Filter
/Action
attributes to be used multiple times on the same method.
v1.3.2
v1.3.1
v1.3.0
Added
- Define a
thumbnail
relationship on the post model that when defined will return an attachment model. - Added count support to
assertSee()
for responses andassertContains()
for HTML string assertions. - Added
assertContains()
to response assertions.
Changed
- Post factories that are passed a term slug to
with_terms()
will create the term if it doesn't exist by default. This can be disabled by calling thecreate_terms()
method on the factory or replacing the with terms method call withwith_terms_only_existing()
.
Fixed
- Attachment factories now properly use the
Attachment_Factory
class. - Ensure that the
delete()
method of the HTTP Client doesn't set a body by default. - Ensure that
with_terms()
can support an array of term slugs when passed with a taxonomy index. - Ensure that framework configuration respects the application configuration.
- Ensure that collections can properly implode
Stringable
objects.
v1.2.0
Added
- Add support for dispatching jobs to the queue after the current response has
been sent. - Allow the block factory to override text when generating blocks.
- Added new
defer()
helper. - Added
Cache::flexible()
method to add SWR support to the cache (docs) - Added support for parallel unit testing with
brianium/paratest
(in beta). - Added dynamic creation of post type/taxonomy factories.
- Added
Reset_Server
trait to reset the server between tests. - Add
with_https()
to control if the request being tested is over HTTPS. - Add
andReturnBoolean()
andandReturn( fn ( $value ) => ... )
support to
action/filter expectations - Add cached HTTP response support using the
cache()
method.
Changed
- Breaking: Http Client pools should now be built using
->method()
and->url()
instead. - Dropped support for Redis as a cache backend in favor of the default object
cache drop-in. - Allow returning falsey from
Collection::map_to_dictionary()
.
v1.1.3
Added
- Added a
with_image()
helper to mocked HTTP responses. - Added a
is_blob()
andis_file()
helper toMantle\Http_Client\Response
. - Added
with_real_thumbnail()
method to post factory for creating posts with
real underlying thumbnail files.
Changed
- Added support for faking specific HTTP requests by method.
- Added helper for fluently building HTTP sequence responses.
Fixed
- Fixed an issue with taxonomy registration not returning an array.