Skip to content

Commit ee8d663

Browse files
Fix CI
1 parent 1045717 commit ee8d663

File tree

6 files changed

+30
-32
lines changed

6 files changed

+30
-32
lines changed

appveyor.yml renamed to .appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build: false
2-
clone_depth: 1
2+
clone_depth: 2
33
clone_folder: c:\projects\symfony
44

55
cache:

.github/build-packages.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66
}
77
chdir(dirname(__DIR__));
88

9+
$json = ltrim(file_get_contents('composer.json'));
10+
if ($json !== $package = preg_replace('/\n "repositories": \[\n.*?\n \],/s', '', $json)) {
11+
file_put_contents('composer.json', $package);
12+
}
13+
914
$dirs = $_SERVER['argv'];
1015
array_shift($dirs);
11-
$mergeBase = trim(shell_exec(sprintf('git merge-base %s HEAD', array_shift($dirs))));
16+
$mergeBase = trim(shell_exec(sprintf('git merge-base "%s" HEAD', array_shift($dirs))));
1217

1318
$packages = array();
1419
$flags = \PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
@@ -49,7 +54,7 @@
4954

5055
$packages[$package->name][$package->version] = $package;
5156

52-
$versions = file_get_contents('https://packagist.org/p/'.$package->name.'.json');
57+
$versions = @file_get_contents('https://repo.packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"dev-master":%s}}}', $package->name, file_get_contents($dir.'/composer.json'));
5358
$versions = json_decode($versions)->packages->{$package->name};
5459

5560
if ($package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) {
@@ -74,8 +79,6 @@
7479
'type' => 'composer',
7580
'url' => 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)).'/',
7681
));
77-
if (false === strpos($json, "\n \"repositories\": [\n")) {
78-
$json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1);
79-
file_put_contents('composer.json', $json);
80-
}
82+
$json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1);
83+
file_put_contents('composer.json', $json);
8184
}

.github/rm-invalid-lowest-lock-files.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function getContentHash(array $composerJson)
7979
continue 2;
8080
}
8181

82-
if (isset($composerJsons[$name][2]['repositories']) && !isset($lockedJson[$key]['repositories'])) {
82+
if (isset($composerJsons[$name][2]['repositories']) && !isset($lockedJson['repositories'])) {
8383
// the locked package has been patched locally but the lock references a commit,
8484
// which means the referencing package itself is not modified
8585
continue;
@@ -104,8 +104,7 @@ function getContentHash(array $composerJson)
104104
}
105105
}
106106

107-
if (!$referencedCommits || (isset($_SERVER['TRAVIS_PULL_REQUEST']) && 'false' !== $_SERVER['TRAVIS_PULL_REQUEST'])) {
108-
// cached commits cannot be stale for PRs
107+
if (!$referencedCommits) {
109108
return;
110109
}
111110

.travis.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
language: php
22

33
dist: trusty
4-
sudo: false
54

65
git:
7-
depth: 1
6+
depth: 2
87

98
addons:
109
apt_packages:
@@ -136,14 +135,16 @@ before_install:
136135
phpenv global $PHP
137136
INI=~/.phpenv/versions/$PHP/etc/conf.d/travis.ini
138137
139-
# install libsodium
140-
sudo add-apt-repository ppa:ondrej/php -y
141-
sudo apt-get update -q
142-
sudo apt-get install libsodium-dev -y
138+
if ! php --ri sodium > /dev/null; then
139+
# install libsodium
140+
sudo add-apt-repository ppa:ondrej/php -y
141+
sudo apt-get update -q
142+
sudo apt-get install libsodium-dev -y
143+
tfold ext.libsodium tpecl libsodium sodium.so $INI
144+
fi
143145
144146
tfold ext.apcu tpecl apcu-5.1.6 apcu.so $INI
145-
tfold ext.libsodium tpecl libsodium sodium.so $INI
146-
tfold ext.mongodb tpecl mongodb-1.5.0 mongodb.so $INI
147+
tfold ext.mongodb tpecl mongodb-1.5.2 mongodb.so $INI
147148
done
148149
149150
- |
@@ -205,7 +206,7 @@ install:
205206
break
206207
fi
207208
phpenv global $PHP
208-
([[ $deps ]] && cd src/Symfony/Component/HttpFoundation; composer require --dev --no-update mongodb/mongodb)
209+
([[ $deps ]] && cd src/Symfony/Component/HttpFoundation; composer config platform.ext-mongodb 1.5.2; composer require --dev --no-update mongodb/mongodb)
209210
tfold 'composer update' $COMPOSER_UP
210211
tfold 'phpunit install' ./phpunit install
211212
if [[ $deps = high ]]; then

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,4 +1482,9 @@ public function testSetDataNonEmptyArraySubmitNullMultiple()
14821482
$this->assertEquals(array(), $form->getNormData());
14831483
$this->assertSame(array(), $form->getViewData(), 'View data is always an array');
14841484
}
1485+
1486+
public function testSubmitNullUsesDefaultEmptyData($emptyData = 'empty', $expectedData = null)
1487+
{
1488+
$this->markTestIncomplete('Added in symfony/form 2.8.');
1489+
}
14851490
}

src/Symfony/Component/HttpFoundation/StreamedResponse.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* A StreamedResponse uses a callback for its content.
1818
*
1919
* The callback should use the standard PHP functions like echo
20-
* to stream the response back to the client. The flush() method
20+
* to stream the response back to the client. The flush() function
2121
* can also be used if needed.
2222
*
2323
* @see flush()
@@ -129,6 +129,8 @@ public function setContent($content)
129129
throw new \LogicException('The content cannot be set on a StreamedResponse instance.');
130130
}
131131

132+
$this->streamed = true;
133+
132134
return $this;
133135
}
134136

@@ -141,16 +143,4 @@ public function getContent()
141143
{
142144
return false;
143145
}
144-
145-
/**
146-
* {@inheritdoc}
147-
*
148-
* @return $this
149-
*/
150-
public function setNotModified()
151-
{
152-
$this->setCallback(function () {});
153-
154-
return parent::setNotModified();
155-
}
156146
}

0 commit comments

Comments
 (0)