luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

Move bin/luya to root of kick-starter repo #1838

Closed vuongxuongminh closed 6 years ago

vuongxuongminh commented 6 years ago

IMO, I think we should move console app to kick-starter repo like yii templates did. It will be easier to use and more friendly vendor/bin/luya => luya only. #1077

nadar commented 6 years ago

The luya composer plugin does this already. When creating the project or running install the bin file (symlink) is created the project root. We don't want to put code into the kickstarter repos which can not be controlled trough vendor.

vuongxuongminh commented 6 years ago

In my case composer doesn't create it because it not have a permission for create symlink and it's an entry script like public_html/index.php for CLI why we need to control it?

nadar commented 6 years ago

So maybe then we should improve this process, or check for permissions and adding a note instead of creating a work-around (https://github.com/luyadev/luya-composer/blob/master/src/Plugin.php#L57-L60).

Of course i understand your intention in adding a file to the kickstarter, it would be easy done, but i don't think its necessary to have this file as there are other options to generate it and symlink to the vendor bin file. The reason why every aspect of LUYA should be part of the vendor file is very easy: if we extend, improve or add new features we can do so, otherwise we can't. This is a very strong principal of LUYA (https://github.com/luyadev/luya/blob/master/docs/misc/organisation.md#2-long-term-intentions-and-objectives). So assuming we add new options for this cli command to work with zsh, add auto complete or something else, we can just release a new version and everyone will profit from this (we also don't know what will happen in the future, with very new opportunities for such situations?). Providing files in the kickstarter are just a snapshot of the current situation where you was installing the project. I hope you understand what i mean.

So the luya kickstarter basically should only have the index.php and a config. Thats it :-)

(btw: this is also why we don't want to have a crud system (like yii2) where every view needs to be duplicated over and over again. If its not in the vendor, we can not improve, extend, fix bugs or add new features. there for we have ngrest crud).

So again: Maybe lets create an issue in luya composer repo in how we could improve the situation:

vuongxuongminh commented 6 years ago

Thanks you for explain to me.