Skip to content
Open
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
6 changes: 3 additions & 3 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP80Migration:risky' => true,
'@PHP81Migration' => true,
'@PHPUnit84Migration:risky' => true,
'@PHP8x0Migration:risky' => true,
'@PHP8x1Migration' => true,
'@PHPUnit8x4Migration:risky' => true,
Comment on lines +15 to +17
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

The php-cs-fixer rule set names '@PHP8x0Migration', '@PHP8x1Migration', and '@PHPUnit8x4Migration' don't match the standard PHP-CS-Fixer preset names (e.g. '@PHP80Migration', '@PHP81Migration', '@PHPUnit84Migration'). If these presets don't exist in the pinned php-cs-fixer version, running php-cs-fixer will fail to load the config. Verify the correct preset names for the version being used and update them accordingly.

Suggested change
'@PHP8x0Migration:risky' => true,
'@PHP8x1Migration' => true,
'@PHPUnit8x4Migration:risky' => true,
'@PHP80Migration:risky' => true,
'@PHP81Migration' => true,
'@PHPUnit84Migration:risky' => true,

Copilot uses AI. Check for mistakes.
'declare_strict_types' => false,
'final_class' => true,
'native_function_invocation' => ['include' => ['@all']],
Expand Down
49 changes: 24 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,45 @@
"homepage": "https://github.com/PUGX/badge-poser/contributors"
}
],
"minimum-stability": "beta",
"require": {
"php": "^8.3",
"ext-gd": "*",
"ext-iconv": "*",
"badges/poser": "^3.1",
"bitbucket/client": "^4.7",
"knplabs/github-api": "^3.15",
"knplabs/github-api": "^3.16",
"knplabs/packagist-api": "^2.1",
"m4tthumphrey/php-gitlab-api": "^11.14",
"predis/predis": "^2.2",
"sentry/sentry-symfony": "^5.0",
"snc/redis-bundle": "^4.7",
"symfony/asset": "^7.1",
"symfony/console": "^7.1",
"symfony/flex": "^2.4",
"symfony/framework-bundle": "^7.1",
"symfony/http-client": "^7.1",
"symfony/runtime": "^7.1",
"symfony/webpack-encore-bundle": "^2.2",
"symfony/yaml": "^7.1"
"predis/predis": "^2.3",
"sentry/sentry-symfony": "^5.6",
"snc/redis-bundle": "^4.10",
"symfony/asset": "^7.3",
"symfony/console": "^7.3",
"symfony/flex": "^2.8",
"symfony/framework-bundle": "^7.3",
"symfony/http-client": "^7.3",
"symfony/runtime": "^7.3",
"symfony/webpack-encore-bundle": "^2.3",
"symfony/yaml": "^7.3"
},
"require-dev": {
"dg/bypass-finals": "^1.4",
"friendsofphp/php-cs-fixer": "^3.13",
"dg/bypass-finals": "^1.9",
"friendsofphp/php-cs-fixer": "^3.89",
"jangregor/phpstan-prophecy": "^1.0",
"phpspec/prophecy-phpunit": "^2.3",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n composer.json | head -60

Repository: PUGX/badge-poser

Length of output: 2528


🏁 Script executed:

#!/bin/bash
# Search for Prophecy usage in test files
echo "=== Searching for Prophecy usage in tests ==="
find tests -type f -name "*.php" 2>/dev/null | xargs grep -l "prophesize\|Prophecy\|->reveal()" 2>/dev/null | head -20 || echo "No test files with Prophecy found or tests dir not accessible"

echo ""
echo "=== Checking for specific Prophecy imports ==="
rg "use.*Prophecy|prophesize\(|->reveal\(\)" --type php || echo "No Prophecy patterns found"

Repository: PUGX/badge-poser

Length of output: 2074


🌐 Web query:

phpspec/prophecy-phpunit version 2.3 PHPUnit 12 compatibility

💡 Result:

phpspec/prophecy-phpunit v2.3.0 is not PHPUnit 12 compatible (its Composer constraint only allows phpunit/phpunit ^9.1 || ^10.1 || ^11.0, not ^12.0). [1]

To use PHPUnit 12, upgrade to v2.4.0+ (adds ^12.0 support) [2] — or v2.5.0 (supports ^12.0 and ^13.0). [3]

Also note PHPUnit 12 itself requires PHP 8.3+. [4]

Sources: [1] https://raw.githubusercontent.com/phpspec/prophecy-phpunit/v2.3.0/composer.json, [2] https://raw.githubusercontent.com/phpspec/prophecy-phpunit/v2.4.0/composer.json, [3] https://raw.githubusercontent.com/phpspec/prophecy-phpunit/v2.5.0/composer.json, [4] https://phpunit.de/announcements/phpunit-12.html


Upgrade phpspec/prophecy-phpunit to v2.4.0+ for PHPUnit 12 compatibility.

The PR upgrades to PHPUnit 12.4 while keeping phpspec/prophecy-phpunit at ^2.3, but v2.3.0 only supports PHPUnit 9.1, 10.1, and 11.0—not 12.0. Tests actively use Prophecy (BadgeSubscriberTest.php, GitLabClientTest.php, CreateComposerLockBadgeTest.php), so this dependency cannot be removed. Upgrade phpspec/prophecy-phpunit to v2.4.0 or higher (v2.5.0 recommended) to resolve the incompatibility and prevent test runtime failures.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@composer.json` at line 43, Update the phpspec/prophecy-phpunit dependency in
composer.json from "^2.3" to a PHPUnit‑12 compatible version (use "^2.4" or
preferably "^2.5") so tests that use Prophecy (e.g., BadgeSubscriberTest,
GitLabClientTest, CreateComposerLockBadgeTest) work with PHPUnit 12; after
changing the version string for the package name "phpspec/prophecy-phpunit" run
composer update phpspec/prophecy-phpunit (or composer update) and rerun the test
suite to confirm the incompatibility is resolved.

"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-phpunit": "^1.2",
"phpstan/phpstan-symfony": "^1.2",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^12.4",
"roave/security-advisories": "dev-latest",
Comment on lines +40 to 49
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

composer.json upgrades phpunit/phpunit to ^12.4, but the lockfile resolves jangregor/phpstan-prophecy 1.0.0 which declares a conflict with phpunit/phpunit >=10. This combination is not installable with Composer. Either remove/replace phpstan-prophecy (or Prophecy tooling) or change the PHPUnit upgrade plan so dependency constraints are satisfiable.

Copilot uses AI. Check for mistakes.
"symfony/browser-kit": "^7.1",
"symfony/debug-bundle": "^7.1",
"symfony/dotenv": "^7.1",
"symfony/monolog-bundle": "^3.8",
"symfony/phpunit-bridge": "^7.1",
"symfony/stopwatch": "^7.1",
"symfony/web-profiler-bundle": "^7.1"
"symfony/browser-kit": "^7.3",
"symfony/debug-bundle": "^7.3",
"symfony/dotenv": "^7.3",
"symfony/monolog-bundle": "^3.10",
"symfony/phpunit-bridge": "^7.3",
"symfony/stopwatch": "^7.3",
"symfony/web-profiler-bundle": "^7.3"
},
"config": {
"preferred-install": {
Expand Down Expand Up @@ -117,7 +116,7 @@
"symfony": {
"id": "01C6YZAVV83WQGHCHEWX2SA6KC",
"allow-contrib": false,
"require": "7.1.*"
"require": "7.3.*"
},
"branch-alias": {
"dev-master": "3.x-dev"
Expand Down
Loading
Loading