Skip to content
Closed
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
13 changes: 10 additions & 3 deletions .github/workflows/samples-php8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
sample:
Expand All @@ -43,4 +41,13 @@ jobs:
run: composer install
- name: phpunit
working-directory: ${{ matrix.sample }}
run: vendor/bin/phpunit
run: |
if [ -f phpunit.xml ] || [ -f phpunit.xml.dist ]; then
vendor/bin/phpunit -c "$( [ -f phpunit.xml ] && echo phpunit.xml || echo phpunit.xml.dist )"
elif [ -d tests ]; then
vendor/bin/phpunit tests
elif [ -d test ]; then
vendor/bin/phpunit test
else
echo "No PHPUnit config or tests directory in ${{ matrix.sample }}; skipping."
fi
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
}
],
"require": {
"php": "^8.1",
"laravel/framework": "^10.0",
"php": "^8.3",
"laravel/framework": "^13.0",
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
"crell/serde": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^12.0"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions samples/server/petstore/php-laravel-issue-21334/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
}
],
"require": {
"php": "^8.1",
"laravel/framework": "^10.0",
"php": "^8.3",
"laravel/framework": "^13.0",
"crell/serde": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^12.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 2 additions & 0 deletions samples/server/petstore/php-laravel/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
#
#
6 changes: 3 additions & 3 deletions samples/server/petstore/php-laravel/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: phpunit.xml.dist still targets PHPUnit 9.5 but the dependency is now ^12.0. The config uses a PHPUnit 9 schema, removed attributes (convertErrorsToExceptions, convertNoticesToExceptions, convertWarningsToExceptions), and the legacy structure that was replaced by in PHPUnit 10.1+. Running vendor/bin/phpunit with this config will produce errors. Run vendor/bin/phpunit --migrate-configuration or update the config to the PHPUnit 12 format.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/server/petstore/php-laravel/composer.json, line 24:

<comment>phpunit.xml.dist still targets PHPUnit 9.5 but the dependency is now ^12.0. The config uses a PHPUnit 9 schema, removed attributes (convertErrorsToExceptions, convertNoticesToExceptions, convertWarningsToExceptions), and the legacy <coverage><include> structure that was replaced by <source> in PHPUnit 10.1+. Running vendor/bin/phpunit with this config will produce errors. Run vendor/bin/phpunit --migrate-configuration or update the config to the PHPUnit 12 format.</comment>

<file context>
@@ -21,7 +21,7 @@
     },
     "require-dev": {
-        "phpunit/phpunit": "^9.5"
+        "phpunit/phpunit": "^12.0"
     },
     "autoload": {
</file context>

],
"require": {
"php": "^8.1",
"laravel/framework": "^10.0",
"php": "^8.3",
"laravel/framework": "^13.0",
"crell/serde": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^12.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading