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

If you are interested, please review:
https://github.com/codeigniter4/CodeIgni...dated-desc
Reply
#2

v4.4.0 is around the corner.
See https://github.com/codeigniter4/CodeIgni...ssues/7812

Testing and reviews are welcome, and your contributions make it release sooner.
Reply
#3

Thanks CI Teams

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#4

Testing 4.4 branch is also welcome!
https://github.com/codeigniter4/CodeIgniter4/tree/4.4
Reply
#5

Thank you CI Development Team.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#6

@kenjis is it possible to test the branch by installing it as a dependency? In vendor/ path
Reply
#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
#8

@kenjis my test project is working.
1. Except for the parameters Entity::injectRawData() the new method is BC.
2. Why is there a difference in the class Config\App::class and \Config\App::class?

PHP Code:
// before working, in 4.4 return null
$app Config config(Config\App::class);
// in 4.4 working
$app Config config(\Config\App::class); 
Reply
#9

(This post was last modified: 08-18-2023, 01:28 PM by kenjis.)

@ozornick Oh, thank you for checking!

1. Why BC? What will be broken? It just adds a new method.

2. Oh, because your code was wrong. 
"Config\App::class" means "\Some\Where\Config\App::class" if the file has "namespace Some\Where;".
And even if it does not exist, v4.3.x looks for "App" (short classname) in "\Config" (because of preferApp).
But in 4.4, the framework looks for "\Some\Where\Config\App::class" because you specify class with the namespace,

See https://github.com/codeigniter4/CodeIgni...-factories
Reply
#10

The user guide explanation is not a bit accurate.
I sent a PR to improve: https://github.com/codeigniter4/CodeIgni...7840/files
Reply




Theme © iAndrew 2016 - Forum software by © MyBB