Skip to content

Commit bb2727a

Browse files
Merge branch '3.0'
* 3.0: [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
2 parents af36c83 + 28500db commit bb2727a

File tree

17 files changed

+111
-38
lines changed

17 files changed

+111
-38
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
@@ -49,8 +49,8 @@ before_install:
4949
- if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then pecl install -f memcached-2.1.0; fi;
5050
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo extension = ldap.so >> $INI_FILE; fi;
5151
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
52-
- if [[ $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
5352
- if [[ $deps != skip ]]; then composer self-update; fi;
53+
- if [[ $deps != skip && $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer/* ~/.composer/; composer global install --prefer-dist; fi;
5454
- if [[ $deps != skip ]]; then ./phpunit install; fi;
5555
- export PHPUNIT=$(readlink -f ./phpunit)
5656
- mkdir /tmp/slapd

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
@@ -46,7 +49,8 @@ install:
4649
- copy /Y php.ini-max php.ini
4750
- cd c:\projects\symfony
4851
- mkdir %APPDATA%\Composer
49-
- IF %APPVEYOR_REPO_NAME%==symfony/symfony copy /Y .composer-auth.json %APPDATA%\Composer\auth.json
52+
- IF %APPVEYOR_REPO_NAME%==symfony/symfony copy /Y .composer\* %APPDATA%\Composer\
53+
- IF %APPVEYOR_REPO_NAME%==symfony/symfony composer global install --prefer-dist --no-progress --ansi || echo curl.cainfo needs PHP 5.3.7
5054
- php phpunit install
5155
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
5256
- 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 {
@@ -440,6 +441,7 @@ tr.status-warning td {
440441
}
441442
#header h1 svg {
442443
height: 40px;
444+
width: 40px;
443445
margin-top: -4px;
444446
vertical-align: middle;
445447
}
@@ -548,7 +550,7 @@ tr.status-warning td {
548550
margin-left: 5px;
549551
}
550552
#sidebar #sidebar-shortcuts .btn {
551-
padding: .5em .6em;
553+
padding: .5em;
552554
}
553555

554556
{# 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)