Skip to content
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

Merged
merged 16 commits into from
Jan 14, 2016
Merged

Flysystem support added. #674

merged 16 commits into from
Jan 14, 2016

Conversation

graundas
Copy link
Contributor

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.


try {
$sFileSystemService = sprintf('oneup_flysystem.%s_filesystem', $sFileSystem);
$this->filesystem = $container->get($sFileSystemService);
Copy link
Collaborator

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.

@Sander-Toonen
Copy link

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?

@makasim
Copy link
Collaborator

makasim commented Dec 12, 2015

I am fine with Flysystem loader if it does not coupled to the bundle. See my comments.

@graundas
Copy link
Contributor Author

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.

@lsmith77 lsmith77 added the State: Reviewing This item is being reviewed to determine if it should be accepted. label Dec 16, 2015
@graundas
Copy link
Contributor Author

Hi. I have updated this Loader to use a service, which is being injected now. Check docs.
Travis-CI check has failed, because Flysystem library requires PHP 5.4.0 and Travis-CI checks compatibility with PHP 5.3. I am not sure if I should update .travis.yml by removing PHP 5.3 check. Should I do that?

@makasim
Copy link
Collaborator

makasim commented Dec 17, 2015

Check php version and do composer require flysystem only if php version is higher than 5.3.

@makasim
Copy link
Collaborator

makasim commented Dec 17, 2015

also add skip method to the tests, if php version is 5.3

@makasim
Copy link
Collaborator

makasim commented Dec 17, 2015

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%">
Copy link
Collaborator

Choose a reason for hiding this comment

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

add abstract=true

@graundas
Copy link
Contributor Author

All you asked is done. Will you merge It to your repository?


public function __construct(
ExtensionGuesserInterface $extensionGuesser,
Filesystem $filesystem)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there interface?

Copy link
Collaborator

Choose a reason for hiding this comment

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

on the new line ) {

Copy link
Contributor Author

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?

@graundas
Copy link
Contributor Author

Hi. All done.

@Sander-Toonen
Copy link

Very nice work @graundas. Can't wait to see this merged.

@makasim
Copy link
Collaborator

makasim commented Jan 4, 2016

Looks good to me. @javiereguiluz Could you please have a look at the docs?

@heikokrebs
Copy link

👍

@makasim
Copy link
Collaborator

makasim commented Jan 13, 2016

@javiereguiluz ping, @graundas could you please rebase the PR?

@@ -0,0 +1,35 @@
FlysystemLoader
============
Copy link
Contributor

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.



Updated docs.

Loader is rewritten to support any service, which is instance of League\Flysystem\Filesystem.

revert

Applied fixes from StyleCI

update

Applied fixes from StyleCI

minor fixes

docs update
# Conflicts:
#	Resources/doc/data-loader/flysystem.rst
#	Resources/doc/data-loaders.rst
@graundas
Copy link
Contributor Author

Hi. I have just rebased my PR. Docs corrected also.

makasim added a commit that referenced this pull request Jan 14, 2016
@makasim makasim merged commit 22d625e into liip:master Jan 14, 2016
@lsmith77 lsmith77 removed the State: Reviewing This item is being reviewed to determine if it should be accepted. label Jan 14, 2016
@makasim
Copy link
Collaborator

makasim commented Jan 14, 2016

Thanks @graundas for the contribution and @javiereguiluz for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants