Skip to content

Elfinder bundle 8 #179

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 3 commits into from
May 2, 2018
Merged

Elfinder bundle 8 #179

merged 3 commits into from
May 2, 2018

Conversation

wuestkamp
Copy link
Contributor

helios-ag/fm-elfinder-bundle uses Studio-42/elFinder instead of helios-ag/ElFinderPHP (https://github.com/helios-ag/FMElfinderBundle/releases/tag/8.0)

@wuestkamp
Copy link
Contributor Author

wuestkamp commented Apr 24, 2018

This solves #178

@@ -31,7 +30,7 @@
/**
* @author Sjoerd Peters <[email protected]>
*/
class PhpcrDriver extends ElFinderVolumeDriver
class PhpcrDriver extends \elFinderVolumeDriver
Copy link
Member

Choose a reason for hiding this comment

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

this will break with older versions of elfinder bundle, however. can you bump the version in composer to the one that uses the new elfinder library?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added helios-ag/fm-elfinder-bundle < 8.0 to the conflict section.

@@ -54,7 +53,7 @@ class PhpcrDriver extends ElFinderVolumeDriver
/**
* @var array
*/
private $options;
protected $options;
Copy link
Member

Choose a reason for hiding this comment

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

why change the visibility of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm getting this otherwise:

PHP Fatal error: Access level to Symfony\Cmf\Bundle\MediaBundle\Adapter\ElFinder\PhpcrDriver::$options must be protected (as in class elFinderVolumeDriver) or weaker in .../vendor/symfony-cmf/media-bundle/src/Adapter/ElFinder/PhpcrDriver.php on line 34

Copy link
Member

Choose a reason for hiding this comment

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

hm, so that means we collide on that field. does the new volume driver also have a constructor that we should be calling? how does it use the options field? we probably need to rename this field as we would overwrite the options of the base class...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes its weird. Thing is, with the previous ElFinderVolumeDriver (https://github.com/helios-ag/ElFinderPHP/blob/master/src/Driver/ElFinderVolumeDriver.php) it was done in the same way.

They talk about this issue here too symfony/symfony#25353.

Copy link
Member

Choose a reason for hiding this comment

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

we merge the options with the options of the parent class. hm, whatever. i guess its fine then.

@dbu dbu merged commit 964efe5 into symfony-cmf:master May 2, 2018
@dbu
Copy link
Member

dbu commented May 2, 2018

i merged this as it seems reasonably save.

@dbu
Copy link
Member

dbu commented May 2, 2018

i am however hesitant to create a release of an unmaintained bundle. does it work for you to have composer.json reference the exact commit id that we have in master now?

@wuestkamp
Copy link
Contributor Author

@dbu sure that's fine for me. If others will run into this issue they will find this pull request and can solve this way.

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.

2 participants