Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'"
8 changes: 0 additions & 8 deletions src/store/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
10 changes: 2 additions & 8 deletions src/store/phpstan.dist.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ parameters:
paths:
- src/
- tests/
excludePaths:
- src/Bridge/
treatPhpDocTypesAsCertain: false
ignoreErrors:
-
Expand All @@ -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
3 changes: 3 additions & 0 deletions src/store/src/Bridge/AzureSearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -43,6 +45,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\AzureSearch\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/AzureSearch/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/store/src/Bridge/Cache/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -42,6 +44,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\Cache\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/Cache/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/store/src/Bridge/ChromaDb/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -42,6 +44,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\ChromaDb\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/ChromaDb/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/store/src/Bridge/ClickHouse/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -42,6 +44,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\ClickHouse\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/ClickHouse/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/store/src/Bridge/Cloudflare/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -43,6 +45,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\Cloudflare\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/Cloudflare/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion src/store/src/Bridge/Elasticsearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -38,6 +40,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\Elasticsearch\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/Elasticsearch/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/store/src/Bridge/ManticoreSearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -42,6 +44,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\ManticoreSearch\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/ManticoreSearch/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/store/src/Bridge/MariaDb/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -43,6 +45,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\MariaDb\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/MariaDb/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/store/src/Bridge/Meilisearch/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -42,6 +44,7 @@
},
"autoload-dev": {
"psr-4": {
"Symfony\\AI\\PHPStan\\": "../../../../../.phpstan/",
"Symfony\\AI\\Store\\Bridge\\Meilisearch\\Tests\\": "Tests/"
}
},
Expand Down
19 changes: 19 additions & 0 deletions src/store/src/Bridge/Meilisearch/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading