Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ All code in this project MUST adhere to the coding standards, naming conventions

Key constraints include:

* PHP 7.4 as the minimum required version.
* PHP 7.4.12 as the minimum required version (PHP 7.4.0–7.4.11 have a known covariant return type bug that causes fatal errors with this codebase).
* PER Coding Style (extending PSR-12).
* Strict type hinting for all parameters, return values, and properties.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Note that `list<string>` and `string[]` _are not_ the same. The latter is an ali

## PHP Compatibility

All code must be backward compatible with PHP 7.4, which is the minimum required PHP version for this project.
All code must be backward compatible with PHP 7.4.12, which is the minimum required PHP version for this project. PHP 7.4.0–7.4.11 have a known engine bug (https://bugs.php.net/bug.php?id=80126) that causes a fatal error with covariant return types in DTO inheritance; those patch releases are not supported.

## Running Tests

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ This project is a PHP SDK, which can be installed as a Composer package. In Word

While this project is stewarded by [WordPress AI Team](https://make.wordpress.org/ai/) members and contributors, it is technically WordPress agnostic. The gap the project addresses is relevant for not only the WordPress ecosystem, but the overall PHP ecosystem, so any PHP project could benefit from it. There is also no technical reason to scope it to WordPress, as communicating with AI models and their providers is independent of WordPress's built-in APIs and paradigms.

## Requirements

- PHP 7.4.12 or later (PHP 7.4.0–7.4.11 have a known covariant return type bug — see [PHP bug #80126](https://bugs.php.net/bug.php?id=80126))

## Installation

```
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"source": "https://github.com/WordPress/php-ai-client"
},
"require": {
"php": ">=7.4",
"php": ">=7.4.12",
"ext-json": "*",
"nyholm/psr7": "^1.8",
"php-http/discovery": "^1.0",
Expand Down Expand Up @@ -71,7 +71,7 @@
},
"optimize-autoloader": true,
"platform": {
"php": "7.4"
"php": "7.4.12"
},
"sort-packages": true
},
Expand Down
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- Use PSR-12 standard -->
<rule ref="PSR12"/>

<!-- Check PHP 7.4 compatibility -->
<!-- Check PHP 7.4.12+ compatibility (7.4.0-7.4.11 are excluded via composer.json minimum) -->
<rule ref="PHPCompatibility">
<!-- Exclude functions that are polyfilled in src/polyfills.php -->
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_is_listFound"/>
Expand Down
Loading