Skip to content

PHP 8.1 | NewClasses: account for PHP 8.1 changes#1328

Merged
wimg merged 3 commits intodevelopfrom
php-8.1/newclasses-account-for-php-8.1-changes
Mar 16, 2022
Merged

PHP 8.1 | NewClasses: account for PHP 8.1 changes#1328
wimg merged 3 commits intodevelopfrom
php-8.1/newclasses-account-for-php-8.1-changes

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Mar 9, 2022

PHP 8.1 | NewClasses: handle new IntlDatePatternGenerator class

Note: in contrast to the original RFC proposal, the procedural functions mentioned in the RFC were not included in the final implementation.

Includes unit test.

Refs:

PHP 8.1 | NewClasses: add support for Fibers

Support for Fibers has been added.

I've gone through all PRs I could find related to this and these were the only classes I could find to account for.

Includes unit tests.

Refs:

PHP 8.1 | NewClasses: handle new CURLStringFile class

Added CURLStringFile, which can be used to post a file from a string rather
than a file:

$file = new CURLStringFile($data, 'filename.txt', 'text/plain');
curl_setopt($curl, CURLOPT_POSTFIELDS, ['file' => $file]);

Includes unit test.

Refs:

Related to #1299

jrfnl added 3 commits March 9, 2022 02:34
Note: in contrast to the original RFC proposal, [the procedural functions mentioned in the RFC were not included in the final implementation](php/php-src#6771 (comment)).

Includes unit test.

Refs:
* https://www.php.net/manual/en/migration81.new-classes.php#migration81.new-classes.intl
* https://wiki.php.net/rfc/intldatetimepatterngenerator
* php/php-src#6771
* php/php-src@ae9f6e7
> Support for Fibers has been added.

I've gone through all PRs I could find related to this and these were the only classes I could find to account for.

Includes unit tests.

Refs:
* https://www.php.net/manual/en/migration81.new-features.php#migration81.new-features.core.fibers
* https://wiki.php.net/rfc/fibers
* https://www.php.net/manual/en/language.fibers.php
* php/php-src#6875
* php/php-src@c276c16
> Added `CURLStringFile`, which can be used to post a file from a string rather
> than a file:
> ```php
> $file = new CURLStringFile($data, 'filename.txt', 'text/plain');
> curl_setopt($curl, CURLOPT_POSTFIELDS, ['file' => $file]);
> ```

Includes unit test.

Refs:
* https://github.com/php/php-src/blob/f67986a9218f4889d9352a87c29337a5b6eaa4bd/UPGRADING#L231-L235
* php/php-src#6456
* php/php-src@e727919
@jrfnl jrfnl added Type: enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Mar 9, 2022
@jrfnl jrfnl added this to the 10.0.0 milestone Mar 9, 2022
@jrfnl jrfnl requested a review from wimg March 9, 2022 02:00
@wimg wimg merged commit 87131c2 into develop Mar 16, 2022
@wimg wimg deleted the php-8.1/newclasses-account-for-php-8.1-changes branch March 16, 2022 19:38
@jrfnl jrfnl removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants