Replies: 5 comments 6 replies
-
You won't get any useful answers this way. Please state any specific problems you ran into. |
Beta Was this translation helpful? Give feedback.
-
issue is that cakephp 2 do not use autoloading but custom classes to import/use other classes like this Current config is = where phpstan-bootstrap.php contain define('APP_DIR', 'app');
define('ROOT', dirname(__FILE__));
define('WEBROOT_DIR', 'webroot');
define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS);
$_SERVER['SERVER_NAME'] = 'phpstan-tests'; and lib/Cake/bootstrap.php contain -> https://github.com/cakephp/cakephp/blob/2.10.24/lib/Cake/bootstrap.php |
Beta Was this translation helpful? Give feedback.
-
I've got an old project with cakephp2.10 and would like to integrate static analysis tool. |
Beta Was this translation helpful? Give feedback.
-
Just for reference for those who is looking existing rules for cakephp2: https://github.com/sidz/phpstan-cakephp2 |
Beta Was this translation helpful? Give feedback.
-
In case anyone is further intersted, I made a fork of previous package:
|
Beta Was this translation helpful? Give feedback.
-
As CakePHP 2 doesn't make usage of namespace and imports files in a "weird" way, phpstan shows many errors that are actually acceptable for Cake 2 projects.
I was curious if anyone has a good configuration file to be used against Cake 2 projects.
Beta Was this translation helpful? Give feedback.
All reactions