diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..a525bae8 --- /dev/null +++ b/composer.json @@ -0,0 +1,64 @@ +{ + "name": "wordpress/php-ai-client", + "description": "A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.", + "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", + "ext-json": "*" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "phpstan/phpstan": "~2.1", + "phpunit/phpunit": "^9.5 || ^10.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "psr-4": { + "WordPress\\AiClient\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "WordPress\\AiClient\\Tests\\": "tests/" + } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + }, + "optimize-autoloader": true, + "platform": { + "php": "7.4" + }, + "sort-packages": true + }, + "scripts": { + "lint": [ + "@phpcs", + "@phpstan" + ], + "phpcbf": "phpcbf", + "phpcs": "phpcs", + "phpstan": "phpstan analyze", + "phpunit": "phpunit" + } +} diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 00000000..452012b2 --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,25 @@ + + + PSR-12 coding standards for PHP AI Client SDK + + + src + + + */vendor/* + + + + + + + + + + + + + + + + diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 00000000..776ccd86 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,4 @@ +parameters: + level: max + paths: + - src diff --git a/src/DummyForAnalysis.php b/src/DummyForAnalysis.php new file mode 100644 index 00000000..72643495 --- /dev/null +++ b/src/DummyForAnalysis.php @@ -0,0 +1,25 @@ +