[Vtigercrm-developers] Static analysis for vtiger 7.4
Sukhdev Mohan
s.mohan at myti.it
Mon Aug 2 05:55:37 GMT 2021
I've just done a preliminary analysis. Work has yet to be started, given
that there is a lot to work on, there will be MRs coming your way. It
should be a team effort thoughm
Il lun 2 ago 2021, 07:42 Prasad <prasad at vtiger.com> ha scritto:
> Submit MR to increase the compatibility.
>
> On Mon, Aug 2, 2021 at 2:59 AM Sukhdev Mohan <s.mohan at myti.it> wrote:
>
>> Hi all,
>>
>> 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.
>>
>> 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:
>> 1. PearDatabase: use of curly braces instead of []
>> 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.
>>
>> 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...
>>
>> Some thoughts:
>> 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.
>>
>> 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.
>>
>> What are your thoughts? How can we start to approach?
>>
>> *Sukhdev Mohan*
>> *Developer*
>> _______________________________________________
>> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20210802/077407c0/attachment.html>
More information about the vtigercrm-developers
mailing list