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

refactor: remove migrations routes #5652

Merged
merged 2 commits into from
Feb 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions contributing/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,9 @@ scans and keep performance high.

## Command-Line Support

CodeIgniter has never been known for it's strong CLI support. However,
CodeIgniter has never been known for its strong CLI support. However,
if your package could benefit from it, create a new file under
**system/Commands**. The class contained within is simply a controller
that is intended for CLI usage only. The `index()` method should provide
a list of available commands provided by that package.

Routes must be added to **system/Config/Routes.php** using the `cli()`
method to ensure it is not accessible through the browser, but is
restricted to the CLI only.

See the **MigrationsCommand** file for an example.
**system/Commands**.

## Documentation

Expand Down
5 changes: 0 additions & 5 deletions system/Config/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@
* already loaded up and ready for us to use.
*/

// Migrations
$routes->cli('migrations/(:segment)/(:segment)', '\CodeIgniter\Commands\MigrationsCommand::$1/$2');
$routes->cli('migrations/(:segment)', '\CodeIgniter\Commands\MigrationsCommand::$1');
$routes->cli('migrations', '\CodeIgniter\Commands\MigrationsCommand::index');

// CLI Catchall - uses a _remap to call Commands
$routes->cli('ci(:any)', '\CodeIgniter\CLI\CommandRunner::index/$1');