-
Notifications
You must be signed in to change notification settings - Fork 821
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
Refactor sake around Symfony console #11341
Comments
I've gotten pretty far with this for everything included in installer. I'm nearly at the point where I can clean up and start writing tests (and then move onto the rest of kitchen sink). One thing I'd like some opinions on is how the Right now the PRs have these just swapping
This however keeps all of the commands clumped together in an unhelpful way, and means you have to type I would like to change the commands to be more meaningful in CLI, while keeping their HTTP routes as they currently are. That would look more like this:
This gives us a more sensible grouping for the CLI commands, allows for new commands to be more easily added to those groupings in a meaningful way, reduces unnecessary key-strokes, and I think just looks way tidier. (I'm planning on hiding the tasks from this initial list (at least if there are more than some configurable number of them) and only showing them when you run @silverstripe/core-team Does anyone have any thoughts on this? |
@GuySartorelli 100% agree. Coming from a laravel view that makes a lot more sense than prefixing everything |
Looks good, happy to get rid of the |
+1 for getting rid of the dev prefix |
All good to drop the |
I think we should aim for lowercase task names for newly named tasks, because that's easier to type and is more consistent with basically everything else you'll ever do in CLI (at least for *nix). I would prefer not to rename existing tasks that already have short names so that we can preserve backwards compatibility for them (I gave an explicit name to some tasks that were falling back to FQCN because the FQCN is really long and looks awful in the new
Based on this comment it seems you agree that we should avoid renaming the tasks which already have short names defined. So this is only about tasks we're giving a command name where the legacy |
They can't work like they used to, because sake doesn't use the routed controllers to get or list info anymore. Lists of commands are handled by
Given the intention behind adding backwards compatibility is to allow scripts to continue working, I don't see any value in adding backwards compatibility for the commands that only listed what commands are available, given that doing so would be adding tech debt (immediately deprecated code). |
I'll resolve the one you've listed, but the way you said that implies there are more cases? Please point them all out, since you saw them and I didn't it would be hard for me to fix them without them being pointed out. |
It's essentially doing the job of the now-deprecated silverstripe-framework/src/Dev/DevConfigController.php Lines 40 to 44 in 6287b6e
Please point out things like this in the relevant PR - it's a lot easier for me to keep track of changes I need to make to a specific PR if the comment is in that PR.
Those permissions already existed. I'm keeping the same permissions in order to preserve backwards compatibility. |
Yeah I'll assume that most most tasks are being run via the browser rather than CLI, simply because it's generally easier to login as an admin rather than SSH on to a production server, so the lower-case-with-dashes which $segment currently uses is probably the better standard.
I had look through all the tasks, I could find any others like this one I already pointed out
All good |
All PRs merged. CI will be cleaned up in silverstripe/.github#313 |
Thank you to everyone who has worked on this, very glad to see this happening <3 |
sake is basic though functional way to run cli commands
It's very non-standard, and it's likely that we could make the interface significantly better by changing it to use symfony/console instead. There may also be some downstream benefits of making it easier to project to extend/customise if they have a need to
Related
Acceptance criteria
sake
, though possibly some of the commands are different, though preferably notCMS 5 PRs
CMS 6 PRs
kitchen sink run
CI failures are pre-existing
The text was updated successfully, but these errors were encountered: