Skip to content

Releases: bovigo/callmap

2.1.0 - Variadic is unlimited

20 Jun 18:39

Choose a tag to compare

  • added support for variadic arguments, fixes #9

2.0.1 - The key to null

30 Dec 09:51

Choose a tag to compare

  • fixed bug that mapping a return value to null called original method instead of returning null

2.0.0 - Return of the Typehints

29 Dec 13:22

Choose a tag to compare

Changes:

  • raised minimum required PHP version to 5.6.0
  • added support for PHP 7 return type hints
  • added support for argument verification with bovigo/assert
  • bovigo\callmap\Verification is now automatically blacklisted in PHPUnit and will not appear in PHPUnit error stacks any more

Upgrade notice:

This release doesn't contain any breaking changes from an API perspective, so it should work by simply upgrading the required version in your composer.son file. The reason this release bumps the major version is the removal of support for PHP 5.4 and 5.5.

1.1.0 - Enterprise proven.

29 Dec 13:07

Choose a tag to compare

  • added support for argument verification with xp-framework/core

1.0.0 - Stability is a virtue, too

29 Dec 13:06

Choose a tag to compare

  • fixed conversion spec in parameter error message

0.6.1 - Minor minor bug fixes

29 Dec 13:05

Choose a tag to compare

  • fixed bug with optional default value null in user defined classes

0.6.0 - Minor bug fixes

29 Dec 13:04

Choose a tag to compare

  • failing argument verification now also lists the name of the argument, not just its position, fixes #2
  • fixed bug with optional array parameters
  • onConsecutiveCalls() now falls back to the default return value in case a method gets invoked more often than results are defined
  • fixed #4: onConsecutiveCalls() should allow callables which are executed
  • fixed #5: returning a callable requires another callable by providing bovigo\callmap\wrap()

0.5.0 - Verify all the calls

29 Dec 13:03

Choose a tag to compare

  • added bovigo\callmap\verify() as possibility to verify an expected call amount as well as expected arguments
  • retrieving call for a method which doesn't exist or is not applicable for mapping now throws an \InvalidArgumentException
  • retrieving received arguments for a method which doesn't exist or is not applicable for mapping now throws an \InvalidArgumentException
  • changed API status for bovigo\callmap\Proxy::callsReceivedFor() to internal, use verify()->was*() instead
  • changed API status for bovigo\callmap\Proxy::argumentsReceivedFor() to internal, use verify()->received*() instead

0.4.0 - Your argument is invalid

29 Dec 13:02

Choose a tag to compare

  • calling bovigo\callmap\NewInstance::*() with a final class now throws an \InvalidArgumentException
  • passing a method within the callmap to bovigo\callmap\Proxy::mapCalls() which doesn't exist or is not applicable for mapping now throws an \InvalidArgumentException

0.3.0 - Automate returnSelf()

29 Dec 13:02

Choose a tag to compare

  • added automatic return of instance when return type hint denotes a type within the type hierarchy of the proxied class
  • renamed bovigo\callmap\Proxy::argumentsReceived() to bovigo\callmap\Proxy::argumentsReceivedFor()
  • fixed missing & for parameters that must be passed by reference