-
Notifications
You must be signed in to change notification settings - Fork 380
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
add support for Flysystem V2 #1349
Conversation
Hello @Warxcell, Can you please take a look at FlysystemResolver as well? Thank you. |
there seems to be some coding style issues that need to be addressed |
Yes, but it doesn't tell anything useful. For example diff and files.
|
ah .. I see .. @fbourigault I guess we need to adjust this action to give useful output. |
Those should appear in this MR “Files changed” tab. |
Not quite. I will see them tomorrow locally. |
@fbourigault it just shows this not sure if we had used https://styleci.io/ on this repo in the past and if we removed it when we added GithubActions but it shows the specific issues and even makes a PR if you want. |
My bad PHP-CS-Fixer doesn't report which line contains the error. I opened #1355 to remove use of cs2pr and display diff in action output. |
thx .. merged to 2.x .. can you rebase @Warxcell ? |
3feab62
to
94af6f9
Compare
Done. BTW can you give me a hand with tests - we need to run test with version 1 and version 2 installed. How can we achieve that? |
You have to find something that make a difference between version 1 and 2 of Flysystem (V1 has |
@@ -44,7 +44,8 @@ | |||
"symfony/phpunit-bridge": "^5.2", | |||
"symfony/templating": "^3.4|^4.3|^5.0", | |||
"symfony/validator": "^3.4|^4.3|^5.0", | |||
"symfony/yaml": "^3.4|^4.3|^5.0" | |||
"symfony/yaml": "^3.4|^4.3|^5.0", | |||
"friendsofphp/php-cs-fixer": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to remove this line as we don't use PHP-CS-Fixer as a dev dependency anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I don't have global php-cs-fixer and the only way to use it is as dependency. That way package is fully packaged with all dependencies. Isn't it better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use this instead composer global require friendsofphp/php-cs-fixer
, export PATH="$PATH:$HOME/.composer/vendor/bin" and php-cs-fixer
?
Already did that, but now V1 tests fails. Or they will be skipped and never ran. |
I think travis must be configured to run tests on both versions. |
we are using GithubActions .. but yeah I think we likely have to have a separate build for this. wdyt @fbourigault ? |
You have to skip V1 tests when the interface is not installed. There is 0 chance to successfully run Flysystem V1 tests with highest dependencies! |
Have you tried to skip FlysystemV1 related tests when V2 is installed? Something like this in if (!class_exists(FilesystemInterface::class)) {
$this->markTestSkipped('Requires the league/flysystem:^1.0 package.');
} |
Done, skipped tests for V1, but why Coveralls complains about old tests now? |
I guess the reduction in coverage is a side effect of now using either V1 or V2. |
There is something wrong. If you look at /~https://github.com/liip/LiipImagineBundle/pull/1349/checks?check_run_id=1914419168, both V1 and V2 tests are skipped. |
Fixed that. Seems Now overalls is good but some of the tests fails. Will review them later today. |
Finally, all green :) |
LGTM .. @fbourigault WDYT? |
Could you remove Once removed, this one could be merged. |
I'm sorry to ask, but isn't #1357 a more proper implementation? |
Why #1357 would be better? |
@fbourigault because it handles the integration for the loader and resolver by adding service prototypes for them, and the configuration factories detects if you're using v1 or v2 to know which service to inject. |
Thank you @Warxcell for working through this process with us! You helped mature our new Github Actions based setup and also bring Flysystem2 support to the Bundle. @mynameisbogdan also thank you for your PR. I will merge this PR here and would then appreciate if you could rebase your PR to add the additional pieces on top of @Warxcell’s work. |
Add support for https://flysystem.thephpleague.com/v2/docs/what-is-new/