<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hi all,<br />
<br />
I’ve done a static analysis for the new release. The idea is to highlight are of interventions, defining a starting point to decrease the technical debt this project has piled up.<br />
<br />
I’ve tried to run the project (clean install) with php7.4 and mysql 8 + docker, install started unfortunately I had 504 during the installation but I’m working on it, when it’s finished I’ll be sharing my GitHub repo with a working docker file with LEMP. I’ve tried PHP8 too just out of curiosity. As expected it doesn’t even launch the wizard: a lot of fatal errors. For the moment I can tell these 2:<br />
1. PearDatabase: use of curly braces instead of []<br />
2. AntlrLexer: them Ian class seems to be extending a base class but it’s following the definition in the base class for matchAny and Re. I couldn’t find the php version for this project, so if you guys wrote it, look at it.<br />
<br />
Now coming back to static Analysis, I’ve done it with PHPInsights for the modules folder (launch this command from cam root folder - after install through composer - : php -d memory_limit=4000M ./vendor/bin/phpinsights analyse modules ), you can find it zipped as a json file, the tool did truncated some but since it’s easy to launch please do relaunch it. - although it will take a bit… the generated file is about 85MB...<br />
<br />
Some thoughts:<br />
As expected there is no proper implementation of  OOP (No visibility keywords, no namespaces), there is extensive use of global variables and super global variables such as $_REQUEST - which is needless to say harmful. Other than this there are too many nested loops (in some part nested loop level is 7 whereas recommended is 2 or 3, this has huge implications on performance!), many declared and unused variables.<br />
<br />
It’s safe to say that if PHP7.4 is still letting some of the old practices go on, PHP8 will break the code badly, since most of the code is legacy. I was hoping that at least there would be composer but that’s for the next release, hopefully.<br />
<br />
What are your thoughts? How can we start to approach?</div>
</div>
<div name="messageSignatureSection"><br />
<div class="matchFont"><font color="#C6C6C6"><b><span style="">Sukhdev Mohan</span></b></font><span style=""></span><br />
<font color="#999999"><b><span style="">Developer</span></b></font><br /></div>
</div>
</body>
</html>