Lot of code on SuiteCRM has constructors of PHP4 style. Since PHP 7.0 triggers deprecation messages everywhere.
Most of this code points out that it should be removed on version 7.8, SuiteCRM is on 7.9 and the code still there. When code is executed with PHP4 constructors, warnings message shows on the screen. Sometimes, it mess up with the markup.
No deprecations messages.
Screen and logs files are filled up with messages as Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;
The error level could be adjusted, but defeat the purpose of fixing this problems on time before they are completely removed and become errors.
On my IDE I can run this regular expression on the root folder to identify all files that contains classes and functions with the same name (PHP4 constructors):
class\s+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\s\{\n]{1}[[:print:]\n\r\t]*function\s+\1\s*\(
It produces some false matches, but they are very little.
Yes, we have enable the deprecation error level because we must get rid of all obsolete code. Our primary goal is assuring that SuiteCRM will work on PHP 7.1. Secondary goal is to move to PHP 7.2 (production) as soon as possible due that 7.1 has major bug with TS version on Windows and will not be fixed. At the moment we are running 7.1 NTS with FastCGI, but we are not happy with the performance. Before we could but move on, all these deprecations need to be fixed.
I could work on a pull request with all the required changes, however, it will be a big one as I can count approximate around 500 files will need changes. Then I have to backtrace making sure there are not calls of those classes using the PHP4 constructor or static calls.
@Dillon-Brown has this been fixed? I think I saw a commit recently that removed the deprecated constructors.
Yeah I have a PR for it: #6750. Still need to take a look at the failing Travis though.
Great to see some action here. I thought this issue was ignored.
So far we have put our CRM server on ice, so it doesn't change from PHP 7.1. On the last year we have optimized the FastCGI to give acceptable performance, but it requires that we dedicate the double of memory.
Looking forward that this is completed, so we could resume our testing on PHP 7.2 and now 7.3.
Ok that is great news. At the moment, we were stuck on old version 7.8.5 because the upgrade to a recent version failed (all modules the Edit layout just showed the overview panel). I have to revert the upgrade.
I have to dedicate some time to try to upgrade on smaller stages instead all the way to the latest.
I will report back if I find any issue. Ahead of time thanks for the hard work put to clean up this code!!