> For the complete documentation index, see [llms.txt](https://senselab.gitbook.io/senselab-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://senselab.gitbook.io/senselab-docs/vendor/pact-foundation/pact-php/developing.md).

# 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'`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://senselab.gitbook.io/senselab-docs/vendor/pact-foundation/pact-php/developing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
