Welcome Guest, Not a member yet? Register   Sign In
PRs for 4.4 are waiting for reviews
#7

Yes.

If you use appstarter, run the following command:

Code:
$ php builds development

The above command changes composer.json:

Code:
    "require": {
        "php": "^7.4 || ^8.0",
        "codeigniter4/codeigniter4": "dev-develop"
    },

Change the version to 4.4 branch:

Code:
    "require": {
        "php": "^7.4 || ^8.0",
        "codeigniter4/codeigniter4": "4.4.x-dev"
    },

Run composer update:

Code:
$ composer update

Update project files. See https://github.com/codeigniter4/CodeIgni...le-changes

Code:
$ cp vendor/codeigniter4/codeigniter4/public/index.php public/index.php
$ cp vendor/codeigniter4/codeigniter4/app/Config/Routing.php app/Config/

Remove Router settings in Config/Routes.php:

Code:
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -5,22 +5,6 @@ namespace Config;
// Create a new instance of our RouteCollection class.
$routes = Services::routes();

-/*
- * --------------------------------------------------------------------
- * Router Setup
- * --------------------------------------------------------------------
- */
-$routes->setDefaultNamespace('App\Controllers');
-$routes->setDefaultController('Home');
-$routes->setDefaultMethod('index');
-$routes->setTranslateURIDashes(false);
-$routes->set404Override();
-// The Auto Routing (Legacy) is very dangerous. It is easy to create vulnerable apps
-// where controller filters or CSRF protection are bypassed.
-// If you don't want to define all routes, please use the Auto Routing (Improved).
-// Set `$autoRoutesImproved` to true in `app/Config/Feature.php` and set the following to true.
-// $routes->setAutoRoute(false);
-
/*
  * --------------------------------------------------------------------
  * Route Definitions
@@ -36,20 +20,3 @@ $routes->post('form1', 'Form::form1');

$routes->get('form2', 'Form::form2');
$routes->post('form2', 'Form::form2');
-
-/*
- * --------------------------------------------------------------------
- * Additional Routing
- * --------------------------------------------------------------------
- *
- * There will often be times that you need additional routing and you
- * need it to be able to override any defaults in this file. Environment
- * based routes is one such time. require() additional route files here
- * to make that happen.
- *
- * You will have access to the $routes object within that file without
- * needing to reload it.
- */
-if (is_file(APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php')) {
-    require APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php';
-}
Reply


Messages In This Thread
PRs for 4.4 are waiting for reviews - by kenjis - 04-07-2023, 07:20 PM
RE: PRs for 4.4 are waiting for reviews - by kenjis - 08-17-2023, 01:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB