Repository navigation
Conversation
Add a v4_plugins Behat suite for the pact-compatibility-suite plugin features (matt, csv, avro and protobuf content, and matt/gRPC transports). The features are read from the checkout named by PACT_COMPAT_SUITE, as they are not in the pinned submodule yet; the suite is skipped when it is not set, and @wip scenarios are excluded. The steps call pact_ffi directly, run the providers as PHP subprocesses (php -S, a line-based TCP server and a minimal h2c gRPC server), and set a transport interaction's transport by editing the pact file, since the FFI has no call for it. A v4-plugins CI job installs the plugins and runs the suite when the PACT_COMPAT_SUITE_PLUGINS_REF repository variable names a suite ref. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report for CI Build 40940181002Coverage remained the same at 92.475%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
matt is not in the pact plugin repository index, so `pact plugin install matt` exits 1 without output. Install it from the mefellows/pact-matt-plugin v0.1.1 release instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ault The v4-plugins job only ran when PACT_COMPAT_SUITE_PLUGINS_REF was set. It now checks out YOU54F/pact-compatibility-suite feat/plugin-features unless PACT_COMPAT_SUITE_PLUGINS_REPOSITORY or PACT_COMPAT_SUITE_PLUGINS_REF override it, so it runs on every PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the V4 plugin features to the pact-php compatibility suite:
compatibility-suite/suites/v4/plugins.phpandtests/Context/V4/PluginContext.phpphp -S, a line-based TCP server, and a minimal h2c gRPC serverv4-pluginsCI jobDepends on the suite branch
feat/plugin-features(YOU54F/pact-compatibility-suite#1). Its features are read fromPACT_COMPAT_SUITE, and the run is skipped when that is unset or has nofeatures/V4/plugins. Needs plugins matt 0.1.1, csv 0.0.6, avro 0.1.3 and protobuf 0.8.0 installed.The
v4-pluginsCI job runs only when thePACT_COMPAT_SUITE_PLUGINS_REFrepo variable is set, until the suite submodule has the features.Results
src/changes.Limitations
No generic plugin entry point in the DSL. The pieces are generic:
AbstractPluginPactDrivercallsusingPlugin(name, version).PluginBodyDrivercallsinteractionContents.MockServer::getTransport()/getTransportConfig()callcreateMockServerForTransport.But they are only reachable by subclassing per plugin (
Plugins/Csv,Protobuf,Sse; there is none for matt or avro), and there's no public "use plugin X@version, transport Y" entry point. So these steps callPhpPact\FFI\Clientdirectly, and the suite does not exercise the plugin DSL layer. A small generic driver/factory taking the plugin name, version and transport would let the runner, and users of plugins with no wrapper, stay on the DSL.The gRPC client is curl
--http2-prior-knowledge. The protobuf mock server listens on::1only.Core suite gaps (not in this PR): 25 fail
CI
The
v4-pluginsjob in.github/workflows/compatibility-suite.ymlchecks outYOU54F/pact-compatibility-suite@feat/plugin-features(overridable with the repository variablesPACT_COMPAT_SUITE_PLUGINS_REPOSITORY/PACT_COMPAT_SUITE_PLUGINS_REF), installs matt 0.1.1, csv 0.0.6, avro 0.1.3 and protobuf 0.8.0, and runsbehat --suite=v4_plugins(48 scenarios) withPACT_COMPAT_SUITEset.🤖 Generated with Claude Code