Skip to content

[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

Closed
wants to merge 4 commits into from

Conversation

alebo
Copy link
Contributor

@alebo 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.
Copy link
Contributor

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.

Copy link
Contributor Author

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

@alebo alebo force-pushed the ticket_4922_improvement branch from b067fa2 to de24c81 Compare December 24, 2015 22:45
$iterator = $this;
while ($iterator instanceof \OuterIterator) {
$innerIterator = $iterator->getInnerIterator();
if (version_compare(PHP_VERSION, '5.5.23', '<')
Copy link
Member

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) {
    // ...
}

@alebo alebo force-pushed the ticket_4922_improvement branch from dc5cec6 to 4d97385 Compare January 10, 2016 21:53
@fabpot
Copy link
Member

fabpot commented Jan 25, 2016

Thank you @alebo.

fabpot added a commit that referenced this pull request Jan 25, 2016
…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
@fabpot fabpot closed this Jan 25, 2016
jakzal added a commit to jakzal/symfony that referenced this pull request Mar 8, 2016
jakzal added a commit to jakzal/symfony that referenced this pull request Mar 9, 2016
fabpot added a commit that referenced this pull request Mar 9, 2016
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
nicolas-grekas added a commit that referenced this pull request Mar 10, 2016
* 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
nicolas-grekas added a commit that referenced this pull request Mar 10, 2016
* 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
nicolas-grekas added a commit that referenced this pull request Mar 10, 2016
* 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
nicolas-grekas added a commit that referenced this pull request Mar 10, 2016
* 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
@fabpot fabpot mentioned this pull request Mar 13, 2016
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull request Mar 25, 2018
* 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
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.

8 participants