Eloquent Phony Versions Save

Mocks, stubs, and spies for PHP.

2.0.0

6 years ago

See the migration guide for detailed upgrade information.

  • [BC BREAK] PHP 5 is no longer supported (#216).
  • [BC BREAK] HHVM is no longer supported (#216, #219).
  • [BC BREAK] Removed inOrderSequence, checkInOrderSequence, anyOrderSequence, and checkAnyOrderSequence from the facade (#215).
  • [BC BREAK] Stubs created outside of a mock now have their "self" value set to the stub itself, instead of the stubbed callback (#226).
  • [NEW] Implemented anInstanceOf() (#220).
  • [NEW] Implemented emptyValue() (#218).
  • [IMPROVED] Support for PHP 7.2 features, including the object typehint (#224).
  • [IMPROVED] Improved the error message produced when a default return value cannot be produced, because the return type is a final class (#228).
  • [IMPROVED] Reduced the amount of output generated when mocks, stubs, and spies are encountered by var_dump() (#223).

1.0.1

6 years ago
  • [FIXED] Matcher verification no longer uses deprecated each() function (#217).

1.0.0

7 years ago
  • [BC BREAK] Third-party test framework integrations have been moved to separate Composer packages (#216).
  • [BC BREAK] Dropped support for Counterpart, Mockery, Phake, and Prophecy matchers (#216).

Migrating to 1.x

No code changes should be required, but in some cases, the Composer package name and version constraint will need to be updated:

  • If you're using Phony under PHPUnit:
    • Change the Composer package from eloquent/phony to eloquent/phony-phpunit.
    • Pick the appropriate version constraint for the version of PHPUnit you intend to use. See the eloquent/phony-phpunit repository for more information.
  • If you're using Phony under Peridot:
    • If you were using eloquent/peridot-phony, change the Composer package to eloquent/phony-peridot.
    • If you were using eloquent/phony, no changes are required, but consider trying eloquent/phony-peridot for the added auto-wired mock support. See the eloquent/phony-peridot repository for more information.
  • If you're using Phony under SimpleTest, change the Composer package from eloquent/phony to eloquent/phony-simpletest.
  • If you're using Phony under Pho, change the Composer package from eloquent/phony to eloquent/phony-pho.
  • For other frameworks, or standalone use, no changes are required.

0.14.7

7 years ago
  • [FIXED] The "last error" state is now cleared when using the feature detector (#209, #214).

0.14.6

7 years ago
  • [FIXED] Partial mocks of abstract functions with return types now work asintended (#212).
  • [FIXED] Fixed regression of #203 and #204.

0.14.5

7 years ago
  • [FIXED] Mock handle substitution fixed for threw() and receivedException() verifications (#211).
  • [IMPROVED] Inline exporter now uses tilde (~) to indicate truncated content (#210).
  • [IMPROVED] Refactored the feature detector.

0.14.4

7 years ago
  • [FIXED] Fixed mocking of classes with self return type (#208).

0.14.3

7 years ago
  • [FIXED] Suppress posix_isatty warnings that occur when PHPUnit process isolation is in use (#207 - thanks @keksa).

0.14.2

7 years ago
  • [FIXED] Fixed nullable return type support for newer PHP 7.1 release candidates (#206).

0.14.1

7 years ago
  • [FIXED] Checking for nullable type support no longer causes fatal errors under HHVM (#203, #204 - thanks @shadowhand).