No Code Attached Yet PHP 8.x
avatar exstreme
exstreme
14 Mar 2022

Steps to reproduce the issue

Turn on error displaying

System information (as much as possible)

Joomla 4.1 PHP 8.1

Deprecated
: substr(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: substr(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: substr(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: substr(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: substr(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: substr(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: substr(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: substr(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
792

Deprecated
: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php
on line
808

Deprecated
: Implicit conversion from float -INF to int loses precision in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\DataFormatter\DataFormatter.php
on line
81

And some deprecations in fields with date:
Deprecated: Function strftime() is deprecated in C:\OpenServer\domains\joomla.test\libraries\src\Form\Field\CalendarField.php on line 277

avatar exstreme exstreme - open - 14 Mar 2022
avatar joomla-cms-bot joomla-cms-bot - change - 14 Mar 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Mar 2022
avatar brianteeman
brianteeman - comment - 14 Mar 2022

Please re-test with the nightly version - pretty sure most if not all of these have been resolved

avatar richard67
richard67 - comment - 14 Mar 2022

They are all about the debug bar, i.e. it needs to switch on debug in global configuration in addition to setting display errors to reproduce the issue.

I haven’t tested today, but as far as I remember from recent tests, all these deprecations for the debug bar haven’t been fixed yet.

avatar richard67
richard67 - comment - 14 Mar 2022

The last one is not about the debug bar but about the calendar. That might be fixed meanwhile, not sure.

avatar Quy Quy - change - 14 Mar 2022
Labels Added: ?
avatar Quy Quy - labeled - 14 Mar 2022
avatar Quy
Quy - comment - 15 Mar 2022

Related #36772

avatar exstreme
exstreme - comment - 15 Mar 2022

4.1.1-dev - still reproduce problems with debug and calendar

avatar alikon
alikon - comment - 15 Mar 2022

there are some merged PR's upstream https://github.com/maximebf/php-debugbar/pulls?q=is%3Apr+is%3Aclosed but still not a new version of php-debugbar

avatar richard67
richard67 - comment - 15 Mar 2022

@alikon Hmm, they have a new release v1.18.0 from February 10 which includes your upstream PR for PHP 8.1 deprecations, but 2 other PRs were merged on February 11. So maybe the v1.18.0 doesn't fix everything, but it should fix a lot and so be a huge progress. Do you want to make the PR to update the CMS to v1.18.0? As far as I saw you also did the last update for the debugbar in last December.

avatar alikon alikon - change - 15 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-15 18:33:21
Closed_By alikon
avatar alikon alikon - close - 15 Mar 2022
avatar alikon
alikon - comment - 15 Mar 2022

please test #37278

avatar alikon alikon - change - 15 Mar 2022
Status Closed New
Closed_Date 2022-03-15 18:33:21
Closed_By alikon
avatar alikon alikon - reopen - 15 Mar 2022
avatar alikon
alikon - comment - 15 Mar 2022
avatar richard67
richard67 - comment - 15 Mar 2022

New PR for the debug bar is #37279 . It replaces #37278 .

avatar exstreme
exstreme - comment - 15 Mar 2022

Deprecated
: Implicit conversion from float -INF to int loses precision in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\DataFormatter\DataFormatter.php
on line
81

tested on #37279

avatar richard67
richard67 - comment - 15 Mar 2022

Deprecated : Implicit conversion from float -INF to int loses precision in C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\DataFormatter\DataFormatter.php on line 81

tested on #37279

@exstreme You mean that was the only one which was left after you have applied the changes from that PR? In this case your test was successful because the PR only claims to solve the debug bar notices, not the one for the calendar. If that is the case, please go to the issue tracker here https://issues.joomla.org/tracker/joomla-cms/37279 , use the "Test this" button at the top left and then select the right test result and submit. Thanks in advance.

We will leave your issue open until the remaining notice about the calendar field will be solved with another PR.

avatar exstreme
exstreme - comment - 15 Mar 2022

@richard67 Yes, test was success with debugbar, but one deprecation was still left for the debugbar

avatar exstreme
exstreme - comment - 15 Mar 2022

image

avatar richard67
richard67 - comment - 15 Mar 2022

I just see they will be solved with the next version of the debug bar, which is not available yet. See here the merged PR in their repository: maximebf/php-debugbar#498 . Their latest version 1.18 is from February 10, and that PR was merged on February 11. So for now we have to wait for that version, and my PR can only fix all the other ones except of these 2.

We will leave your issue open until their new version is available.

avatar richard67
richard67 - comment - 15 Mar 2022

I've subscribed to get notified when they make a new release of the debug bar, so as soon as that happens I can make another PR to fix the remaining deprecation notices.

avatar exstreme
exstreme - comment - 4 Apr 2022

Deprecated
: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in
C:\OpenServer\domains\joomla.test\libraries\vendor\joomla\input\src\Input.php
on line
149

Should I create new issue or can update this?

avatar laoneo
laoneo - comment - 5 Apr 2022

@exstreme on which branch do you get that issue as it should be fixed already.

avatar exstreme
exstreme - comment - 5 Apr 2022

@exstreme on which branch do you get that issue as it should be fixed already.

4.1.2 stable

avatar richard67
richard67 - comment - 5 Apr 2022

@laoneo Possibly fixed in the framework but not in the CMS yet, see #37441 .

avatar exstreme
exstreme - comment - 5 Apr 2022

Still active issues too:

Deprecated
: Implicit conversion from float -INF to int loses precision in
C:\OpenServer\domains\joomla.test\libraries\vendor\maximebf\debugbar\src\DebugBar\DataFormatter\DataFormatter.php
on line
81

We are waiting for new version of DebugBar

And some deprecations in fields with date:
Deprecated: Function strftime() is deprecated in C:\OpenServer\domains\joomla.test\libraries\src\Form\Field\CalendarField.php on line 277

avatar richard67
richard67 - comment - 5 Apr 2022

@exstreme I stated already here #37274 (comment) and here #37274 (comment) that I am watching their repository and will make a PR here as soon as they made a new release. But that hasn't happened yet. No need to repeat that again and again.

avatar exstreme
exstreme - comment - 5 Apr 2022

That's why I wrote:

We are waiting for new version of DebugBar

I was just trying to generalize and update

avatar laoneo
laoneo - comment - 7 Apr 2022

Please test #37502 which solves the input error.

avatar laoneo
laoneo - comment - 7 Apr 2022

Please test #37488 which solves the debug bar issue.

avatar Quy
Quy - comment - 7 Apr 2022

Deprecated: Function strftime() is deprecated in C:\OpenServer\domains\joomla.test\libraries\src\Form\Field\CalendarField.php on line 277

Please test #37373.

avatar brianteeman
brianteeman - comment - 15 Jun 2022

Surely this can be closed now?

avatar Quy Quy - change - 15 Jun 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-06-15 14:21:47
Closed_By Quy
Labels Added: PHP 8.x
Removed: ?
avatar Quy Quy - close - 15 Jun 2022

Add a Comment

Login with GitHub to post a comment