Releases: Firehed/mocktrine
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
MappedSuperclass
annotation. 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 theMappedSuperclass
entity mapping flag is set correctly - Entities without an
Id
field 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
.