-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Rely on iconv and symfony/polyfill-* #16317
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
Conversation
The DoctrineBridge needs an update of the |
@xabbuh not sure: iconv is an implicit requirement now (same as ext-json) |
@@ -17,25 +17,25 @@ | |||
], | |||
"require": { | |||
"php": ">=5.3.9", | |||
"paragonie/random_compat": "~1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be kept (random_bytes()
is used in the SecureRandom
class).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, I'm going to add random_compat to polyfill-php70 that's why it's removed from here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
@nicolas-grekas Is iconv even available on Windows by default? |
@xabbuh yes, it's bundled on Windows without adding any dll, at least in the binaries provided on windows.php.net |
Is the idea also to move the Intl component to Polyfill? Isn't the Intl component not basically a Polyfill or does it do more? |
@@ -52,7 +52,7 @@ public static function parse($value, $exceptionOnInvalidType = false, $objectSup | |||
return ''; | |||
} | |||
|
|||
if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { | |||
if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this constant polyfilled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we check for extension_loaded('mbstring')
here ? Only the extension itself can overload functions anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the extension must be enabled for ini_get to return 2
so this is equivalent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1c39e08
to
e8c5ffc
Compare
@Tobion there where a few missing require for symfony/polyfill-intl-icu that I fixed. I looked at symfony/intl and it's both a shim and a utility component. I added |
1baf102
to
11e866e
Compare
Tests are green! (appveyor failure is a transient test) |
@@ -330,6 +330,9 @@ public function escape($value, $context = 'html') | |||
*/ | |||
public function setCharset($charset) | |||
{ | |||
if ('UTF8' === $charset = strtoupper($charset)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need that? Shouldn't it be deprecated if it is for bc? Looks like a hack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's because iconv on windows doesn't accept utf8 as an encoding name: only utf-8 is supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to add this as comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment added
11e866e
to
062fa04
Compare
👍 Status: Reviewed |
0c9a2e6
to
0e052da
Compare
0e052da
to
303f05b
Compare
Thank you @nicolas-grekas. |
This PR was merged into the 2.8 branch. Discussion ---------- Rely on iconv and symfony/polyfill-* | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #16240 | License | MIT | Doc PR | - Status: needs work symfony/polyfill-* packages are not ready yet. Still, review welcomed. Commits ------- 303f05b Rely on iconv and symfony/polyfill-*
I merged 2.8 in master and resolved all the conflicts. |
@@ -16,7 +16,8 @@ | |||
} | |||
], | |||
"require": { | |||
"php": ">=5.3.9" | |||
"php": ">=5.3.9", | |||
"symfony/polyfill-php54": "~1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong: #16382
…5 (Tobion) This PR was merged into the 2.8 branch. Discussion ---------- [Serializer] polyfill for json_last_error_msg is in php 5.5 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16317 | License | MIT | Doc PR | - We need the polyfill for `json_last_error_msg` which is part of php 5.5, not 5.4. Commits ------- fb031f1 [Serializer] polyfill for json_last_error_msg is in php 5.5
This PR was merged into the 3.0-dev branch. Discussion ---------- remove polyfills for unsupported php versions | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Remove obsolete polyfills in master as introduced in #16317 Commits ------- 78512cc remove polyfills for unsupported php versions
…ency (xabbuh) This PR was merged into the 2.8 branch. Discussion ---------- [HttpFoundation] add missing symfony/polyfill-php55 dependency | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16317 | License | MIT | Doc PR | The `json_last_error_msg()` function used in the `JsonResponse` class requires PHP 5.5. Commits ------- 3cc4e4d add missing symfony/polyfill-php55 dependency
Status: needs work
symfony/polyfill-* packages are not ready yet. Still, review welcomed.