Skip to content

Commit e564805

Browse files
[ci] Run minimal versions on appveyor only
1 parent 6dac13b commit e564805

File tree

7 files changed

+24
-15
lines changed

7 files changed

+24
-15
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ addons:
1010
matrix:
1111
include:
1212
- php: hhvm
13-
- php: 5.3.3
1413
- php: 5.3
1514
- php: 5.4
1615
- php: 5.5

appveyor.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ init:
2121
install:
2222
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
2323
- cd c:\php
24-
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-5.4.43-nts-Win32-VC9-x86.zip
25-
- IF %PHP%==1 7z x php-5.4.43-nts-Win32-VC9-x86.zip -y > 7z.log
24+
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-5.3.3-nts-Win32-VC9-x86.zip
25+
- IF %PHP%==1 7z x php-5.3.3-nts-Win32-VC9-x86.zip -y > 7z.log
2626
- IF %PHP%==1 appveyor DownloadFile http://nebm.ist.utl.pt/~glopes/misc/intl_win/ICU-51.2-dlls.zip
2727
- IF %PHP%==1 7z x ICU-51.2-dlls.zip -y > 7z.log
2828
- IF %PHP%==1 cd ext
29-
- IF %PHP%==1 appveyor DownloadFile http://nebm.ist.utl.pt/~glopes/misc/intl_win/php_intl-3.0.0-5.4-nts-vc9-x86.zip
30-
- IF %PHP%==1 7z x php_intl-3.0.0-5.4-nts-vc9-x86.zip -y > 7z.log
31-
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/apc/3.1.13/php_apc-3.1.13-5.4-nts-vc9-x86.zip
32-
- IF %PHP%==1 7z x php_apc-3.1.13-5.4-nts-vc9-x86.zip -y > 7z.log
29+
- IF %PHP%==1 appveyor DownloadFile http://nebm.ist.utl.pt/~glopes/misc/intl_win/php_intl-3.0.0-5.3-nts-vc9-x86.zip
30+
- IF %PHP%==1 7z x php_intl-3.0.0-5.3-nts-vc9-x86.zip -y > 7z.log
31+
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/apc/3.1.13/php_apc-3.1.13-5.3-nts-vc9-x86.zip
32+
- IF %PHP%==1 7z x php_apc-3.1.13-5.3-nts-vc9-x86.zip -y > 7z.log
33+
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/php_memcache-3.0.8-5.3-nts-vc9-x86.zip
34+
- IF %PHP%==1 7z x php_memcache-3.0.8-5.3-nts-vc9-x86.zip -y > 7z.log
3335
- IF %PHP%==1 cd ..
3436
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
3537
- appveyor DownloadFile https://getcomposer.org/composer.phar

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public static function setUpBeforeClass()
3737
if ('\\' === DIRECTORY_SEPARATOR && null === self::$symlinkOnWindows) {
3838
$target = tempnam(sys_get_temp_dir(), 'sl');
3939
$link = sys_get_temp_dir().'/sl'.microtime(true).mt_rand();
40-
if (self::$symlinkOnWindows = @symlink($target, $link)) {
40+
if (@symlink($target, $link)) {
41+
self::$symlinkOnWindows = @is_link($link);
4142
unlink($link);
4243
}
4344
unlink($target);

src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,16 @@ public function format($timestamp)
210210
// behave like the intl extension
211211
$argumentError = null;
212212
if (!is_int($timestamp)) {
213-
if (PHP_VERSION_ID < 50304) {
214-
$argumentError = 'datefmt_format: takes either an array or an integer timestamp value ';
215-
} elseif (!$timestamp instanceof \DateTime) {
216-
$argumentError = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object';
213+
if (!$timestamp instanceof \DateTime) {
217214
if (PHP_VERSION_ID >= 50500 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) {
218215
$argumentError = sprintf('datefmt_format: string \'%s\' is not numeric, which would be required for it to be a valid date', $timestamp);
216+
} elseif (PHP_VERSION_ID >= 50304) {
217+
$argumentError = 'datefmt_format: takes either an array or an integer timestamp value or a DateTime object';
219218
}
220219
}
220+
if (PHP_VERSION_ID < 50304 && null === $argumentError) {
221+
$argumentError = 'datefmt_format: takes either an array or an integer timestamp value ';
222+
}
221223
}
222224

223225
if (null !== $argumentError) {

src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ private function getInt64Value($value)
824824
// The negative PHP_INT_MAX was being converted to float
825825
if (
826826
$value == self::$int32Range['negative'] &&
827-
((PHP_VERSION_ID < 50400 && PHP_VERSION_ID >= 50314) || PHP_VERSION_ID >= 50404)
827+
((PHP_VERSION_ID < 50400 && PHP_VERSION_ID >= 50314) || PHP_VERSION_ID >= 50404 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone')))
828828
) {
829829
return (int) $value;
830830
}
@@ -837,7 +837,8 @@ private function getInt64Value($value)
837837
// A 32 bit integer was being generated instead of a 64 bit integer
838838
if (
839839
($value > self::$int32Range['positive'] || $value < self::$int32Range['negative']) &&
840-
(PHP_VERSION_ID < 50314 || (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50404))
840+
(PHP_VERSION_ID < 50314 || (PHP_VERSION_ID >= 50400 && PHP_VERSION_ID < 50404)) &&
841+
!(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))
841842
) {
842843
$value = (-2147483648 - ($value % -2147483648)) * ($value / abs($value));
843844
}

src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ public function testParseTypeInt64With32BitIntegerInPhp32Bit()
590590

591591
// Bug #59597 was fixed on PHP 5.3.14 and 5.4.4
592592
// The negative PHP_INT_MAX was being converted to float
593-
if ((PHP_VERSION_ID < 50400 && PHP_VERSION_ID >= 50314) || PHP_VERSION_ID >= 50404) {
593+
if ((PHP_VERSION_ID < 50400 && PHP_VERSION_ID >= 50314) || PHP_VERSION_ID >= 50404 || (extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) {
594594
$this->assertInternalType('int', $parsedValue);
595595
} else {
596596
$this->assertInternalType('float', $parsedValue);

src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ public function testInvalidComparisonToValue($dirtyValue, $dirtyValueAsString, $
7979
// Make sure we have the correct version loaded
8080
if ($dirtyValue instanceof \DateTime) {
8181
IntlTestHelper::requireIntl($this);
82+
83+
if (PHP_VERSION_ID < 50304 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) {
84+
$this->markTestSkipped('Intl supports formatting DateTime objects since 5.3.4');
85+
}
8286
}
8387

8488
$constraint = $this->createConstraint(array('value' => $comparedValue));

0 commit comments

Comments
 (0)