diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml index 8c5e68aaa..dca54c1cf 100644 --- a/.github/workflows/code-quality.yaml +++ b/.github/workflows/code-quality.yaml @@ -73,3 +73,11 @@ jobs: source .github/workflows/.utils.sh echo "$PACKAGES" | xargs -n1 | parallel -j +3 "_run_task {} '(cd src/{} && $COMPOSER_UP && $PHPSTAN)'" + + - name: Run PHPStan on store bridges + run: | + source .github/workflows/.utils.sh + + BRIDGES=$(find src/store/src/Bridge/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort | tr '\n' ' ') + echo "Bridges: $BRIDGES" + echo "$BRIDGES" | xargs -n1 | parallel -j +3 "_run_task {} '(cd src/store/src/Bridge/{} && $COMPOSER_UP && $PHPSTAN)'" diff --git a/src/store/composer.json b/src/store/composer.json index 68307ba63..8bb1a4549 100644 --- a/src/store/composer.json +++ b/src/store/composer.json @@ -49,21 +49,13 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { - "codewithkyrian/chromadb-php": "^1.0", - "doctrine/dbal": "^3.3|^4.0", - "mongodb/mongodb": "^1.21|^2.0", "phpstan/phpstan": "^2.0", "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46", - "probots-io/pinecone-php": "^1.0", - "symfony/cache": "^6.4|^7.1", "symfony/console": "^6.4|^7.1", "symfony/dependency-injection": "^6.4|^7.1", "symfony/dom-crawler": "^6.4|^7.1" }, - "conflict": { - "mongodb/mongodb": "<1.21" - }, "minimum-stability": "dev", "autoload": { "psr-4": { diff --git a/src/store/phpstan.dist.neon b/src/store/phpstan.dist.neon index 5274c9903..540315ed9 100644 --- a/src/store/phpstan.dist.neon +++ b/src/store/phpstan.dist.neon @@ -6,6 +6,8 @@ parameters: paths: - src/ - tests/ + excludePaths: + - src/Bridge/ treatPhpDocTypesAsCertain: false ignoreErrors: - @@ -14,15 +16,7 @@ parameters: identifier: missingType.iterableValue path: tests/* reportUnmatched: false - - - identifier: missingType.iterableValue - path: src/Bridge/**/Tests/* - reportUnmatched: false - identifier: 'symfonyAi.forbidNativeException' path: tests/* reportUnmatched: false - - - identifier: 'symfonyAi.forbidNativeException' - path: src/Bridge/**/Tests/* - reportUnmatched: false diff --git a/src/store/src/Bridge/AzureSearch/composer.json b/src/store/src/Bridge/AzureSearch/composer.json index 2abc1ff84..2a9724571 100644 --- a/src/store/src/Bridge/AzureSearch/composer.json +++ b/src/store/src/Bridge/AzureSearch/composer.json @@ -33,6 +33,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -43,6 +45,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\AzureSearch\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/AzureSearch/phpstan.dist.neon b/src/store/src/Bridge/AzureSearch/phpstan.dist.neon new file mode 100644 index 000000000..ae5ca2950 --- /dev/null +++ b/src/store/src/Bridge/AzureSearch/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - SearchStore.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Cache/composer.json b/src/store/src/Bridge/Cache/composer.json index ede49a136..35147d5cd 100644 --- a/src/store/src/Bridge/Cache/composer.json +++ b/src/store/src/Bridge/Cache/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Cache\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Cache/phpstan.dist.neon b/src/store/src/Bridge/Cache/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Cache/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/ChromaDb/composer.json b/src/store/src/Bridge/ChromaDb/composer.json index e4ce38995..70b1f4af4 100644 --- a/src/store/src/Bridge/ChromaDb/composer.json +++ b/src/store/src/Bridge/ChromaDb/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\ChromaDb\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/ChromaDb/phpstan.dist.neon b/src/store/src/Bridge/ChromaDb/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/ChromaDb/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/ClickHouse/composer.json b/src/store/src/Bridge/ClickHouse/composer.json index fafb7b9cd..426e3d93d 100644 --- a/src/store/src/Bridge/ClickHouse/composer.json +++ b/src/store/src/Bridge/ClickHouse/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\ClickHouse\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/ClickHouse/phpstan.dist.neon b/src/store/src/Bridge/ClickHouse/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/ClickHouse/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Cloudflare/composer.json b/src/store/src/Bridge/Cloudflare/composer.json index 8948fed38..3482df5f1 100644 --- a/src/store/src/Bridge/Cloudflare/composer.json +++ b/src/store/src/Bridge/Cloudflare/composer.json @@ -33,6 +33,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -43,6 +45,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Cloudflare\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Cloudflare/phpstan.dist.neon b/src/store/src/Bridge/Cloudflare/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Cloudflare/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Elasticsearch/composer.json b/src/store/src/Bridge/Elasticsearch/composer.json index c2aeb73bb..a77169eaa 100644 --- a/src/store/src/Bridge/Elasticsearch/composer.json +++ b/src/store/src/Bridge/Elasticsearch/composer.json @@ -28,7 +28,9 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { - "phpunit/phpunit": "^11.5.13" + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", "autoload": { @@ -38,6 +40,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Elasticsearch\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Elasticsearch/phpstan.dist.neon b/src/store/src/Bridge/Elasticsearch/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Elasticsearch/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/ManticoreSearch/composer.json b/src/store/src/Bridge/ManticoreSearch/composer.json index 25ef64543..ff5013fb8 100644 --- a/src/store/src/Bridge/ManticoreSearch/composer.json +++ b/src/store/src/Bridge/ManticoreSearch/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\ManticoreSearch\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/ManticoreSearch/phpstan.dist.neon b/src/store/src/Bridge/ManticoreSearch/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/ManticoreSearch/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/MariaDb/composer.json b/src/store/src/Bridge/MariaDb/composer.json index 38c86cff6..899416cea 100644 --- a/src/store/src/Bridge/MariaDb/composer.json +++ b/src/store/src/Bridge/MariaDb/composer.json @@ -33,6 +33,8 @@ }, "require-dev": { "doctrine/dbal": "^3.3|^4.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -43,6 +45,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\MariaDb\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/MariaDb/phpstan.dist.neon b/src/store/src/Bridge/MariaDb/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/MariaDb/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Meilisearch/composer.json b/src/store/src/Bridge/Meilisearch/composer.json index c85d18a4a..087fb84ba 100644 --- a/src/store/src/Bridge/Meilisearch/composer.json +++ b/src/store/src/Bridge/Meilisearch/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Meilisearch\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Meilisearch/phpstan.dist.neon b/src/store/src/Bridge/Meilisearch/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Meilisearch/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Milvus/composer.json b/src/store/src/Bridge/Milvus/composer.json index 0c6bf2635..68fae3dc3 100644 --- a/src/store/src/Bridge/Milvus/composer.json +++ b/src/store/src/Bridge/Milvus/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Milvus\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Milvus/phpstan.dist.neon b/src/store/src/Bridge/Milvus/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Milvus/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/MongoDb/composer.json b/src/store/src/Bridge/MongoDb/composer.json index 318c41ca4..f883d44a1 100644 --- a/src/store/src/Bridge/MongoDb/composer.json +++ b/src/store/src/Bridge/MongoDb/composer.json @@ -34,6 +34,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "conflict": { @@ -47,6 +49,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\MongoDb\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/MongoDb/phpstan.dist.neon b/src/store/src/Bridge/MongoDb/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/MongoDb/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Neo4j/composer.json b/src/store/src/Bridge/Neo4j/composer.json index 53f3ffc8a..1b871c76f 100644 --- a/src/store/src/Bridge/Neo4j/composer.json +++ b/src/store/src/Bridge/Neo4j/composer.json @@ -33,6 +33,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -43,6 +45,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Neo4j\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Neo4j/phpstan.dist.neon b/src/store/src/Bridge/Neo4j/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Neo4j/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/OpenSearch/composer.json b/src/store/src/Bridge/OpenSearch/composer.json index 14706b0d2..ed6f80c19 100644 --- a/src/store/src/Bridge/OpenSearch/composer.json +++ b/src/store/src/Bridge/OpenSearch/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\OpenSearch\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/OpenSearch/phpstan.dist.neon b/src/store/src/Bridge/OpenSearch/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/OpenSearch/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Pinecone/composer.json b/src/store/src/Bridge/Pinecone/composer.json index 4e55567cc..a83700511 100644 --- a/src/store/src/Bridge/Pinecone/composer.json +++ b/src/store/src/Bridge/Pinecone/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Pinecone\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Pinecone/phpstan.dist.neon b/src/store/src/Bridge/Pinecone/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Pinecone/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Postgres/composer.json b/src/store/src/Bridge/Postgres/composer.json index f23b1602d..f88feb97b 100644 --- a/src/store/src/Bridge/Postgres/composer.json +++ b/src/store/src/Bridge/Postgres/composer.json @@ -36,6 +36,8 @@ }, "require-dev": { "doctrine/dbal": "^3.3|^4.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -46,6 +48,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Postgres\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Postgres/phpstan.dist.neon b/src/store/src/Bridge/Postgres/phpstan.dist.neon new file mode 100644 index 000000000..46da14f99 --- /dev/null +++ b/src/store/src/Bridge/Postgres/phpstan.dist.neon @@ -0,0 +1,20 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + - Distance.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Qdrant/composer.json b/src/store/src/Bridge/Qdrant/composer.json index 8f04622c8..983a36488 100644 --- a/src/store/src/Bridge/Qdrant/composer.json +++ b/src/store/src/Bridge/Qdrant/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Qdrant\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Qdrant/phpstan.dist.neon b/src/store/src/Bridge/Qdrant/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Qdrant/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Redis/composer.json b/src/store/src/Bridge/Redis/composer.json index 35e4dea0f..372caac49 100644 --- a/src/store/src/Bridge/Redis/composer.json +++ b/src/store/src/Bridge/Redis/composer.json @@ -33,6 +33,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -43,6 +45,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Redis\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Redis/phpstan.dist.neon b/src/store/src/Bridge/Redis/phpstan.dist.neon new file mode 100644 index 000000000..46da14f99 --- /dev/null +++ b/src/store/src/Bridge/Redis/phpstan.dist.neon @@ -0,0 +1,20 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + - Distance.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Supabase/composer.json b/src/store/src/Bridge/Supabase/composer.json index 1b0ebc49a..6d8fb7a16 100644 --- a/src/store/src/Bridge/Supabase/composer.json +++ b/src/store/src/Bridge/Supabase/composer.json @@ -33,6 +33,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -43,6 +45,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Supabase\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Supabase/phpstan.dist.neon b/src/store/src/Bridge/Supabase/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Supabase/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/SurrealDb/composer.json b/src/store/src/Bridge/SurrealDb/composer.json index ef3c880af..a98134d15 100644 --- a/src/store/src/Bridge/SurrealDb/composer.json +++ b/src/store/src/Bridge/SurrealDb/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\SurrealDb\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/SurrealDb/phpstan.dist.neon b/src/store/src/Bridge/SurrealDb/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/SurrealDb/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Typesense/composer.json b/src/store/src/Bridge/Typesense/composer.json index 98041e55a..1a28f84f1 100644 --- a/src/store/src/Bridge/Typesense/composer.json +++ b/src/store/src/Bridge/Typesense/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Typesense\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Typesense/phpstan.dist.neon b/src/store/src/Bridge/Typesense/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Typesense/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false diff --git a/src/store/src/Bridge/Weaviate/composer.json b/src/store/src/Bridge/Weaviate/composer.json index 5d59c5587..0116edb61 100644 --- a/src/store/src/Bridge/Weaviate/composer.json +++ b/src/store/src/Bridge/Weaviate/composer.json @@ -32,6 +32,8 @@ "symfony/uid": "^7.3|^8.0" }, "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^11.5.46" }, "minimum-stability": "dev", @@ -42,6 +44,7 @@ }, "autoload-dev": { "psr-4": { + "Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/", "Symfony\\AI\\Store\\Bridge\\Weaviate\\Tests\\": "Tests/" } }, diff --git a/src/store/src/Bridge/Weaviate/phpstan.dist.neon b/src/store/src/Bridge/Weaviate/phpstan.dist.neon new file mode 100644 index 000000000..c2195f31f --- /dev/null +++ b/src/store/src/Bridge/Weaviate/phpstan.dist.neon @@ -0,0 +1,19 @@ +includes: + - ../../../../../.phpstan/extension.neon + +parameters: + level: 6 + paths: + - Store.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#" + - + identifier: missingType.iterableValue + path: Tests/* + reportUnmatched: false + - + identifier: 'symfonyAi.forbidNativeException' + path: Tests/* + reportUnmatched: false