A new master for Fabrik3 to work with PHP8?

fstorch

Member
PHP7 will no longer get security updates by end of November 2022. My provider will turn off PHP7.4 mid of November already. So far I know that Fabrik 3 is not ready for PHP 8:
Not sure if any other fixes are required.
Any chance that there will be an official master where the fixes are incorporated?
Especially the Dompdf update requires dependent library updates and such composer changes. Would be great, if users wouldn’t have to patch on their own.
 
For current users of Fabrik 3 with php8.1 do you recommend turning joomla errors to 'None' as the error log goes out of control with all the "PHP Deprecated: trim(): Passing null to parameter" type errors which are going out of control.
e.g. see these main errors (which obviously get repeated hundreds of times in the error log after a few minutes of running)
Hopefully these logs will help with patching Fabrik 3 for use with php8.1:
  1. PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /components/com_fabrik/models/join.php on line 180
  2. PHP Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /libraries/vendor/joomla/string/src/phputf8/mbstring/core.php on line 24
  3. PHP Deprecated: mb_substr(): Passing null to parameter #1 ($string) of type string is deprecated in /libraries/vendor/joomla/string/src/phputf8/mbstring/core.php on line 96
  4. PHP Deprecated: mb_substr(): Passing null to parameter #1 ($string) of type string is deprecated in /libraries/vendor/joomla/string/src/phputf8/mbstring/core.php on line 94
  5. PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /libraries/fabrik/fabrik/Helpers/Worker.php on line 1329
  6. PHP Deprecated: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated in /components/com_fabrik/models/list.php on line 1283
  7. PHP Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /components/com_fabrik/models/list.php on line 11622
  8. PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /plugins/fabrik_element/databasejoin/databasejoin.php on line 978
  9. PHP Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in/components/com_fabrik/models/list.php on line 7128
  10. PHP Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /components/com_fabrik/models/list.php on line 7129
  11. PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /components/com_fabrik/fabrik.php on line 131
  12. PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /components/com_fabrik/models/listfilter.php on line 855
  13. PHP Deprecated: htmlspecialchars_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /components/com_fabrik/models/list.php on line 8623
 
I'm leaving logging at standard and don't care much about deprecated messages. Even J!3 issues some as far as I remember. Pretty sure the great F!4 work in progress will eliminate them.

Since next Monday Nov-14th 7AM CET is my providers deadline to move to PHP 8, I took the current master from github today and updated production.
Though it still has dompdf 0.8.6 which doesn't work with PHP8.
So i replaced the according directories from a site where I can use composer.
Some pitfalls which were not Fabrik related:
- had to disable a syslog plugin
- needed to change cache_handler to "file" in configuration.php (to fix: Call to undefined function get_magic_quotes_runtime())

But finally we're running PHP 8 and PDF's look good and Form E-Mails are sent.
Let's see if there migth be any unkown issue, that will be found by users by chance.
 
Just a reminder to all that it is now less than 2 weeks until PHP 7.4 ceases both standard and security support, and less than 2 weeks until PHP 8.0 ceases standard support.

A lot of ISPs will switch you from PHP 7 to PHP 8.1 at some point between 26 November and the end of the year, and if so you probably need to plan to upgrade and test your Joomla/Fabrik sites before then.
 
But in general J!3.10 with Fabrik 3.10 should work with 8.0? ...with 8.1?

I tried to switch to 8.0 and experienced errors during the saving of a form. It is saved to the database and e-mails are sent as well but I get a general joomla error.

get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given.

But only in some Forms. Others are working well.
 
Last edited:
But in general J!3.10 with Fabrik 3.10 should work with 8.0? ...with 8.1?
With PHP 8.0 most errors have been ironed out recently. When was your last GitHub update?
With PHP 8.1... not so sure. I don't think anyone will work on Fabrik 3.x for PHP 8.1 anymore since Fabrik 4 is in the works. Also, AFAIK, J!3 is not completely error-free with PHP 8.1.

I tried to switch to 8.0 and experienced errors during the saving of a form. It is saved to the database and e-mails are sent as well but I get a general joomla error.
get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given.
But only in some Forms. Others are working well.
Again, try a Github update. For instance, there had been issues with the email plugin which have long been fixed.
 
In Fabrik4 we are working with php8.1 and we are trying to backport fixes for php8.1 related issues.
So yes, do a GitHub update.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top