8000 Merge branch '2.7' into 2.8 · symfony/symfony@f7b3252 · GitHub
[go: up one dir, main page]

Skip to content

Commit f7b3252

Browse files
Merge branch '2.7' into 2.8
* 2.7: CI fixes
2 parents 80e2e1f + 2f7f587 commit f7b3252

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| Q | A
22
| ------------- | ---
3-
| Branch? | master / 2.7, 2.8 or 3.2 <!-- see comment below -->
3+
| Branch? | 3.4 or master / 2.7, 2.8, 3.2 or 3.3 <!-- see comment below -->
44
| Bug fix? | yes/no
55
| New feature? | yes/no <!-- don't forget updating src/**/CHANGELOG.md files -->
66
| BC breaks? | yes/no
@@ -13,7 +13,8 @@
1313
<!--
1414
- Bug fixes must be submitted against the lowest branch where they apply
1515
(lowest branches are regularly merged to upper ones so they get the fixes too).
16-
- Features and deprecations must be submitted against the master branch.
16+
- Features and deprecations must be submitted against the 3.4,
17+
legacy code removals go to the master branch.
1718
- Please fill in this template according to the PR you're about to submit.
1819
- Replace this comment by a description of what your PR is solving.
1920
-->

.travis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@ before_install:
7676
echo hhvm.jit = 0 >> $INI
7777
echo apc.enable_cli = 1 >> $INI
7878
echo extension = ldap.so >> $INI
79-
[[ $PHP = 5.* ]] && echo extension = mongo.so >> $INI
8079
[[ $PHP = 5.* ]] && echo extension = memcache.so >> $INI
80+
if [[ $PHP = 5.* ]]; then
81+
echo extension = mongo.so >> $INI
82+
elif [[ $PHP = 7.* ]]; then
83+
echo extension = mongodb.so >> $INI
84+
fi
8185
8286
# Matrix lines for intermediate PHP versions are skipped for pull requests
8387
if [[ ! $deps && ! $PHP = ${MIN_PHP%.*} && ! $PHP = hhvm* && $TRAVIS_PULL_REQUEST != false ]]; then
@@ -136,6 +140,10 @@ install:
136140
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
137141
if [[ ! $skip && $deps ]]; then mv composer.json.phpunit composer.json; fi
138142
143+
if [[ ! $skip && $PHP = 7.* ]]; then
144+
([[ $deps ]] && cd src/Symfony/Component/HttpFoundation; composer require --dev --no-update mongodb/mongodb)
145+
fi
146+
139147
- if [[ ! $skip ]]; then $COMPOSER_UP; fi
140148
- if [[ ! $skip ]]; then ./phpunit install; fi
141149
- |

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ install:
2121
- 7z x php-5.3.11-nts-Win32-VC9-x86.zip -y >nul
2222
- appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/ICU-51.2-dlls.zip
2323
- 7z x ICU-51.2-dlls.zip -y >nul
24-
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x64.zip
24+
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x86.zip
2525
- cd ext
2626
- appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/php_intl-3.0.0-5.3-nts-vc9-x86.zip
2727
- 7z x php_intl-3.0.0-5.3-nts-vc9-x86.zip -y >nul
@@ -59,7 +59,7 @@ install:
5959

6060
test_script:
6161
- cd c:\projects\symfony
62-
- cd c:\php && 7z x php-7.1.3-Win32-VC14-x64.zip -y >nul && copy /Y php.ini-min php.ini
62+
- cd c:\php && 7z x php-7.1.3-Win32-VC14-x86.zip -y >nul && copy /Y php.ini-min php.ini
6363
- cd c:\projects\symfony
6464
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
6565
- cd c:\php && 7z x php-5.3.11-nts-Win32-VC9-x86.zip -y >nul && copy /Y php.ini-min php.ini

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php

Lines changed: 8 additions & 4 deletions
E30A
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ protected function setUp()
3131
{
3232
parent::setUp();
3333

34-
if (!extension_loaded('mongo') && !extension_loaded('mongodb')) {
34+
if (extension_loaded('mongodb')) {
35+
if (!class_exists('MongoDB\Client')) {
36+
$this->markTestSkipped('The mongodb/mongodb package is required.');
37+
}
38+
} elseif (!extension_loaded('mongo')) {
3539
$this->markTestSkipped('The Mongo or MongoDB extension is required.');
3640
}
3741

@@ -109,7 +113,7 @@ public function testRead()
109113

110114
if (phpversion('mongodb')) {
111115
$that->assertInstanceOf('MongoDB\BSON\UTCDateTime', $criteria[$that->options['expiry_field']]['$gte']);
112-
$that->assertGreaterThanOrEqual(round(((int) $criteria[$that->options['expiry_field']]['$gte']) / 1000), $testTimeout);
116+
$that->assertGreaterThanOrEqual(round((string) $criteria[$that->options['expiry_field']]['$gte'] / 1000), $testTimeout);
113117
} else {
114118
$that->assertInstanceOf('MongoDate', $criteria[$that->options['expiry_field']]['$gte']);
115119
$that->assertGreaterThanOrEqual($criteria[$that->options['expiry_field']]['$gte']->sec, $testTimeout);
@@ -168,7 +172,7 @@ public function testWrite()
168172
$that->assertEquals('bar', $data[$that->options['data_field']]->getData());
169173
$that->assertInstanceOf('MongoDB\BSON\UTCDateTime', $data[$that->options['time_field']]);
170174
$that->assertInstanceOf('MongoDB\BSON\UTCDateTime', $data[$that->options['expiry_field']]);
171-
$that->assertGreaterThanOrEqual($expectedExpiry, round(((int) $data[$that->options['expiry_field']]) / 1000));
175+
$that->assertGreaterThanOrEqual($expectedExpiry, round((string) $data[$that->options['expiry_field']] / 1000));
172176
} else {
173177
$that->assertEquals('bar', $data[$that->options['data_field']]->bin);
174178
$that->assertInstanceOf('MongoDate', $data[$that->options['time_field']]);
@@ -294,7 +298,7 @@ public function testGc()
294298
->will($this->returnCallback(function ($criteria) use ($that) {
295299
if (phpversion('mongodb')) {
296300
$that->assertInstanceOf('MongoDB\BSON\UTCDateTime', $criteria[$that->options['expiry_field']]['$lt']);
297-
$that->assertGreaterThanOrEqual(time() - 1, round(((int) $criteria[$that->options['expiry_field']]['$lt']) / 1000));
301+
$that->assertGreaterThanOrEqual(time() - 1, round((string) $criteria[$that->options['expiry_field']]['$lt'] / 1000));
298302
} else {
299303
$that->assertInstanceOf('MongoDate', $criteria[$that->options['expiry_field']]['$lt']);
300304
$that->assertGreaterThanOrEqual(time() - 1, $criteria[$that->options['expiry_field']]['$lt']->sec);

0 commit comments

Comments
 (0)
0