Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Prophecy Laravel Package

phpspec/prophecy

Highly opinionated yet flexible PHP mocking framework for unit tests. Create test doubles with a Prophet, define expected calls and return values, then reveal mocks and verify predictions. Works with PHPUnit and other frameworks; requires PHP 7.2+.

View on GitHub
Deep Wiki
Context7
v1.26.0

Added:

  • Add support for phpdocumentor/reflection-docblock v6 (@mspirkov)
v1.25.0

Added:

  • Add support for PHPUnit 13 (@Jean85)
v1.24.0

Added:

v1.23.1

Changed:

  • Refactor the ProphecyComparator to use composition instead of extending internal comparator classes (@stof)

Full Changelog: https://github.com/phpspec/prophecy/compare/v1.23.0...v1.23.1

v1.23.0

Removed:

  • Remove support for PHP lower than 8.2 (@Nek-)

Added:

  • Add support for doubling classes using intersection types and DNF types (@Nek-)

Fixed:

  • Fix deprecation for SplObjectStorage changes in PHP 8.5 (@Nek-)

Changed:

  • Improve error message for unsupported default return values (@stof)
v1.22.0

1.22.0

Removed:

  • Support for PHP 7.2 and 7.3 (@jean85)
v1.21.0

Added:

Add support for PHPUnit 12 (@jean85)

v1.20.0

Added:

Fixed:

  • Fix support for doubling methods using an enum case as default value of a parameter (@jdreesen)
  • Fix deprecation when doubling a class with constructor parameters (@singinwhale, @W0rma)
  • Fix deprecation warning when using phpdocumentor/reflection-docblock 5.4+ (@jrfnl)
v1.19.0

Added:

  • Allow sebastian/comparator and sebastian/recursion-context 6 by @Jean85

Full Changelog: https://github.com/phpspec/prophecy/compare/v1.18.0...v1.19.0

v1.18.0
  • [added] Add support for PHP 8.3 [@rajeshreeputra]
  • [changed] Improve the error when using return types that Prophecy does not support for mocking [@stof]
  • [changed] Add more precise type for static analysis [@stof]
  • [fixed] Error when comparing object arguments with integers [@lucassabreu]
  • [changed] Add PHP 8.2 to test matrix [@Jean85]
  • [Added] Allow sebastian/comparator and sebastian/recursion-context 5, and phpunit/phpunit 10 [@Jean85]
  • [docs] Switch travis status badge to GHA one [@michalbundyra]
v1.17.0
  • [added] Add generic types for ProphecyInterface and ObjectProphecy [@stof]
  • [added] Add the conditional return type for ObjectProphecy::getMethodProphecies [@stof]
  • [added] Add support for doctrine/instantiator 2.0 [@stof]
  • [added] Add the ability to customize the __toString representation of a CallbackToken [@ian-zunderdorp]
  • [changed] Remove support for instantiating a MethodProphecy without its arguments [@stof]
  • [deprecated] Deprecate \Prophecy\Comparator\Factory as sebastian/comparator v5 makes it parent class final [@stof]
v1.16.0
  • [added] Allow install with PHP 8.2 [@gquemener]
  • [added] Use shorter object IDs for object comparison [@TysonAndre]
  • [added] Support standalone false,true and null types [@kschatzle]
  • [added] Support doubling readonly classes [@gquemener]
  • [fixed] Remove workarounds for unsupported HHVM [@TysonAndre]
  • [fixed] Clear error message when doubling DNF types [@kschatzle]
v1.15.0
  • [added] Support for the static return type [@denis-rolling-scopes]
  • [fixed] Add return types for Comparator implementations to avoid deprecation warnings from Symfony's DebugClassLoader [@stof]
1.14.0

1.14.0 / 2021/09/16

  • [added] Support for static closures in will and should [@ntzm]
  • [added] Allow install on PHP 8.1 (with test suite fixes) [@javer]
  • [added] Support for the 'never' return type [@ciaranmcnulty]
  • [fixed] Better error message when doubling intersection return types [@ciaranmcnulty]
1.13.0
  • [added] willYield can now specify a return value [@camilledejoye]
  • [added] Prophecy exception interfaces are explicitly Throwable [@ciaranmcnulty]
  • [fixed] Argument::in() and notIn() now marked as static [@tyteen4a03]
  • [fixed] Can now double unions containing false [@ciaranmcnulty]
  • [fixed] Virtual magic methods with arguments are now doublable in PHP 8 [@ciaranmcnulty]
1.12.2
  • [fixed] MethodNotFoundException sometimes thrown with wrong class attached [@ciaranmcnulty]
1.12.1
  • [fixed] Incorrect handling of inherited 'self' return types [@ciaranmcnulty]
1.12.0
1.11.1
  • [fixed] can't double objects with self type hints (@greg0ire)
  • [fixed] cloned doubes were not loosely comparable (@tkulka)
1.11.0
  • [changed] dropped support for PHP versions earlier than 7.2 (@ciaranmcnulty)
  • [fixed] removed use of Reflection APIs deprecated in PHP 8.0 (@Ayesh)
v1.10.3

[fixed] removed fatal error when phpdocumentor/reflection-docblock 5 parses an invalid [@method](https://github.com/method) tag (@stof)

v1.10.2

[added] support for new versions of (@sebastianbergmann)

1.10.1
  • [fixed] identical callables no longer match as arguments (@ciaranmcnulty)
1.10.0
  • [added] shouldHaveBeenCalled evaluation happens later so un-stubbed calls don't throw (@elvetemedve)
  • [added] methods can now be doubled case-insensitively to match PHP semantics (@michalbundyra)
  • [fixed] reduced memory usage by optimising CachedDoubler (@DonCallisto)
  • [fixed] removed fatal error nesting level when comparing large objects (@scroach)
1.9.0
  • [added] Add willYield feature to Method Prophecy(@tkotosz)
  • [fixed] Allow MethodProphecy::willThrow() to accept Throwable as string (@timoschinkel )
  • [fixed] Allow new version of phpdocumentor/reflection-docblock (@ricpelo)
1.8.1
  • [fixed] Don't try to patch final constructors (@NiR)
1.8.0
  • Support for void return types without explicit will (@crellbar)
  • Clearer error message for unexpected method calls (@meridius)
  • Clearer error message for aggregate exceptions (@meridius)
  • More verbose shouldBeCalledOnce expectation (@olvlvl)
  • Ability to double Throwable, or methods that extend it (@ciaranmcnulty)
  • [fixed] Doubling methods where class has additional arguments to interface (@webimpress)
  • [fixed] Doubling methods where arguments are nullable but default is not null (@webimpress)
  • [fixed] Doubling magic methods on parent class (@dsnopek)
  • [fixed] Check method predictions only once (@dontub)
  • [fixed] Argument::containingString throwing error when called with non-string (@dcabrejas)
1.7.6
1.7.5
  • Support for object return type hints (thanks @greg0ire)
1.7.4
1.7.3
  • Fix SplInfo ClassPatch to work with Symfony 4 (Thanks @gnugat)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport