Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.6] Add PHP 8.3 support #14

Merged
merged 4 commits into from
Mar 17, 2024
Merged

[1.6] Add PHP 8.3 support #14

merged 4 commits into from
Mar 17, 2024

Conversation

GrahamCampbell
Copy link
Member

No description provided.

Copy link

stale bot commented Mar 13, 2024

This issue has been automatically marked as stale because there has been no recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 13, 2024
divinity76 added a commit to divinity76/wrench that referenced this pull request Mar 17, 2024
strftime was deprecated in PHP8.1.0.
This is the only PHP8.3.0 compatibility issue detected by the PHPCompatibility scanner git version right now:

hans@DESKTOP-EE15SLU:~/projects/PHPCompatibility$ ./vendor/bin/phpcs ../wrench/ --standard=PHPCompatibility

FILE: /home/hans/projects/wrench/examples/StatusApplication.php
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
 112 | WARNING | Function strftime() is deprecated since PHP 8.1; Use date() or IntlDateFormatter::format() instead
--------------------------------------------------------------------------------------------------------------------

Time: 710ms; Memory: 16MB

Related: chrome-php#14 and chrome-php/chrome#605
@divinity76 divinity76 mentioned this pull request Mar 17, 2024
Copy link

@divinity76 divinity76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/PHPCompatibility/PHPCompatibility detects no relevant PHP8.3 compatibility issues.
LGTM 👍

@GrahamCampbell
Copy link
Member Author

GrahamCampbell commented Mar 17, 2024

LGTM 👍

I don't know how you can say that, when the CI shows that the code is broken on PHP 8.3.

@stale stale bot removed the stale label Mar 17, 2024
@divinity76
Copy link

LGTM 👍

I don't know how you can say that, when the CI shows that the code is broken on PHP 8.3.

somehow missed that, sorry.

Anyway, made a fix: #20

divinity76 and others added 3 commits March 17, 2024 22:32
* PHP8.3 compatibility

Turns out PHP<8.3's proc_open does not really care if the requested working_dir does not exist, while PHP>=8.3's proc_open bails if it does not exist.

And due to a typo in the code, the dir never existed.

And due to insufficient error checking, the error was not really detected.

Took fking 4 hours to track down, and the fix is 1 byte. divinity76#1

Should probably complain to the php-src bugtracker, i am guessing the proc_open behavior change was unintentional

* StyleCI
strftime was deprecated in PHP8.1.0.
This is the only PHP8.3.0 compatibility issue detected by the PHPCompatibility scanner git version right now:

hans@DESKTOP-EE15SLU:~/projects/PHPCompatibility$ ./vendor/bin/phpcs ../wrench/ --standard=PHPCompatibility

FILE: /home/hans/projects/wrench/examples/StatusApplication.php
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
 112 | WARNING | Function strftime() is deprecated since PHP 8.1; Use date() or IntlDateFormatter::format() instead
--------------------------------------------------------------------------------------------------------------------

Time: 710ms; Memory: 16MB

Related: #14 and chrome-php/chrome#605
@GrahamCampbell GrahamCampbell merged commit 504b722 into 1.6 Mar 17, 2024
14 checks passed
@GrahamCampbell GrahamCampbell deleted the php83 branch March 17, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants