Skip to content

Commit 28500db

Browse files
Merge branch '2.8' into 3.0
* 2.8: [ci] use hirak/prestissimo [Filesystem] Fix transient tests [WebProfiler] Sidebar button padding Updated some missing READMEs [HttpFoundation] Avoid warnings when checking malicious IPs [HttpFoundation] Set the Content-Range header if the requested Range is unsatisfied Conflicts: appveyor.yml src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
2 parents 1c3e14f + e8b102e commit 28500db

File tree

16 files changed

+111
-23
lines changed

16 files changed

+111
-23
lines changed
File renamed without changes.

.composer/composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"require": {
3+
"php": ">=5.3.7",
4+
"hirak/prestissimo": "^0.1.15"
5+
}
6+
}

.composer/composer.lock

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ before_install:
4747
- if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then pecl install -f memcached-2.1.0; fi;
4848
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo extension = ldap.so >> $INI_FILE; fi;
4949
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
50-
- if [[ $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
5150
- if [[ $deps != skip ]]; then composer self-update; fi;
51+
- if [[ $deps != skip && $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer/* ~/.composer/; composer global install --prefer-dist; fi;
5252
- if [[ $deps != skip ]]; then ./phpunit install; fi;
5353
- export PHPUNIT=$(readlink -f ./phpunit)
5454

appveyor.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ init:
1818
install:
1919
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
2020
- cd c:\php
21+
- IF %PHP%==1 appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem
2122
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-5.5.9-nts-Win32-VC11-x86.zip
2223
- IF %PHP%==1 7z x php-5.5.9-nts-Win32-VC11-x86.zip -y >nul
2324
- IF %PHP%==1 del /Q *.zip
@@ -34,6 +35,8 @@ install:
3435
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini-min
3536
- IF %PHP%==1 echo extension_dir=ext >> php.ini-min
3637
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini-min
38+
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini-min
39+
- IF %PHP%==1 echo curl.cainfo=c:\php\cacert.pem >> php.ini-min
3740
- IF %PHP%==1 copy /Y php.ini-min php.ini-max
3841
- IF %PHP%==1 echo extension=php_apcu.dll >> php.ini-max
3942
- IF %PHP%==1 echo apc.enable_cli=1 >> php.ini-max
@@ -47,7 +50,8 @@ install:
4750
- copy /Y php.ini-max php.ini
4851
- cd c:\projects\symfony
4952
- mkdir %APPDATA%\Composer
50-
- IF %APPVEYOR_REPO_NAME%==symfony/symfony copy /Y .composer-auth.json %APPDATA%\Composer\auth.json
53+
- IF %APPVEYOR_REPO_NAME%==symfony/symfony copy /Y .composer\* %APPDATA%\Composer\
54+
- IF %APPVEYOR_REPO_NAME%==symfony/symfony composer global install --prefer-dist --no-progress --ansi || echo curl.cainfo needs PHP 5.3.7
5155
- php phpunit install
5256
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
5357
- composer update --prefer-dist --no-progress --ansi

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ button {
116116
}
117117
.btn-sm svg {
118118
height: 16px;
119+
width: 16px;
119120
vertical-align: middle;
120121
}
121122
.btn-link {
@@ -436,6 +437,7 @@ tr.status-warning td {
436437
}
437438
#header h1 svg {
438439
height: 40px;
440+
width: 40px;
439441
margin-top: -4px;
440442
vertical-align: middle;
441443
}
@@ -544,7 +546,7 @@ tr.status-warning td {
544546
margin-left: 5px;
545547
}
546548
#sidebar #sidebar-shortcuts .btn {
547-
padding: .5em .6em;
549+
padding: .5em;
548550
}
549551

550552
{# Sidebar Search

src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
2222

2323
public function prepare_workspace()
2424
{
25-
$this->workspace = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.time().mt_rand(0, 1000);
25+
$this->workspace = sys_get_temp_dir().'/'.microtime(true).'.'.mt_rand();
2626
mkdir($this->workspace, 0777, true);
2727
$this->workspace = realpath($this->workspace);
2828
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function setUp()
4646
{
4747
$this->umask = umask(0);
4848
$this->filesystem = new Filesystem();
49-
$this->workspace = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.time().mt_rand(0, 1000);
49+
$this->workspace = sys_get_temp_dir().'/'.microtime(true).'.'.mt_rand();
5050
mkdir($this->workspace, 0777, true);
5151
$this->workspace = realpath($this->workspace);
5252
}

src/Symfony/Component/HttpFoundation/BinaryFileResponse.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ public function prepare(Request $request)
253253
if ($start <= $end) {
254254
if ($start < 0 || $end > $fileSize - 1) {
255255
$this->setStatusCode(416);
256+
$this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize));
256257
} elseif ($start !== 0 || $end !== $fileSize - 1) {
257258
$this->maxlen = $end < $fileSize ? $end - $start + 1 : -1;
258259
$this->offset = $start;

src/Symfony/Component/HttpFoundation/IpUtils.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,12 @@ public static function checkIp6($requestIp, $ip)
112112
$netmask = 128;
113113
}
114114

115-
$bytesAddr = unpack('n*', inet_pton($address));
116-
$bytesTest = unpack('n*', inet_pton($requestIp));
115+
$bytesAddr = unpack('n*', @inet_pton($address));
116+
$bytesTest = unpack('n*', @inet_pton($requestIp));
117+
118+
if (!$bytesAddr || !$bytesTest) {
119+
return false;
120+
}
117121

118122
for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) {
119123
$left = $netmask - 16 * ($i - 1);

0 commit comments

Comments
 (0)