Skip to content

Upgrade dependencies (PHP-CS-Fixer v3) #490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 19, 2021

Conversation

50bhan
Copy link
Contributor

@50bhan 50bhan commented May 14, 2021

Q A
Bug fix? no
New feature? yes
Fixed tickets #476

This PR will close #476.

  • As @Jibbarth said here Get ready for PHP-CS-Fixer v3 #476 (comment), due to replacing php-cs-fixer and php-codesniffer by symplify/easy-coding-standard, I believe we need to remove it.
  • php-cs-fixer in version 3.0 is using "composer/xdebug-handler": "^2.0", and composer in version 2.0 is still using "composer/xdebug-handler": "^1.1". So, we need to wait for new release of composer.
  • There are some changes in the new version are Rector that have been applied.
  • There are some changes in php-cs-fixer interfaces that need to be applied.

@50bhan 50bhan changed the title Upgrade dependencies Upgrade dependencies (PHP-CS-Fixer v3) May 15, 2021
@@ -30,7 +30,7 @@ public function __construct()
/**
* {@inheritdoc}
*/
public function diff($old, $new): string
public function diff(string $old, string $new, ?\SplFileInfo $file = null): string
{
return $this->differ->diff($old, $new);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return $this->differ->diff($old, $new);
return $this->differ->diff($old, $new, $file);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Jibbarth It seems like they have changed the signature of the differ. So, if we're gonna use the third parameter ($file), we need to pass one parameter from the LongestCommonSubsequenceCalculator type. WDYT?

@50bhan 50bhan force-pushed the feat/upgrade-dependencies branch from 7cfdce7 to ced670e Compare May 25, 2021 06:16
@50bhan 50bhan force-pushed the feat/upgrade-dependencies branch from e04ba36 to 4f2d83a Compare May 25, 2021 17:19
@50bhan 50bhan force-pushed the feat/upgrade-dependencies branch from 08626af to 337951d Compare May 25, 2021 18:08
@50bhan
Copy link
Contributor Author

50bhan commented May 26, 2021

@Jibbarth Can you help me with CI failure? And do we still need to support Composer V1.0 or we can remove it?

@50bhan 50bhan marked this pull request as ready for review May 26, 2021 17:50
@Jibbarth
Copy link
Collaborator

Jibbarth commented Jun 3, 2021

@50bhan sorry for the delay, vacation time (without computer 😉) I'll check

@Jibbarth
Copy link
Collaborator

Jibbarth commented Jun 3, 2021

And do we still need to support Composer V1.0 or we can remove it?

As composer v2 as more than 6 month of existence, I think we could totally drop v1. Agree?

@Jibbarth Jibbarth mentioned this pull request Jun 3, 2021
@Jibbarth Jibbarth added the enhancement New feature or request label Jun 3, 2021
@Jibbarth
Copy link
Collaborator

Jibbarth commented Jun 3, 2021

@50bhan got a strange error on your branch. Seems the OrderedImportFixer is not executed (raised by test, and tested it also with binary).

Do you get some fixer working ?

@50bhan
Copy link
Contributor Author

50bhan commented Jun 3, 2021

As composer v2 as more than 6 month of existence, I think we could totally drop v1. Agree?

Yes, I think we can remove it.

@50bhan got a strange error on your branch. Seems the OrderedImportFixer is not executed (raised by test, and tested it also with binary).

Actually, the problem is the CI is trying to install PHPInsights V1.14.1. And in that version, we don't have the fixer command:
https://github.com/nunomaduro/phpinsights/pull/490/checks?check_run_id=2739866034#step:8:36

@Oxicode
Copy link

Oxicode commented Jun 12, 2021

anything news?

Jibbarth added 4 commits June 12, 2021 16:32
On PHP-CS-Fixer v3, a type has been used in an array_filter function of BraceFixer.
As this constant is defined on codesniffer with a string, an error was raised and somes fixers wasn't executed
@50bhan
Copy link
Contributor Author

50bhan commented Jun 13, 2021

@Jibbarth Thank you for the fixes! I think now we can merge this PR right?

@Jibbarth
Copy link
Collaborator

Yep ! Thank you @50bhan 👍

@Jibbarth Jibbarth merged commit 984c1b3 into nunomaduro:master Jun 19, 2021
@50bhan 50bhan deleted the feat/upgrade-dependencies branch June 19, 2021 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get ready for PHP-CS-Fixer v3
3 participants