-
Notifications
You must be signed in to change notification settings - Fork 35
Add composer.json with PHP 7.4+ support, phpcs, phpstan, and phpunit #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
903fedf
Add composer.json with PHP 7.4+ support
borkweb 0d8be44
Add phpcs to composer dev dependencies
borkweb bb6b1c5
Add PHPStan and PHP CodeSniffer configuration
borkweb 31e2168
Remove reference to a non-existent test directory
borkweb 6e3c238
Add dummy file so phpcs and phpstan can be tested
borkweb 77a26a9
Update composer.json description to match README
borkweb 189bb99
Update namespace to WordPress\AiClient
borkweb aeab08e
Rename script declarations in composer.json
borkweb b2ab4d6
PHP >= 7.4 is fine and update PHPStan to ~2.1
borkweb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| { | ||
| "name": "wordpress/php-ai-client", | ||
| "description": "A provider-agnostic PHP SDK for communicating with generative AI models", | ||
| "license": "GPL-2.0-or-later", | ||
| "type": "library", | ||
| "keywords": [ | ||
| "ai", | ||
| "api", | ||
| "llm" | ||
| ], | ||
| "authors": [ | ||
| { | ||
| "name": "WordPress AI Team", | ||
| "homepage": "https://make.wordpress.org/ai/" | ||
| } | ||
| ], | ||
| "homepage": "https://github.com/WordPress/php-ai-client", | ||
| "support": { | ||
| "issues": "https://github.com/WordPress/php-ai-client/issues", | ||
| "source": "https://github.com/WordPress/php-ai-client" | ||
| }, | ||
| "require": { | ||
| "php": ">=7.4 || ^8.0", | ||
borkweb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "ext-json": "*" | ||
| }, | ||
| "require-dev": { | ||
| "dealerdirect/phpcodesniffer-composer-installer": "^1.0", | ||
| "phpstan/phpstan": "^1.10", | ||
borkweb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "phpunit/phpunit": "^9.5 || ^10.0", | ||
| "squizlabs/php_codesniffer": "^3.7" | ||
| }, | ||
borkweb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "minimum-stability": "dev", | ||
| "prefer-stable": true, | ||
| "autoload": { | ||
| "psr-4": { | ||
| "WordPress\\AI\\": "src/" | ||
| } | ||
| }, | ||
| "autoload-dev": { | ||
| "psr-4": { | ||
| "WordPress\\AI\\Tests\\": "tests/" | ||
| } | ||
| }, | ||
borkweb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "config": { | ||
| "allow-plugins": { | ||
| "dealerdirect/phpcodesniffer-composer-installer": true | ||
| }, | ||
borkweb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "optimize-autoloader": true, | ||
| "platform": { | ||
| "php": "7.4" | ||
| }, | ||
| "sort-packages": true | ||
| }, | ||
| "scripts": { | ||
| "analyze": "phpstan analyze", | ||
borkweb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "check": [ | ||
borkweb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "@test", | ||
| "@analyze", | ||
| "@cs" | ||
| ], | ||
| "cs": "phpcs", | ||
| "cs-fix": "phpcbf", | ||
| "test": "phpunit" | ||
| } | ||
borkweb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.