fuelphp-storage / fuelphp

FuelPHP framework
http://fuelphp.com
MIT License
274 stars 57 forks source link

Create Cli package #23

Open WanWizard opened 11 years ago

WanWizard commented 11 years ago

Or use an existing Cli package as the basis, and add a Fuel wrapper to it if needed.

sagikazarmark commented 10 years ago

I think that either way we have a lot of options. There are a lot of CLI packages (but actually I'm not really satisfied with them). However in case of a new cli package, there are still a lot of implementations which can help: option parsers, league/climate. These handle the input parsing and the output formatting.

dercoder commented 9 years ago

I also recommend the implementations of http://climate.thephpleague.com/

WanWizard commented 9 years ago

Looks like a clean package, no dependencies, which I like.

dercoder commented 9 years ago

Thats right. Only some features are missing like parsing arguments

sagikazarmark commented 9 years ago

Argument parsing is not really in scope of CLImate. But that is not the biggest problem. We have to either create a complete new package (and beat symfony console which is bad, but there isn't any better) or find an existing one.

felipsmartins commented 9 years ago

Symfony\Console is the best cli tool out there. Fuelphp has a nasty habit of reinventing everything under a motto that is not justifiable. I'm sure one day will contradict fuelphp up and start using third-party packages - that is, if someday fuelphp project leader become a little humble. Laravel has become very popular out there because their way of doing things are unique. He did not reinvented all, uses components of the symfony framework, for example, and adapting when it is necessary.

sagikazarmark commented 9 years ago

I am not going to start a flame war about symfony console. It admitedly has some nasty things, that hopefully will be gone in 3.0. Until then it remains true: it's bad, but there isn't any better. The only competitor I can think of now is aura CLI.

FuelPHP also uses third-party components when they fit in the plans, but using them for the sake of "not reimplementing" is simply insane.

I don't think comparing frameworks make any sense, fuelphp has its own (hopefully growing) userbase, laravel has its own.

WanWizard commented 9 years ago

I find that a very patronizing remark.

If you create a product, any product, you are responsible for the product, and it's quality. I don't want to deliver a framework to the world, and if it doesn't work say "hey, this is actually not our product, it's 80% packages from others, go and complain there". So I am naturally careful in the selection of external packages, especially for framework core components.

Also, I have a healthy disgust of everything Symfony. Their code is complex, slow, and their dependency list for most packages goes on and on.

And finally you can't compare FuelPHP and Laravel, both frameworks have a different goal and target audience. Every new Laravel version is a new framework, they don't provide any continuity whatsoever. This is a prime focus for me, applications written using Fuel need to run and be maintained in the next 5-7 years, and you don't want to be confronted with a full rewrite of your application because your framework is discontinued. If you don't get this, talk to corporate developers with apps written in L3. If you don't have to maintain applications long term, and you re-asses your choice of framework before starting every new app, then Fuel is probably not for you.

And since Fuel is fully composer compatible, if you insist on using half of Symfony, who is keeping you?

kenjis commented 9 years ago

@felipsmartins

Symfony\Console is the best cli tool out there.

Why do you think so? Would you please tell me your comparison Symfony\Console and CLImate and Aura CLI?

sagikazarmark commented 9 years ago

@kenjis I don't think such a comparison is possible or make sense. Symfony Console is a fully featured CLI application framework, CLImate is an output formatter, Aura CLI is closing the problem from another side.

And I don't think this conversation leads us to a conclusion where we can say which is better, which to use.

kenjis commented 9 years ago

Don't close the conversation immediately, please. He said "Symfony\Console is the best". He probably has his reasons to say so.

sagikazarmark commented 9 years ago

@kenjis it is going to be a flame war and nothing else. Everyone has a "best tool", reasons doesn't really matter here. If we really want to discuss it, we should focus on why fuel should use symfony console instead of why it is said to be the best.

kenjis commented 9 years ago

Ok, you have a point. Here is fuel repositoy.

@felipsmartins So the question is why fuel should use Symfony\Console, but not others like Aura.Cli, CLImate.

dercoder commented 9 years ago

I saw yesterdy that CLImate also support parsing arguments: http://climate.thephpleague.com/arguments/

Maybe fuelphp should use his own CLI class inspired by Symfony\Console, Aura.Cli and CLImate

sagikazarmark commented 9 years ago

I think with such a fully featured CLI helper package, like CLImate creating an own package would really not be a problem. We should only encapsulate CLImate and create our application logic, done.