Skip to content

[4.0] PHP 8 Ensure that we have a valid date#36396

Closed
PhilETaylor wants to merge 8 commits intojoomla:4.1-devfrom
PhilETaylor:patch-312
Closed

[4.0] PHP 8 Ensure that we have a valid date#36396
PhilETaylor wants to merge 8 commits intojoomla:4.1-devfrom
PhilETaylor:patch-312

Conversation

@PhilETaylor
Copy link
Copy Markdown
Contributor

@PhilETaylor PhilETaylor commented Dec 24, 2021

Code review

Symptoms:

Screenshot 2021-12-24 at 18 05 54

  <b>Deprecated</b>:  DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in <b>/tests/www/postgres/libraries/src/Date/Date.php</b> on line <b>126</b>

Unit test before PR

I mean, the provided unit test in this PR, before the change the Date.php

libraries/vendor/bin/phpunit tests/Unit/Libraries/Cms/Date/DateTest.php

PHPUnit 8.5.21 by Sebastian Bergmann and contributors.

..........PHP Deprecated:  DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /Users/phil/Sites/joomla-cms/libraries/src/Date/Date.php on line 126
.                                                       11 / 11 (100%)
Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /Users/phil/Sites/joomla-cms/libraries/src/Date/Date.php on line 126


Time: 34 ms, Memory: 10.00 MB

OK (11 tests, 33 assertions)

Unit test after PR

libraries/vendor/bin/phpunit tests/Unit/Libraries/Cms/Date/DateTest.php


PHPUnit 8.5.21 by Sebastian Bergmann and contributors.

...........                                                       11 / 11 (100%)

Time: 52 ms, Memory: 10.00 MB

OK (11 tests, 33 assertions)

@PhilETaylor

This comment was marked as abuse.

@brianteeman
Copy link
Copy Markdown
Contributor

such a short memory. it was only march this year

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@alikon alikon added the PHP 8.x PHP 8.x deprecated issues label Dec 27, 2021
@alikon
Copy link
Copy Markdown
Contributor

alikon commented Dec 29, 2021

I have tested this item ✅ successfully on 4db98d7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36396.

@PhilETaylor

This comment was marked as abuse.

@chmst chmst changed the base branch from 4.0-dev to 4.1-dev January 31, 2022 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP 8.x PHP 8.x deprecated issues Unit/System Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants