pact-foundation / pact-php

PHP version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project
Apache License 2.0
273 stars 92 forks source link

Formatter factory method #599

Closed tienvx closed 5 months ago

tienvx commented 5 months ago

Depend on:

Apply Bridge and Factory Method design patterns to refactor formatters

Here is the full diagram:

matchers-formatters

YOU54F commented 5 months ago

Nice change! It's a biggie so appreciate you splitting out the two PR's prior, as it helped me focus on them.

I'm looking at the end user interface changes in the examples, and that looks make it easier (removing an import and having as a option), considering your touched ~140 files, have minimal changes in your tests and everything green makes me a very confident person.

Appreciate the diagram!

So in a nutshell does this make it easier to maintainers/contributors to maintain/extend these interfaces in future? Whats the big selling point of moving to the new pattern.

Looks good to me though, haven't ran it locally but he have 💚 ci

tienvx commented 5 months ago

So in a nutshell does this make it easier to maintainers/contributors to maintain/extend these interfaces in future?

Yes, you are correct. This is the whole point of this PR.

tienvx commented 5 months ago

Self-reviewed