Closed mv-steven closed 2 years ago
Not sure, but it seems to be solvable using https://github.com/codeigniter4/CodeIgniter4/pull/6133#issue-1273276433.
It is difficult to find the following code block with regex.
$routes->group('api', function($routes) {
...
});
So a fundamental solution seems difficult in the current situation. https://github.com/codeigniter4/CodeIgniter4/pull/6133#issue-1273276433 also finds a line and adds a new line before/after it.
I bet you could use token_get_all to determine whether a given line is in between a closure's (or something else's) braces
Yes, we want a method to
$routes->...;
blockservice('auth')->routes($routes);
after itThis bug was fixed in develop
.
Please check.
Not a big issue but something that stood out during the installation process.
I have an existing route group defined in Routes.php, and shield:setup put the route definition in the group closure, like this:
Again, not a big issue, anyone using code modification tools should be reviewing what changes are being made. Just wanted to make sure this was known.