Skip to content

Commit

Permalink
minor #6060 DX: Add upgrade guide link when next Major is available (…
Browse files Browse the repository at this point in the history
…keradus)

This PR was squashed before being merged into the 2.19 branch.

Discussion
----------

DX: Add upgrade guide link when next Major is available

inspired by #5696 (comment)

just asking for opinions about this idea.

if you like it, I will adjust the tests

Commits
-------

b607104 DX: Add upgrade guide link when next Major is available
  • Loading branch information
keradus committed Nov 15, 2021
2 parents d5c737c + b607104 commit 29691a1
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 29691a1

Please sign in to comment.