Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
raised the minimum version of PHP to 5.3.4 (closes #3856)
We've raised the minimum version of PHP because of a PHP
bug before 5.3.4:

https://bugs.php.net/bug.php?id=52083
https://bugs.php.net/bug.php?id=50027
  • Loading branch information
fabpot committed Jul 13, 2012
1 parent a798ff1 commit 2dcc448
Show file tree
Hide file tree
Showing 38 changed files with 35 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -16,7 +16,7 @@ to high traffic ones like Dailymotion or Yahoo! Answers.
Requirements
------------

Symfony2 is only supported on PHP 5.3.3 and up.
Symfony2 is only supported on PHP 5.3.4 and up.

Installation
------------
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"doctrine/common": ">2.2,<2.4-dev",
"twig/twig": ">=1.8,<2.0-dev"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Doctrine/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"doctrine/common": ">=2.2,<2.4-dev"
},
"suggest": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Monolog/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/http-kernel": "self.version",
"monolog/monolog": "1.*"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Propel1/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/http-foundation": "self.version",
"symfony/http-kernel": "self.version",
"symfony/form": "self.version",
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Swiftmailer/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"swiftmailer/swiftmailer": ">=4.2.0,<4.3-dev"
},
"suggest": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"twig/twig": ">=1.8,<2.0-dev"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/dependency-injection" : "self.version",
"symfony/config" : "self.version",
"symfony/event-dispatcher": "self.version",
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/SecurityBundle/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/security": "self.version"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/TwigBundle/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/twig-bridge": "self.version"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/WebProfilerBundle/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/twig-bundle": "self.version"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/BrowserKit/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/dom-crawler": "2.1.*"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/ClassLoader/composer.json
Expand Up @@ -17,7 +17,7 @@
],
"minimum-stability": "dev",
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"require-dev": {
"symfony/finder": "2.1.*"
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Config/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Config": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Console": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/CssSelector/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\CssSelector": "" }
Expand Down
Expand Up @@ -12,13 +12,9 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;

use Symfony\Component\DependencyInjection\Reference;

use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass;

use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass;

use Symfony\Component\DependencyInjection\Compiler\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;

class CheckCircularReferencesPassTest extends \PHPUnit_Framework_TestCase
Expand Down
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;

use Symfony\Component\DependencyInjection\Definition;

use Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;

use Symfony\Component\DependencyInjection\Scope;

use Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Reference;
Expand Down
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;

use Symfony\Component\DependencyInjection\Scope;

use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass;
use Symfony\Component\DependencyInjection\Compiler\Compiler;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/DependencyInjection/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"require-dev": {
"symfony/yaml": "2.1.*",
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/DomCrawler/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"require-dev": {
"symfony/css-selector": "2.1.*"
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/EventDispatcher/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"require-dev": {
"symfony/dependency-injection": "2.1.*"
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Filesystem/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Filesystem": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Finder/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Finder": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Form/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/event-dispatcher": "2.1.*",
"symfony/locale": "2.1.*",
"symfony/options-resolver": "2.1.*"
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpKernel/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/event-dispatcher": "2.1.*",
"symfony/http-foundation": "2.1.*"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Locale/composer.json
Expand Up @@ -16,10 +16,10 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"suggest": {
"ext-intl": ">=5.3.3"
"ext-intl": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Locale": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/OptionsResolver/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\OptionsResolver": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Process/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Process": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Routing/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"require-dev": {
"symfony/config": "2.1.*",
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Security/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.4",
"symfony/event-dispatcher": "2.1.*",
"symfony/http-foundation": "2.1.*",
"symfony/http-kernel": "2.1.*"
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Serializer/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Serializer": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Templating/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Templating": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Translation/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"require-dev": {
"symfony/config": "2.1.*",
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Validator/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"require-dev": {
"symfony/http-foundation": "2.1.*",
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Yaml/composer.json
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.4"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Yaml": "" }
Expand Down

14 comments on commit 2dcc448

@fabpot
Copy link
Member Author

@fabpot fabpot commented on 2dcc448 Jul 13, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But PHP 5.3.3 and before just do not work. Anyway, you can still deploy your application even with a lower version of PHP, you are just on your own.

@stof
Copy link
Member

@stof stof commented on 2dcc448 Jul 13, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabpot you will have some issues to deploy on 5.3.3 though: you will have to run composer on another machine as it will check the constraint

@fabpot
Copy link
Member Author

@fabpot fabpot commented on 2dcc448 Jul 14, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we want? Lie or be honest about the real dependencies? We have numerous bug reports about PHP 5.3.3. People have a really hard time finding the reason of the bug because problems occur randomly. The truth is that PHP 5.3.3 is buggy; it just does not work.

The other alternative is to keep 5.3.3 in the composer files, keep 5.3.3 is the Symfony requirements and make a big warning if 5.3.4 is installed and in the docs.

What do you think?

@schmittjoh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for keeping it as is, i.e. hard requirement on 5.3.4. These bugs are so serious that the application will be unusable.

We should however clearly communicate why PHP 5.3.4 so that users will understand it.

@stof
Copy link
Member

@stof stof commented on 2dcc448 Jul 14, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this change in the requirement probably deserves a blog post explaining it

@Seldaek
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to override in composer by requiring "php":"5.3.3 as 5.3.4" - then again that only works on a machine with 5.3.3 on it, so it maybe does more harm than good to have that in your composer.json. Alienating RHEL/CentOS/Debian sounds a bit harsh though. Also this means third parties using components like Composer can not require 5.3.3 anymore. Well we can but we can't run tests on 5.3.3 because travis won't install the vendors. We only use Console, Finder & Process. I don't know which components really require 5.3.4, but it would be great to have more granularity than "5.3.4 for all".

@schmittjoh
Copy link
Contributor

@schmittjoh schmittjoh commented on 2dcc448 Jul 14, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Seldaek
Copy link
Member

@Seldaek Seldaek commented on 2dcc448 Jul 14, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schmittjoh
Copy link
Contributor

@schmittjoh schmittjoh commented on 2dcc448 Jul 14, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Seldaek
Copy link
Member

@Seldaek Seldaek commented on 2dcc448 Jul 14, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schmittjoh
Copy link
Contributor

@schmittjoh schmittjoh commented on 2dcc448 Jul 14, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabpot
Copy link
Member Author

@fabpot fabpot commented on 2dcc448 Jul 15, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the comments on this commit, I think I'm going to revert to 5.3.3 and add an optional check in the Symfony requirements as we have already done for the annotation problem:

    $this->addRecommendation(
        version_compare($installedPhpVersion, '5.3.8', '>='),
        sprintf('Annotations might not work properly due to the PHP bug #55156 before PHP 5.3.8 (%s installed)', $installedPhpVersion),
        'Install PHP 5.3.8 or newer if your project uses annotations'
    );

@fabpot
Copy link
Member Author

@fabpot fabpot commented on 2dcc448 Jul 15, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willdurand
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the revert, much appreciated.

Please sign in to comment.