-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Finder] Check PHP version before applying a workaround for a PHP bug #17134
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
alebo
commented
Dec 24, 2015
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | -- |
License | MIT |
Doc PR | -- |
@@ -12,9 +12,9 @@ | |||
namespace Symfony\Component\Finder\Iterator; | |||
|
|||
/** | |||
* This iterator just overrides the rewind method in order to correct a PHP bug. | |||
* This iterator just overrides the rewind method in order to correct a PHP bug, which existed before version 5.5.23. |
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.
https://bugs.php.net/bug.php?id=68557 says
Confirmed fixed under PHP 5.5.22.
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.
I'd double-checked before making the change. It's not fixed in 5.5.22. Also, the fix is listed only in
http://php.net/ChangeLog-5.php#5.5.23
b067fa2
to
de24c81
Compare
$iterator = $this; | ||
while ($iterator instanceof \OuterIterator) { | ||
$innerIterator = $iterator->getInnerIterator(); | ||
if (version_compare(PHP_VERSION, '5.5.23', '<') |
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.
We use the PHP_VERSION_ID
constant for this:
if (PHP_VERSION_ID < 50523 || PHP_VERSION_ID >= 50600 && PHP_VERSION_ID < 50607) {
// ...
}
dc5cec6
to
4d97385
Compare
Thank you @alebo. |
…for a PHP bug (alebo) This PR was squashed before being merged into the 2.3 branch (closes #17134). Discussion ---------- [Finder] Check PHP version before applying a workaround for a PHP bug | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | -- | License | MIT | Doc PR | -- Commits ------- cba206a [Finder] Check PHP version before applying a workaround for a PHP bug
This PR was merged into the 2.3 branch. Discussion ---------- [Finder] Partially revert #17134 to fix a regression | Q | A | ------------- | --- | Branch | 2.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #18013 | License | MIT | Doc PR | - Commits ------- ead1824 [Finder] Partially revert #17134 to fix a regression
* 2.3: [Finder] Partially revert #17134 to fix a regression [HttpKernel] Fix mem usage when stripping the prod container exception when registering bags for started sessions Conflicts: src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php src/Symfony/Component/HttpKernel/Kernel.php
* 2.7: [Finder] Partially revert #17134 to fix a regression [HttpKernel] Fix mem usage when stripping the prod container exception when registering bags for started sessions Conflicts: src/Symfony/Component/Validator/composer.json
* 2.8: [Finder] Partially revert #17134 to fix a regression [HttpKernel] Fix mem usage when stripping the prod container exception when registering bags for started sessions Conflicts: src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php src/Symfony/Component/Validator/composer.json
* 3.0: (28 commits) [Console] Fix an autocompletion question helper issue with non-sequentially indexed choices [Process] Fix pipes handling [Finder] Partially revert #17134 to fix a regression Mentioned the deprecation of deep parameters in UPGRADE files [HttpKernel] Fix mem usage when stripping the prod container [Filesystem] Fix false positive in ->remove() [Filesystem] Cleanup/sync with 2.3 [Validator] Fix the locale validator so it treats a locale alias as a valid locale [HttpFoundation] Fix transient test [HttpFoundation] Add a dependency on the mbstring polyfill [2.7] update readme files for new components add readme files where missing [2.8] update readme files for new components fix lowest TwigBridge deps versions reference form type by name on Symfony 2.7 [EventDispatcher] fix syntax error Don't use reflections when possible Don't use reflections when possible [Form] Update form tests after the ICU data update [Intl] Update tests and the number formatter to match behaviour of the intl extension ... Conflicts: src/Symfony/Component/Ldap/README.md src/Symfony/Component/Security/Core/README.md src/Symfony/Component/Security/Csrf/README.md src/Symfony/Component/Security/Http/README.md
* 3.0: (28 commits) [Console] Fix an autocompletion question helper issue with non-sequentially indexed choices [Process] Fix pipes handling [Finder] Partially revert symfony#17134 to fix a regression Mentioned the deprecation of deep parameters in UPGRADE files [HttpKernel] Fix mem usage when stripping the prod container [Filesystem] Fix false positive in ->remove() [Filesystem] Cleanup/sync with 2.3 [Validator] Fix the locale validator so it treats a locale alias as a valid locale [HttpFoundation] Fix transient test [HttpFoundation] Add a dependency on the mbstring polyfill [2.7] update readme files for new components add readme files where missing [2.8] update readme files for new components fix lowest TwigBridge deps versions reference form type by name on Symfony 2.7 [EventDispatcher] fix syntax error Don't use reflections when possible Don't use reflections when possible [Form] Update form tests after the ICU data update [Intl] Update tests and the number formatter to match behaviour of the intl extension ... Conflicts: src/Symfony/Component/Ldap/README.md src/Symfony/Component/Security/Core/README.md src/Symfony/Component/Security/Csrf/README.md src/Symfony/Component/Security/Http/README.md