Releases: Firehed/mocktrine
0.8.0 - improve compatibility with current PHP versions
This release updates the minimum PHP requirement to 8.2, the lowest version with security support as of writing. It fixes a deprecation warning in 8.5+.
What's Changed
- Bump CI dependencies by @Firehed in #45
- Update to only current+upcoming PHP versions by @Firehed in #46
- Update PHPUnit to more modern versions by @Firehed in #47
- Update PHPStan to version 2 by @Firehed in #50
- Update supported PHP versions by @Firehed in #51
- Use a terser composer step in ci by @Firehed in #52
- Maximize feedback from unit tests in CI, fix warnings by @Firehed in #53
- Fix deprecation warning with no-op PHP by @Firehed in #54
Full Changelog: 0.7.0...0.8.0
0.7.0 - Support count() on repository
What's Changed
Full Changelog: 0.6.0...0.7.0
0.6.0 - Improve support for new PHP features
This release focuses on improving interoperability with newer PHP features; in particular, readonly properties. Additionally, newer versions of various Doctrine libraries are now supported, further improving compatibility.
There was also significant enhancement to internal testing, particularly for the Attribute driver.
What's Changed
- Drop dependency of docblock parser library by @Firehed in #32
- Update PHPStan by @Firehed in #34
- Expand to PHPUnit 10 by @Firehed in #35
- Add tests for interacting with Attribute driver by @Firehed in #36
- Prevent crash when generating ids that have native type info by @Firehed in #37
- Test interactions with readonly ids by @Firehed in #38
- Expand supported versions of doctrine/annotations by @Firehed in #39
- Expand remaining dependency versions by @Firehed in #40
Full Changelog: 0.5.0...0.6.0
0.5.0 - Support for mapping drivers
This release replaces the internal annotation parsing with Doctrine's own mapping drivers. What this means for you:
- Entities mapped by XML or Yaml are now supported
- The (not yet documented as of writing) Attribute driver for PHP 8 should also work
- Any other custom mapping should also work
- By default, the library will continue to use "simple" annotations
Possible breaking changes:
- Previously, abstract classes were not validated correctly for use of the
MappedSuperclassannotation. Under normal circumstances this is a non-issue, but incorrectly-defined test mocks that could have slipped through will now cause an error. To fix this, ensure theMappedSuperclassentity mapping flag is set correctly - Entities without an
Idfield mapped will now throw an exception. This is also consistent with Doctrine's own behavior.
In most cases, neither of these should be a breaking change - they should only come up if Doctrine wasn't correctly configured in the first place.
See the README for an example of how to provide an alternative driver to support other mapping formats.
0.4.1
0.4.0 - Selectable implementation
This adds support for the Selectable interface on repositories, which allows use of ->matching(Criteria), including complex conditionals.
0.3.0 - Rewrite of internals
This is effectively a from-scratch rewrite of all the internals. The trait-based implementation has been removed, in favor of two new concrete classes which implement the "core" Doctrine interfaces: Doctrine\ORM\EntityManagerInterface and Doctrine\Persistence\ObjectRepository.