Skip to content

Releases: rowanhill/wiremock-php

Fix PHP 8.2 deprecation warnings

15 Jan 16:10
Compare
Choose a tag to compare

PHP 8.2 deprecated the use of "${var}" string interpolation (preferring "{$var}"). This is a minor release to update one or two places in the wiremock-php codebase using the deprecated syntax, to avoid deprecation warnings.

Update to WireMock 2.35 API

19 Nov 10:35
Compare
Choose a tag to compare

This release brings new features available in the WireMock 2.35 JSON API:

  • Matching values with notContaining

Note that this release brings the major internal changes of version 2.33.1-RC1 to a stable release for the first time. Please report any bugs you may encounter!

Replace Symfony with a custom serde solution

03 Jul 14:27
Compare
Choose a tag to compare

Historically, wiremock-php has serialized PHP objects to JSON by a) translating to an intermediate form of associative arrays, then b) using json_encode. Similarly, deserialization was performed by a) using json_decode to produce an intermediate form of associative arrays, then b) translating to PHP objects. The translation between PHP objects and intermediate form associative arrays was performed by hand-written code that was both laborious and potentially error prone.

Release 2.33.0 replaced this translation code with the Symfony serializer library (heavily modified through subclassing and other hooks). This introduced a dependency on Symfony, however, which wasn't ideal.

This release replaces the Symfony serializer with a custom build serializer. This avoids the boilerplate code in the wiremock-php classes without introducing any production dependencies - albeit at the cost of introducing the complexity of a custom JSON serializer/deserializer!

Due to the wide-ranging nature of this change, this release is only at Release Candidate stability. The intent is to release this at production stability soon, if the RC doesn't cause problems - please report any issues encountered using this version.

This release includes no functional changes.

Update to WireMock 2.33 API

09 Apr 15:52
Compare
Choose a tag to compare

This release brings new features available in the WireMock 2.33 JSON API:

  • Resetting individual scenario states with resetScenario
  • Directly setting the state of a scenario with setScenarioState

Note that WireMock 2.33.0 was released with a regression in the JSON API that removed the name field from returned scenario objects. This causes an incompatibility with wiremock-php. This bug is patched in version 2.33.1 of WireMock.

Update to WireMock 2.32 API

31 Dec 15:45
Compare
Choose a tag to compare

This release brings new features available in the WireMock 2.32 JSON API:

  • Multi-host mocking with withHost
  • A new convenience method for JSON responses WireMock::jsonResponse
  • Get serve events for unmatched requests or requests matching a particular stub via passing a ServeEventQuery to getAllServeEvents
  • Proxy prefix removal with withProxyUrlPrefixToRemove

Update to WireMock 2.30 API

30 Dec 18:54
Compare
Choose a tag to compare

This release brings new features available in the WireMock 2.30 JSON API, namely the ability to configure webhooks to be called when a request is matched.

Update to WireMock 2.29 API

30 Dec 15:21
Compare
Choose a tag to compare

This release brings new features available in the WireMock 2.29 JSON API:

  • Date/time matching with the before, beforeNow, equalToDateTime, isNow, after, and afterNow static methods on WireMock. See also the offset unit and truncation type consts on DateTimeMatchingStrategy
  • Logical "and" and "or" of other matchers with the and and or static methods on WireMock, plus the and and or instance methods on matcher types.

As of this release, PHP 7.0+ is a required (to allow the keywords 'and' and 'or' in method names) dependency of wiremock-php.

Update to WireMock 2.27 API

25 Jul 15:34
Compare
Choose a tag to compare

This release brings new features available in the WireMock 2.27 JSON API:

  • When matching XML bodies with WireMock::equalToXml it's possible to exempt specific XmlUnit comparison types with exemptingComparisons. Valid values are are available as consts in WireMock\Client\XmlUnitComparisonType.

Update to WireMock 2.25 API

03 Nov 20:25
Compare
Choose a tag to compare

This release brings new features available in the WireMock 2.25 JSON API:

  • Removing serve events from the journal with WireMock::removeServeEvent, WireMock::removeServeEvents, and WireMock::removeEventsByStubMetadata

Update to WireMock 2.22 API

23 Mar 12:49
Compare
Choose a tag to compare

This release brings new features available in the WireMock 2.22 JSON API:

  • Multi-stub importing with WireMock::importStubs (and WireMock::stubImport)
  • XMLUnit placeholders in equalToXml