Skip to content

Releases: Firehed/mocktrine

0.7.0 - Support count() on repository

30 Jan 03:28
a9ccce6
Compare
Choose a tag to compare

What's Changed

  • Add count method to InMemoryRepository by @Firehed in #42

Full Changelog: 0.6.0...0.7.0

0.6.0 - Improve support for new PHP features

17 Jul 21:02
2b774fe
Compare
Choose a tag to compare

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

05 Aug 19:31
648499e
Compare
Choose a tag to compare

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 the MappedSuperclass 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

10 Mar 22:38
b866aed
Compare
Choose a tag to compare

Bug fix release:

  • resolves an inconsistency with the actual ORM where the fields passed to an ORDER BY clause could skip mapping validation in some cases

0.4.0 - Selectable implementation

15 Dec 00:12
f345490
Compare
Choose a tag to compare

This adds support for the Selectable interface on repositories, which allows use of ->matching(Criteria), including complex conditionals.

0.3.0 - Rewrite of internals

11 Sep 19:21
620da10
Compare
Choose a tag to compare

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.