Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch '2.1'

* 2.1:
  [Yaml] fixed default value
  Added Yaml\Dumper::setIndentation() method to allow a custom indentation level of nested nodes.
  added a way to enable/disable object support when parsing/dumping
  added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse()
  fixed CS
  [Process] Fix docblocks, remove `return` from `PhpProcess#start()` as parent returns nothing, cleaned up `ExecutableFinder`
  fixes a bug when output/error output contains a % character
  [Console] fixed input bug when the value of an option is empty (closes #6649, closes #6689)
  [Profiler] [Redis] Fix sort of profiler rows.
  Fix version_compare() calls for PHP 5.5.
  Removed underscores from test method names to be consistent with other components.
  [Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)
  Fix version_compare() calls for PHP 5.5.
  Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.
  removed the .gitattributes files (closes #6605, reverts #5674)
  [HttpKernel] Clarify misleading comment in ExceptionListener

Conflicts:
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_style.html.twig
	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
	src/Symfony/Component/Form/Tests/Util/PropertyPathTest.php
	src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php
	src/Symfony/Component/Process/Process.php
  • Loading branch information...
commit f985ed2f7e7049d446151b398d9f37c629a9f6ee 2 parents e2c0fb2 + 3ad6a51
@fabpot fabpot authored
View
2  .gitattributes
@@ -1,2 +0,0 @@
-/Tests export-ignore
-phpunit.xml.dist export-ignore
View
6 Stub/StubIntlDateFormatter.php
@@ -189,7 +189,7 @@ public function format($timestamp)
$argumentError = 'datefmt_format: takes either an array or an integer timestamp value ';
} elseif (version_compare(\PHP_VERSION, '5.3.4', '>=') && !is_int($timestamp) && !$timestamp instanceof \DateTime) {
$argumentError = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object';
- if (version_compare(\PHP_VERSION, '5.5.0alpha1', '>=') && !is_int($timestamp)) {
+ if (version_compare(\PHP_VERSION, '5.5.0-dev', '>=') && !is_int($timestamp)) {
$argumentError = sprintf('datefmt_format: string \'%s\' is not numeric, which would be required for it to be a valid date', $timestamp);
}
}
@@ -350,7 +350,7 @@ public function getTimeZoneId()
}
// In PHP 5.5 default timezone depends on `date_default_timezone_get()` method
- if (version_compare(\PHP_VERSION, '5.5.0alpha1', '>=')) {
+ if (version_compare(\PHP_VERSION, '5.5.0-dev', '>=')) {
return date_default_timezone_get();
}
@@ -512,7 +512,7 @@ public function setTimeZoneId($timeZoneId)
{
if (null === $timeZoneId) {
// In PHP 5.5 if $timeZoneId is null it fallbacks to `date_default_timezone_get()` method
- if (version_compare(\PHP_VERSION, '5.5.0alpha1', '>=')) {
+ if (version_compare(\PHP_VERSION, '5.5.0-dev', '>=')) {
$timeZoneId = date_default_timezone_get();
} else {
// TODO: changes were made to ext/intl in PHP 5.4.4 release that need to be investigated since it will
View
36 Tests/Stub/StubIntlDateFormatterTest.php
@@ -43,7 +43,7 @@ public function testConstructorDefaultTimeZoneStub()
$formatter = new StubIntlDateFormatter('en', StubIntlDateFormatter::MEDIUM, StubIntlDateFormatter::SHORT);
// In PHP 5.5 default timezone depends on `date_default_timezone_get()` method
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$this->assertEquals(date_default_timezone_get(), $formatter->getTimeZoneId());
} else {
$this->assertNull($formatter->getTimeZoneId());
@@ -56,7 +56,7 @@ public function testConstructorDefaultTimeZoneIntl()
$formatter = new \IntlDateFormatter('en', StubIntlDateFormatter::MEDIUM, StubIntlDateFormatter::SHORT);
// In PHP 5.5 default timezone depends on `date_default_timezone_get()` method
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$this->assertEquals(date_default_timezone_get(), $formatter->getTimeZoneId());
} else {
$this->assertNull($formatter->getTimeZoneId());
@@ -367,7 +367,7 @@ public function testFormatIllegalArgumentErrorIntl($pattern, $timestamp, $errorM
public function formatErrorProvider()
{
// With PHP 5.5 IntlDateFormatter accepts empty values ('0')
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
return array(
array('y-M-d', 'foobar', 'datefmt_format: string \'foobar\' is not numeric, which would be required for it to be a valid date: U_ILLEGAL_ARGUMENT_ERROR')
);
@@ -435,7 +435,7 @@ public function formatWithTimezoneProvider()
);
// As of PHP 5.5, intl ext no longer fallbacks invalid time zones to UTC
- if (!$this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if (!$this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
// When time zone not exists, uses UTC by default
$data[] = array(0, 'Foo/Bar', '1970-01-01 00:00:00');
$data[] = array(0, 'UTC+04:30', '1970-01-01 00:00:00');
@@ -452,7 +452,7 @@ public function testFormatWithTimezoneFormatOptionAndDifferentThanUtcStub()
{
$formatter = $this->createStubFormatter('zzzz');
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$formatter->setTimeZone('Pacific/Fiji');
} else {
$formatter->setTimeZoneId('Pacific/Fiji');
@@ -466,7 +466,7 @@ public function testFormatWithTimezoneFormatOptionAndDifferentThanUtcIntl()
$this->skipIfIntlExtensionIsNotLoaded();
$formatter = $this->createIntlFormatter('zzzz');
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$formatter->setTimeZone('Pacific/Fiji');
} else {
$formatter->setTimeZoneId('Pacific/Fiji');
@@ -480,7 +480,7 @@ public function testFormatWithGmtTimezoneStub()
{
$formatter = $this->createStubFormatter('zzzz');
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$formatter->setTimeZone('GMT+03:00');
} else {
$formatter->setTimeZoneId('GMT+03:00');
@@ -494,7 +494,7 @@ public function testFormatWithGmtTimezoneIntl()
$this->skipIfIntlExtensionIsNotLoaded();
$formatter = $this->createIntlFormatter('zzzz');
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$formatter->setTimeZone('GMT+03:00');
} else {
$formatter->setTimeZoneId('GMT+03:00');
@@ -530,7 +530,7 @@ public function testFormatWithDefaultTimezoneIntl()
public function testFormatWithDefaultTimezoneStubShouldUseTheTzEnvironmentVariableWhenAvailable()
{
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$this->markTestSkipped('StubIntlDateFormatter in PHP 5.5 no longer depends on TZ environment.');
}
@@ -553,7 +553,7 @@ public function testFormatWithDefaultTimezoneStubShouldUseTheTzEnvironmentVariab
public function testFormatWithDefaultTimezoneStubShouldUseDefaultDateTimeZoneVariable()
{
- if (!$this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if (!$this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$this->markTestSkipped('Only in PHP 5.5 StubIntlDateFormatter depends on default timezone (`date_default_timezone_get()`).');
}
@@ -583,7 +583,7 @@ public function testFormatWithDefaultTimezoneStubShouldUseDefaultDateTimeZoneVar
*/
public function testFormatWithDefaultTimezoneIntlShouldUseTheTzEnvironmentVariableWhenAvailable()
{
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$this->markTestSkipped('IntlDateFormatter in PHP 5.5 no longer depends on TZ environment.');
}
@@ -612,7 +612,7 @@ public function testFormatWithDefaultTimezoneIntlShouldUseTheTzEnvironmentVariab
*/
public function testFormatWithDefaultTimezoneIntlShouldUseDefaultDateTimeZoneVariable()
{
- if (!$this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if (!$this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$this->markTestSkipped('Only in PHP 5.5 IntlDateFormatter depends on default timezone (`date_default_timezone_get()`).');
}
@@ -1128,7 +1128,7 @@ public function testSetTimeZoneIdStub($timeZoneId, $expectedTimeZoneId)
{
$formatter = $this->createStubFormatter();
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$formatter->setTimeZone($timeZoneId);
} else {
$formatter->setTimeZoneId($timeZoneId);
@@ -1145,7 +1145,7 @@ public function testSetTimeZoneIdIntl($timeZoneId, $expectedTimeZoneId)
$this->skipIfIntlExtensionIsNotLoaded();
$formatter = $this->createIntlFormatter();
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$formatter->setTimeZone($timeZoneId);
} else {
$formatter->setTimeZoneId($timeZoneId);
@@ -1164,7 +1164,7 @@ public function setTimeZoneIdProvider()
);
// When time zone not exists, uses UTC by default
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$data[] = array('GMT-0300', 'UTC');
$data[] = array('Foo/Bar', 'UTC');
$data[] = array('GMT+00:AA', 'UTC');
@@ -1186,7 +1186,7 @@ public function testSetTimeZoneIdWithGmtTimeZoneWithMinutesOffsetStub()
{
$formatter = $this->createStubFormatter();
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$formatter->setTimeZone('GMT+00:30');
} else {
$formatter->setTimeZoneId('GMT+00:30');
@@ -1198,7 +1198,7 @@ public function testSetTimeZoneIdWithGmtTimeZoneWithMinutesOffsetIntl()
$this->skipIfIntlExtensionIsNotLoaded();
$formatter = $this->createIntlFormatter();
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$formatter->setTimeZone('GMT+00:30');
} else {
$formatter->setTimeZoneId('GMT+00:30');
@@ -1225,7 +1225,7 @@ protected function createIntlFormatter($pattern = null)
protected function createDateTime($timestamp = null)
{
- if ($this->isGreaterOrEqualThanPhpVersion('5.5.0alpha1')) {
+ if ($this->isGreaterOrEqualThanPhpVersion('5.5.0-dev')) {
$timeZone = date_default_timezone_get();
} else {
$timeZone = getenv('TZ') ?: 'UTC';
Please sign in to comment.
Something went wrong with that request. Please try again.