-
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
Flysystem support added. #674
Conversation
|
||
try { | ||
$sFileSystemService = sprintf('oneup_flysystem.%s_filesystem', $sFileSystem); | ||
$this->filesystem = $container->get($sFileSystemService); |
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.
Can we inject this service directly. Injecting of the container and
"guessing" the filesystem service in the constructor looks strange to me.
Hi, I was just thinking to pick development on this issue up. What is your point of view regarding stream support in OneupFlysystemBundle and what would be the up/downside of using this approach? |
I am fine with Flysystem loader if it does not coupled to the bundle. See my comments. |
I agree with you, @makasim . I will rewrite my code in a few days, so that a service would be injected instead of getting It from the container. @Sander-Toonen , I don't think a wrapper would be a better solution, because we would have to register a global php wrapper, which, in my opinion, is a slower and less configurable solution compared to dependency injection. |
…ue\Flysystem\Filesystem.
Applied fixes from StyleCI
Hi. I have updated this Loader to use a service, which is being injected now. Check docs. |
Check php version and do composer require flysystem only if php version is higher than 5.3. |
also add skip method to the tests, if php version is 5.3 |
Let's discuss drop of php5.3 support here: #679 |
@@ -205,6 +206,11 @@ | |||
<argument><!-- will be injected by StreamLoaderFactory --></argument> | |||
<argument><!-- will be injected by StreamLoaderFactory --></argument> | |||
</service> | |||
|
|||
<service id="liip_imagine.binary.loader.prototype.flysystem" class="%liip_imagine.binary.loader.flysystem.class%"> |
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.
add abstract=true
Applied fixes from StyleCI
All you asked is done. Will you merge It to your repository? |
|
||
public function __construct( | ||
ExtensionGuesserInterface $extensionGuesser, | ||
Filesystem $filesystem) |
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.
Is there interface?
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.
on the new line ) {
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.
Are you talking about "Filesystem $filesystem" on line 24?
Hi. All done. |
Very nice work @graundas. Can't wait to see this merged. |
Looks good to me. @javiereguiluz Could you please have a look at the docs? |
Fixed build issues
Fixed doc errors reported by docs build tool
👍 |
@javiereguiluz ping, @graundas could you please rebase the PR? |
@@ -0,0 +1,35 @@ | |||
FlysystemLoader | |||
============ |
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.
This line should be as long as the preceding heading.
# Conflicts: # Resources/doc/data-loader/flysystem.rst # Resources/doc/data-loaders.rst
Hi. I have just rebased my PR. Docs corrected also. |
Thanks @graundas for the contribution and @javiereguiluz for the review. |
Hi. I have added support for Flysystem filesystem support. I have created a Flysystem loader and some tests. For more details check docs I updated.