trippo / ResponsiveFilemanager

Completely Responsive Filemanager with integration for tinyMCE,CKEditor and CLEditor editor
http://responsivefilemanager.com
Other
815 stars 365 forks source link

please use composer #136

Open alihammad-gist opened 10 years ago

alihammad-gist commented 10 years ago

please use composer

abemedia commented 9 years ago

+1

SamMousa commented 9 years ago

+1

trippo commented 9 years ago

i think there is not a good solutions because you lose config parameters every update, if you know a method to prevent this i can consider to add

SamMousa commented 9 years ago

Your configuration should not be part of the repository anyway. Ideally your code would all be placed inside an object and the config would be passed to it. This is however a lot of work.

The problem with the filemanager currently is that it integrates really bad with any other software because it requires the files to be web-accessible. Most PHP frameworks have their own routing and integrating responsive filemanager with it is pretty much impossible.

A simple solution is to rename config.php to config-defaults.php, then the user must manually rename it to config.php thereby making sure a future update won't change the configuration.

trippo commented 9 years ago

I know that this code is very bad, but it was born for a little filemananger i'm working in a new version completely rewritten

SamMousa commented 9 years ago

Good to hear, if you have something on github let me know and I might be able to help out a little with some bug fixes =)

m-zanetti commented 9 years ago

Hi @trippo , there is a simple solution to don't override config as wrote @SamMousa your config must be named config-default.php then user can create his own config.php with only his custom sets. First RFM includes config-default.php and then if it exists a config.php file FM include it too :)

trippo commented 9 years ago

@m-zanetti you are right!

rubenheymans commented 9 years ago

+1

mvrhov commented 9 years ago

my suggestion would be to use Silex so there is one front controller for everything that javascript part needs, this would also mean that's easier to secure the access to php files for those of us that are a bit paranoid in allowing arbitrary php file execution.

garak commented 9 years ago

:+1:

pkalisz commented 9 years ago

@trippo , how do you anticipate, when this rewritten version would be available? I would really want to use it with my Symfony project, but in current shape it is quite hard to achieve.

rubenheymans commented 9 years ago

I would like to know to. And is it possible to make this project public on github, as an alpha/beta version, so we can help?

mark9000 commented 9 years ago

This is a very important issue for me too. And the config is not really a problem. For example: I have a post-update-cmd in my root composer.json which writes my individual config file. And i think the composer file will not break anything. Thanks!

jarodium commented 9 years ago

Pre install scripts on composer can be used to make a copy of an older file to a new one.

Kingtreemonkey commented 9 years ago

I've done a pretty much complete re-write of this to suit a silex based application, could do with a tidy up but most functionality is working.

Uses namespaces ect now, with config setup like in any other silex app. Each action (call_ajax.php and execute.php) is split into its own class which implements a shared interface (but not enforced) - updated the JS to suit this so actions would post to /somepath/ajax/{action} ie {action} = GetFile where GetFile is constructed and set's a response array.

Also the templating has been updated to use twig.

The re-write is not finished but Im not 100% sure how to publish it for others to use, mabe somone could point me in the correct direction.

rubenheymans commented 9 years ago

@trippo is it possible to implement this?

Jbaal commented 9 years ago

+1 for the usage of composer I try to integrate it to my new Symfony project, @Kingtreemonkey could you at least create a new repository in Github to have a look at your rewrite ?

Kingtreemonkey commented 9 years ago

sure, could do with a bit of tidying up in parts - will sort this evening (time permitting!)

Jbaal commented 9 years ago

Thanks a lot :)

Kingtreemonkey commented 9 years ago

@Jbaal https://github.com/Kingtreemonkey/FileManager Hope it's of help!

Jbaal commented 9 years ago

@Kingtreemonkey Thanx again, really helpfull ;)

garak commented 8 years ago

any news?

rubenheymans commented 8 years ago

@Kingtreemonkey Are you planning on updating this any time soon?

Kingtreemonkey commented 8 years ago

Hi Ruben,

If you have any questions on my version / request(s) please enter them into an issue on https://github.com/Kingtreemonkey/FileManager

Thanks!

On Thu, Mar 10, 2016 at 2:04 PM, Ruben notifications@github.com wrote:

@Kingtreemonkey https://github.com/Kingtreemonkey Are you planning on updating this any time soon?

— Reply to this email directly or view it on GitHub https://github.com/trippo/ResponsiveFilemanager/issues/136#issuecomment-194858221 .

gordon-matt commented 8 years ago

I think this would not be a good idea. I am a .NET developer and have managed to get this file manager working in ASP.NET MVC (See: http://www.codeproject.com/Tips/1004596/Using-Responsive-File-Manager-in-ASP-NET-MVC). I don't know much about PHP really.. but for me, keeping it as simple PHP is fine, but making it only work with some PHP framework would make future versions unusable.

No, I think the way forward is not to rewrite the file manager to be framework specific, but rather to make it pure HTML5/JavaScript. That way, all web developers can make use of this.. regardless of whether they're using PHP, .NET, Java, Ruby, etc..

SamMousa commented 8 years ago

@gordon-matt Composer is not a framework; it is a dependency manager. I'm all for separating backend (PHP) from frontend (HTML / JS).

But as long as there is PHP code and there are dependencies on other libraries composer is the way to go.

If backend and frontend are separated it makes sense to use something like Bower for the javascript dependencies and composer for the PHP backend.

gordon-matt commented 8 years ago

@SamMousa : I rely on a PHP compiler called Phalanger. As long as using this "Composer" doesn't mean incompatibility for me, sure.. I have no issue there. :-)

However, I have noted that Alberto has on several occasions mentioned that he is looking to rewrite the whole thing, using AngularJS. I still think that is the best way forward: pure JavaScript. It would also mean more of us can more easily make use of and even contibute to the project - not only PHP developers.

SamMousa commented 8 years ago

Composer itself is just PHP so if you can run PHP code you can use composer to install dependencies.

I agree that frontend / backend should be separated.

agencefacton commented 8 years ago

+1

webineh commented 7 years ago

+1

sayjeyhi commented 7 years ago

+1 any news about new version?

johnshepherd commented 7 years ago

+1

ghost commented 7 years ago

+89

liorphp commented 5 years ago

i think there is not a good solutions because you lose config parameters every update, if you know a method to prevent this i can consider to add

You don't. because you can check if config array exist like on uploads.php .

You can declare that change on config array, will forced upgrade version. When you change the config array the version will rise from 10.1.8 t 11.0, and not 10.1.8 ti 10.1.9,

lpotherat commented 4 years ago

Does this "feature" will come one day ? +1

phpfui commented 4 years ago

I think the best approach for composer compatibility is to break out the project into two separate projects. I see @trippo has mentioned work on an update, but not sure where that stands. Would be happy to help out here.

This is what I see needs to be done:

I would be happy to do much of the PHP and API documentation work. Just want buy in from @trippo as to not waste time with something that will not move forward.