CodeIgniter Forums
PHP8 problems - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: PHP8 problems (/showthread.php?tid=78336)



PHP8 problems - dcyilmaz - 01-05-2021

Hi, im using ci4 and working well other php versions but i have problem with php8.
first problems solved with here: https://forum.codeigniter.com/thread-78146.html
and now my route not working. 
PHP Code:
$routes->get('/''IndexController::index'); 

and getting this error: Controller method is not found: index
so if i do my index function static route working like this. But i cant all functions to static please help.
PHP Code:
<?php namespace App\Controllers;
class 
IndexController extends BaseController
{
  public function __construct(){
    var_dump("TEST");
  }
public static function 
index()
{
return 
view('welcome_message');
}
//--------------------------------------------------------------------





RE: PHP8 problems - dcyilmaz - 01-05-2021

i just deleted xampp and loaded 7.4php version.


RE: PHP8 problems - InsiteFX - 01-05-2021

Because PHP 8.0.0 is not yet compatible with CodeIgniter 4. Switch to PHP 7.4.13.