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

3.0 RFC: Console Folder structure #4347

Closed
dereuromark opened this issue Aug 22, 2014 · 16 comments
Closed

3.0 RFC: Console Folder structure #4347

dereuromark opened this issue Aug 22, 2014 · 16 comments
Assignees
Labels
Milestone

Comments

@dereuromark
Copy link
Member

1. bin/cake

First of all, the (remaining) non-class files should be removed from /src/Console.
Since $ src/Console/cake [command] or $ cd src && Console/cake [command] is quite long it would make sense to put those files into bin - as other projects do, as well.
So it is just $ bin/cake [command] then.

2. Console/Command => Shell

Secondly, the Console folder does not need to be that nested anymore.
We can move Command up, so it becomes a subfolder to app.
We should also rename it then, as we usually always have classes in a folder with the name of the type.
I recommend "Shell".

This simplifies the whole console part:

src/Shell
src/Shell/Task
bin/cake[.php/bat]
@dereuromark dereuromark added this to the 3.0.0 milestone Aug 22, 2014
@markstory
Copy link
Member

I would probably still leave Console/cake behind as a simple wrapper script. It is one less thing that people need to change when upgrading. Other than that I don't have huge objections to the other file renames.

@dereuromark
Copy link
Member Author

I think they have to change it anyway to one of the above, regarding the different root folder names.
Changing it to bin/cake for cronjob scripts and alike should be a fairly easy thing to do.

@markstory
Copy link
Member

We could also look at using composer to create vendor/bin/cake as well if we are looking at moving Console/cake around.

@dereuromark
Copy link
Member Author

Or that. But Symfony2 for example has a root bin dir and

"config" : {
    "bin-dir" : "bin"
},

Which makes sense as it reduces typing (vendor/ folder in this case).

@markstory
Copy link
Member

Would using both the composer config option in cakephp/app and having CakePHP export the bin script be a good first step? I have a small concern about switching directories around post beta, but if others are in favor I think it could work.

@ADmad
Copy link
Member

ADmad commented Aug 23, 2014

👍 to the proposed directory and composer config changes.

@ravage84
Copy link
Member

👍 to bin/cake[.php/bat]

@ionas
Copy link
Contributor

ionas commented Aug 23, 2014

now that we are moving to namings like "src" shudder "bin" really makes sense (consistency)

@markstory
Copy link
Member

@ionas bin is much less to type as well 😄

@markstory
Copy link
Member

Closing as the pull request is merged.

@ADmad
Copy link
Member

ADmad commented Aug 26, 2014

Moving the cake executable to bin is still pending :)

@dereuromark dereuromark reopened this Aug 26, 2014
@markstory
Copy link
Member

My mistake.

@bcrowe
Copy link
Contributor

bcrowe commented Aug 29, 2014

I can take care of this unless someone else wants to. Feel free to assign to me if you wish.

@ADmad
Copy link
Member

ADmad commented Aug 29, 2014

@bcrowe Steal it, steal it. @dereuromark doesn't seem to have come out of holiday mood yet 😄

@dereuromark
Copy link
Member Author

True true
even though right now its more sunburn-mood^^
So @bcrowe go ahead!

@bcrowe
Copy link
Contributor

bcrowe commented Aug 29, 2014

Closing as cakephp/app#123 has been merged.

@bcrowe bcrowe closed this as completed Aug 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants