Releases: alleyinteractive/mantle-framework
Releases · alleyinteractive/mantle-framework
v1.14.1
v1.14.0
Added
- Added
laravel/serializable-closureas a dependency tomantle-framework/supportto support serialization of closures. - Added support for
Mantle\Types\Validatorattributes on service providers to conditionally boot them based on custom logic. - Added
Mantle\Types\Attributes\AdminandMantle\Types\Attributes\Requestvalidator attributes.
Changed
- Bumped minimum PHPUnit version to
10.0.7.
New projects should not pin a version and inherit the latest from the framework ormantle-framework/testing. - 📌 Potentially breaking change: 📌 Backup and restore WordPress globals (
wp_post_statuses,wp_post_types, andwp_taxonomies) before any test runs and then restore it before each test to prevent side effects from tests that modify these globals. It will also ensure that meta, post types, and taxonomies that are registered oninit(before any test has run when WordPress is booted) are preserved between tests. Previously, meta keys were always unregistered between tests and any post types or taxonomies registered during a test would persist to the next test.
Note: This is not supported in PHPUnit versions prior to 10. - Post meta is no longer unregistered on tearDown. You can now opt into unregistering all meta using the
Unregister_All_Meta_Keystrait. - The framework is now compatible with PHPStan level 8. Many types have been added throughout the framework to support this.
v1.13.4
v1.13.3
No changes, re-released to fix a bad tag.
v1.13.2
Fixed
- Fixed issue where
is_dir()is called with multiple arguments in the console kernel.
v1.13.1
Fixed
- Fixed issue with
wpmu_delete_blog()not being loaded before use.
v1.13.0
Added
- Added
scheduled()state to post factory to create scheduled posts. - Added
create_ordered_set_and_get()method to factories to create and retrieve an ordered set of models. - Added
collect_many()andcollect_many_and_get()methods to factories to create multiple models and return them as a collection. - Added support for passing callables as model attributes in factories.
- Added
PermalinkStructureattribute to set the permalink structure during tests. - Added
scheduled()state to post factory to create scheduled posts. - Added
create_ordered_set_and_get()method to factories to create and retrieve an ordered set of models. - Added
collect_many()andcollect_many_and_get()methods to factories to create multiple models and return them as a collection. - Added support for passing callables as model attributes in factories.
- Added
PermalinkStructureattribute to set the permalink structure during tests.
Changed
- Clear
$_COOKIEand$_SESSIONin addition to other superglobals when cleaning the global scope between tests. - Added
Deprecationattribute to some already-deprecated methods in the framework to better indicate their deprecation status.
Fixed
- Fixed issue where
Mantle\Types\Validatoris used withinmantle-framework/supportbutmantle-framework/typesis not a dependency.
v1.12.4
Fixed
- Fixed issue with unserialization of cached HTTP client requests causing errors due to uninitialized properties (again).
v1.12.3
Fixed
- Fixed issue with unserialization of cached HTTP client requests causing errors due to uninitialized properties.
v1.12.2
Fixed
- Fixed issue with the
urlproperty inMantle\Http_Client\Responsenot being initialized properly.