Skip to content

Commit 3794858

Browse files
feature #334 [PHP 8.1] Add CURLStringFile polyfill (Ayesh, nicolas-grekas)
This PR was merged into the 1.27-dev branch. Discussion ---------- [PHP 8.1] Add `CURLStringFile` polyfill PHP 8.1 adds a [new class `CURLStringFile`](https://php.watch/versions/8.1/CURLStringFile), that works similar to `CURLFile`, but does not require a _path_ to a file, and accepts a string of file contents instead. This can be polyfilled with a `CURLFile` sub class that uses a `data://` URI inside a constructure and calling `CURLFile::__construct` with that data URI. Closes #333. I will leave this as a draft because I'm not sure how to write tests for this. I'm thinking a PHP CLI server that echoes `$_FILES`, and a test that checks the returned content for file(s) that it uploaded. Commits ------- 0427220 Bump for 1.28 a07f86f [PHP 8.1] Add `CURLStringFile` polyfill
2 parents db06e00 + 0427220 commit 3794858

File tree

26 files changed

+147
-20
lines changed

26 files changed

+147
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.28.0
2+
3+
* Add `CURLStringFile` class introduced in PHP 8.1 (but only if PHP >= 7.4 is used)
4+
15
# 1.27.0
26

37
* Add PHP 8.3 polyfill for `json_validate()`

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Polyfills are provided for:
6262
- the `enum_exists` function introduced in PHP 8.1;
6363
- the `MYSQLI_REFRESH_REPLICA` constant introduced in PHP 8.1;
6464
- the `ReturnTypeWillChange` attribute introduced in PHP 8.1;
65+
- the `CURLStringFile` class introduced in PHP 8.1 (but only if PHP >= 7.4 is used);
6566
- the `AllowDynamicProperties` attribute introduced in PHP 8.2;
6667
- the `SensitiveParameter` attribute introduced in PHP 8.2;
6768
- the `SensitiveParameterValue` class introduced in PHP 8.2;

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@
6464
"src/Intl/MessageFormatter/Resources/stubs",
6565
"src/Intl/Normalizer/Resources/stubs",
6666
"src/Php82/Resources/stubs",
67+
"src/Php81/Resources/stubs",
6768
"src/Php80/Resources/stubs",
6869
"src/Php73/Resources/stubs"
6970
]
7071
},
7172
"minimum-stability": "dev",
7273
"extra": {
7374
"branch-alias": {
74-
"dev-main": "1.27-dev"
75+
"dev-main": "1.28-dev"
7576
}
7677
}
7778
}

src/Apcu/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"minimum-stability": "dev",
2626
"extra": {
2727
"branch-alias": {
28-
"dev-main": "1.27-dev"
28+
"dev-main": "1.28-dev"
2929
},
3030
"thanks": {
3131
"name": "symfony/polyfill",

src/Ctype/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"minimum-stability": "dev",
3232
"extra": {
3333
"branch-alias": {
34-
"dev-main": "1.27-dev"
34+
"dev-main": "1.28-dev"
3535
},
3636
"thanks": {
3737
"name": "symfony/polyfill",

src/Iconv/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"minimum-stability": "dev",
3232
"extra": {
3333
"branch-alias": {
34-
"dev-main": "1.27-dev"
34+
"dev-main": "1.28-dev"
3535
},
3636
"thanks": {
3737
"name": "symfony/polyfill",

src/Intl/Grapheme/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"minimum-stability": "dev",
2929
"extra": {
3030
"branch-alias": {
31-
"dev-main": "1.27-dev"
31+
"dev-main": "1.28-dev"
3232
},
3333
"thanks": {
3434
"name": "symfony/polyfill",

src/Intl/Icu/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"minimum-stability": "dev",
3333
"extra": {
3434
"branch-alias": {
35-
"dev-main": "1.27-dev"
35+
"dev-main": "1.28-dev"
3636
},
3737
"thanks": {
3838
"name": "symfony/polyfill",

src/Intl/Idn/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"minimum-stability": "dev",
3535
"extra": {
3636
"branch-alias": {
37-
"dev-main": "1.27-dev"
37+
"dev-main": "1.28-dev"
3838
},
3939
"thanks": {
4040
"name": "symfony/polyfill",

src/Intl/MessageFormatter/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"minimum-stability": "dev",
3030
"extra": {
3131
"branch-alias": {
32-
"dev-main": "1.27-dev"
32+
"dev-main": "1.28-dev"
3333
},
3434
"thanks": {
3535
"name": "symfony/polyfill",

0 commit comments

Comments
 (0)