Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
b45e9c0
Use Rust FFI: Consumer
tienvx Dec 23, 2022
849efd5
Merge branch 'master' into use-rust-ffi-consumer
tienvx Jan 11, 2023
e1d49cc
Remove method BuilderInterface::writePact
tienvx Jan 11, 2023
0d7fe0a
Remove CHANGELOG.md. Add '@internal' to classes are not supposed to b…
tienvx Jan 15, 2023
0812b31
Add missing return type to method Matcher::regex
tienvx Jan 15, 2023
cf5144b
Add more details to UPGRADE-9.0.md
tienvx Jan 15, 2023
d20f1f5
Revert multiple values support in header and query parameter
tienvx Jan 16, 2023
7d57b25
Merge branch 'master' into use-rust-ffi-consumer
Feb 14, 2023
bb256ef
Support multiple values in header and query parameter
tienvx Mar 1, 2023
d6a9d0d
Update pact ffi library
tienvx Mar 1, 2023
ca46297
Rename method getCode to getHeader
tienvx Mar 2, 2023
39718b9
Revert breaking change that require to call createMockServer manually
tienvx Mar 12, 2023
ddc46e5
Remove composer/semver
tienvx Mar 2, 2023
5dae03a
Make sure every value of header and query parameter is string
tienvx Mar 14, 2023
52e9a99
Move exception message to exception
tienvx Mar 14, 2023
bff0f9b
Extract method getSpecification() to check for supporting plugin
tienvx Mar 14, 2023
312c45c
Extract, change visibility, and move methods to abstract class to sup…
tienvx Mar 14, 2023
e7675e6
Use Rust FFI: Support multiple provider states with params for intera…
tienvx Mar 7, 2023
1e0b409
Fix provider state without params not added
tienvx Mar 16, 2023
47b0a81
Remove jsonSerialize methods
tienvx Jan 5, 2023
2754f47
Rename pact to driver
tienvx Mar 17, 2023
18b85b2
Move log level config to trait for reusing
tienvx Mar 23, 2023
5a4b15f
Allow mock server write pact file
tienvx Mar 23, 2023
07c63ac
feat: arm64 linux/macos + x86 windows
YOU54F Apr 28, 2023
fd24111
Merge remote-tracking branch 'origin/master' into arm64_ruby
YOU54F Apr 28, 2023
f37c8ee
feat: use pact-ruby-standalone 2.0.0 release
YOU54F Apr 28, 2023
d7060a2
ci: test arm64 linux
YOU54F Apr 28, 2023
60ae161
Merge branch 'fix/display_stderr_on_publish_error' into arm64_ruby
YOU54F Apr 28, 2023
6ad0384
ci(test): describeVersion test bork on aarch64 linux?!!
YOU54F Apr 29, 2023
9b4aa27
chore: cs-lint:
YOU54F Apr 29, 2023
ed38782
ci: ruby aarch64 linux needs libyaml-dev dep
YOU54F Apr 29, 2023
25335fd
Merge branch 'master' into arm64_ruby
YOU54F Apr 29, 2023
072cc93
Merge branch 'master' into use-rust-ffi-consumer
tienvx May 3, 2023
29b33ec
Revert removing semver
tienvx May 3, 2023
a0302bc
Extract services and helpers
tienvx May 4, 2023
7fbc58d
Make PR smaller
tienvx May 4, 2023
ff2120f
Extract drivers and factories
tienvx May 4, 2023
420f4c2
Extract set up method
tienvx May 5, 2023
7f472fe
Simplify default interaction registry factory
tienvx May 5, 2023
c87dd62
Move methods from AbstractDriver to InteractionDriver and rename
tienvx May 5, 2023
53cef3d
Group assertions together for better readability
tienvx May 5, 2023
d5a4b83
Remove condition to make code shorter
tienvx May 5, 2023
6cf8128
Update ffi library to 0.4.4
tienvx May 5, 2023
156f989
Remove not useful annotation
tienvx May 5, 2023
bd8b751
Rename ffi service and move it to FFI namespace
tienvx May 6, 2023
d41e1ac
Assign result to variable before asserting
tienvx May 8, 2023
cc7f14c
Change type hint from 'mixed' to 'string|array|null'
tienvx May 8, 2023
dfaa021
Add @throws annotation to setPactFileWriteMode() method declaration b…
tienvx May 8, 2023
693daad
Rename FFI Proxy to Client
tienvx May 8, 2023
d960221
Extract interaction part drivers
tienvx May 8, 2023
770e6e0
Extract interaction contents drivers
tienvx May 9, 2023
29f7b4c
Extract interaction part traits for reusing
tienvx May 9, 2023
768b772
Allow sub-class access properties
tienvx May 9, 2023
a96c56a
Move common code back to MockServer for reusing. Remove methods from …
tienvx May 9, 2023
264018a
Move code from registry to driver
tienvx May 9, 2023
3a3afda
Switch term 'Driver' <--> 'Registry'
tienvx May 10, 2023
02b7fc3
Merge branch 'master' into use-rust-ffi-consumer
tienvx May 11, 2023
1d6d39e
Inject driver factory into builder
tienvx May 12, 2023
f844be0
Revert namespace change
tienvx May 12, 2023
d5d14e8
Use Rust FFI: Message Consumer
tienvx Dec 28, 2022
6aad456
Use Rust FFI: Provider
tienvx Jan 2, 2023
e96453f
Use Rust FFI: Stub Server
tienvx Jan 3, 2023
6d19fa8
Use Rust FFI: Offload process
tienvx Jan 3, 2023
e401847
Use Rust FFI: Remove pact broker
tienvx Mar 13, 2023
e799d37
Use Rust FFI: Allow set content type
tienvx Mar 15, 2023
6f53e7a
Default port zero
tienvx Mar 2, 2023
cbe6de1
Make mock server host and port optional
tienvx Mar 13, 2023
b373a32
Add generators and matchers
tienvx May 7, 2023
cd49913
Move endpoint from config to parameter
tienvx Mar 6, 2023
05fca68
Allow random port for stub server
tienvx Mar 6, 2023
194ad08
Fix stub server hang on too low log level
tienvx Apr 4, 2023
08d88cd
Merge branch 'add-generators-and-matchers' into all
tienvx May 12, 2023
18e0a8d
Merge branch 'use-rust-ffi-default-port-zero' into all
tienvx May 12, 2023
07011e3
Merge branch 'use-rust-ffi-move-endpoint-config' into all
tienvx May 12, 2023
2706eff
Merge branch 'use-rust-ffi-stub-server-random-port' into all
tienvx May 12, 2023
64399fe
test: v2.0.1 (pact-2.0.1) - pact-ruby-standalone
YOU54F May 18, 2023
7d0bb98
Merge branch 'master' into arm64_ruby
YOU54F May 18, 2023
9dbbde1
Fix stub server always load pact files from pact broker
tienvx May 29, 2023
6b07881
Merge branch 'offload-process' into all
tienvx May 29, 2023
444a84f
chore: update pact-ruby-standalone to 2.0.2
YOU54F Jul 10, 2023
64a99f6
deps(ci): create dependabot config
YOU54F Jul 12, 2023
7ebfafd
docs: releasing instructions
YOU54F Jul 12, 2023
a853e39
chore: lint test
YOU54F Jul 14, 2023
1965a1a
feat: MockServerConfig improvements - allow setting of defaults
slt Jun 12, 2023
be5dd8d
feat: Speed up pact-php - allow floats in healthcheck sleep
slt Jun 12, 2023
07b12f4
chore: round float to int microseconds for usleep
YOU54F Jul 14, 2023
4705ded
docs: update supported platform docs
YOU54F Jul 14, 2023
43d2e2c
Merge pull request #322 from pact-foundation/slt-fast
YOU54F Jul 14, 2023
8c56e16
Merge pull request #309 from pact-foundation/arm64_ruby
YOU54F Jul 14, 2023
e58fb5a
Merge pull request #321 from pact-foundation/docs/releasing
YOU54F Jul 14, 2023
20af428
Merge pull request #320 from pact-foundation/deps/dependabot
YOU54F Jul 14, 2023
036244d
Merge branch 'all' of github.com:tienvx/pact-php into tienvx-all
YOU54F Jul 24, 2023
498c2a8
chore: support aarch64 in pact-stub-server
YOU54F Jul 24, 2023
90c1005
ci: support for arm64 linux
YOU54F Jul 24, 2023
b8eafd3
chore(docs): add developer docs
YOU54F Jul 24, 2023
d0bad6c
Merge remote-tracking branch 'origin/master' into tienvx-all
YOU54F Jul 24, 2023
02a0951
Merge branch 'tienvx-all' into ffi
YOU54F Jul 24, 2023
bcdc7cc
chore(docs): update migration doc to reflect 10.x
YOU54F Jul 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
BUILD_TEST_TASK_TEMPLATE: &BUILD_TEST_TASK_TEMPLATE
arch_check_script:
- uname -am
install_script:
- composer install
cirrus_ci_macos_local_script: |
if [ "$(uname -s)" == 'Darwin' ] && [ "$CIRRUS_CLI" == 'true' ]; then
chmod +x vendor/bin/php-cs-fixer
chmod +x vendor/bin/phpstan
chmod +x vendor/bin/phpunit
chmod +x bin/pact-stub-server/pact-stub-server
fi
lint_script:
- composer run lint
static_analysis_script:
- composer run static-code-analysis
test_script:
- composer test

linux_arm64_task:
env:
COMPOSER_ALLOW_SUPERUSER: 1
matrix:
- VERSION: 8.2
- VERSION: 8.1
- VERSION: 8.0
container:
image: php:$VERSION
pre_req_script:
- apt update --yes && apt install --yes zip unzip git libffi-dev
- curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
- php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
- docker-php-ext-install sockets
- docker-php-ext-install ffi
version_check_script:
- php --version
<< : *BUILD_TEST_TASK_TEMPLATE

macos_arm64_task:
# https://www.markhesketh.com/switching-multiple-php-versions-on-macos/
env:
matrix:
- VERSION: 8.2
- VERSION: 8.1
- VERSION: 8.0
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
pre_req_script:
- brew install php@$VERSION composer
version_check_script:
- php --version
<< : *BUILD_TEST_TASK_TEMPLATE
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Dependabot Config

version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: pact-php

on:
push:
push:
pull_request:
# Once on the first of the month at 06:00 UTC
schedule:
Expand All @@ -27,6 +27,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- uses: ramsey/composer-install@v2
with:
Expand All @@ -48,6 +49,7 @@ jobs:
operating-system: [ ubuntu-latest, macos-latest, windows-latest ]
php: [ '8.0', '8.1', '8.2' ]
dependencies: [ 'lowest', 'locked' ]
timeout-minutes: 5

name: PHP ${{ matrix.php }} on ${{ matrix.operating-system }} with ${{ matrix.dependencies }} dependencies

Expand All @@ -58,8 +60,9 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: openssl, sockets, curl, zip
extensions: sockets, curl, zip, ffi
php-version: ${{ matrix.php }}
coverage: none

- name: Composer install
uses: ramsey/composer-install@v2
Expand Down
3 changes: 2 additions & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
->name('*.php');

$config = new PhpCsFixer\Config();
$config->setRules(['@PSR12' => true,
$config->setRules([
'@PSR12' => true,
'strict_param' => false,
'array_syntax' => ['syntax' => 'short'],
])
Expand Down
57 changes: 57 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Pact-PHP

## Pre Reqs

- PHP 8.x or greater
- FFI and Sockets extensions enabled in your php.ini

## Steps

1. Run `composer install`
1. This will install php dependencies to `vendor`
2. This will install pact libraries to `bin`
2. Run `composer test`
1. This will run our unit tests
3. Run `composer lint`
1. This will run the phpcs-lint
4. Run `composer fix`
1. This will correct any auto fixable linter errors
5. Run `composer static-code-analysis`
1. Run static code analysis

## CI Locally

### MacOS ARM

#### Pre Reqs

- MacOS ARM
- Tart.run
- Cirrus-CLI

#### Steps

Run all versions of PHP

- `cirrus run --output github-actions macos_arm64 -e CIRRUS_CLI=true`

Run a specified version of PHP

- `cirrus run --output github-actions 'macos_arm64 VERSION:8.2' -e CIRRUS_CLI=true`

### Linux ARM

#### Pre Reqs

- Docker
- x86_64 or arm64/aarch64 host

#### Steps

Run all versions of PHP

- `cirrus run --output github-actions linux_arm64`

Run a specified version of PHP

- `cirrus run --output github-actions 'macos_arm64 VERSION:8.2'`
Loading