Skip to content

Commit

Permalink
DX: Add upgrade guide link when next Major is available
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Nov 15, 2021
1 parent d5c737c commit b607104
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Console/WarningsDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function detectOldMajor()
$currentMajorVersion = \intval(explode('.', Application::VERSION)[0], 10);
$nextMajorVersion = $currentMajorVersion + 1;
$this->warnings[] = "You are running PHP CS Fixer v{$currentMajorVersion}, which is not maintained anymore. Please update to v{$nextMajorVersion}.";
$this->warnings[] = "You may find an UPGRADE guide at https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v{$nextMajorVersion}.3.0/UPGRADE-v{$nextMajorVersion}.md .";
}

public function detectOldVendor()
Expand Down
1 change: 1 addition & 0 deletions tests/Smoke/CiIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public function testIntegration(
]);

$optionalDeprecatedVersionWarning = 'You are running PHP CS Fixer v2, which is not maintained anymore. Please update to v3.
You may find an UPGRADE guide at https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.3.0/UPGRADE-v3.md .
';

$optionalIncompatibilityWarning = 'PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 7.4.*.
Expand Down

0 comments on commit b607104

Please sign in to comment.