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

Feature: "spark routes" command shows routes with closure. #5651

Merged

Conversation

iRedds
Copy link
Collaborator

@iRedds iRedds commented Feb 3, 2022

Description

The "spark routes" command shows routes with a closure.

+--------+----------------------------+------------------------------------------------+
| Method | Route                      | Handler                                        |
+--------+----------------------------+------------------------------------------------+
| GET    | /                          | \App\Controllers\Home::index                   |
| GET    | closure                    | Closure                                        |

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

Signed-off-by: Andrey Pyzhikov <5071@mail.ru>
@kenjis kenjis added the enhancement PRs that improve existing functionalities label Feb 3, 2022
@kenjis
Copy link
Member

kenjis commented Feb 4, 2022

This is just preference, but I like (Closure):

+---------+----------------------------+------------------------------------------------+
| Method  | Route                      | Handler                                        |
+---------+----------------------------+------------------------------------------------+
| GET     | /                          | \App\Controllers\Home::index                   |
| GET     | feed                       | (Closure)                                      |
| HEAD    | feed                       | (Closure)                                      |
| POST    | feed                       | (Closure)                                      |
| PUT     | feed                       | (Closure)                                      |
| DELETE  | feed                       | (Closure)                                      |
| OPTIONS | feed                       | (Closure)                                      |
| TRACE   | feed                       | (Closure)                                      |
| CONNECT | feed                       | (Closure)                                      |
| CLI     | ci(.*)                     | \CodeIgniter\CLI\CommandRunner::index/$1       |
| CLI     | feed                       | (Closure)                                      |
| auto    | /                          | \App\Controllers\Home::index                   |
| auto    | home                       | \App\Controllers\Home::index                   |
| auto    | home/index[/...]           | \App\Controllers\Home::index                   |
+---------+----------------------------+------------------------------------------------+

Signed-off-by: Andrey Pyzhikov <5071@mail.ru>
@iRedds
Copy link
Collaborator Author

iRedds commented Feb 4, 2022

I don't mind.

@samsonasik samsonasik merged commit 1c455b5 into codeigniter4:develop Feb 5, 2022
@samsonasik
Copy link
Member

Thank you @iRedds

@iRedds iRedds deleted the feature/command-routes-closure branch February 5, 2022 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants