Skip to content

Commit 20e0a18

Browse files
Fix support for PHP 7.3
1 parent 6a4de22 commit 20e0a18

File tree

5 files changed

+9
-37
lines changed

5 files changed

+9
-37
lines changed

.travis.yml

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ env:
2222

2323
matrix:
2424
include:
25-
- php: 7.1
26-
- php: 7.1
27-
env: deps=high
28-
- php: 7.2
29-
env: deps=low
25+
- php: nightly
3026

3127
fast_finish: true
3228

@@ -37,8 +33,6 @@ cache:
3733
- ~/php-ext
3834

3935
services:
40-
- memcached
41-
- mongodb
4236
- redis-server
4337
- rabbitmq
4438

@@ -129,31 +123,6 @@ before_install:
129123
echo opcache.enable_cli = 1 >> $INI
130124
echo apc.enable_cli = 1 >> $INI
131125
echo extension = redis.so >> $INI
132-
echo extension = memcached.so >> $INI
133-
done
134-
135-
- |
136-
# Install extra PHP extensions
137-
for PHP in $TRAVIS_PHP_VERSION $php_extra; do
138-
export PHP=$PHP
139-
phpenv global $PHP
140-
INI=~/.phpenv/versions/$PHP/etc/conf.d/travis.ini
141-
142-
# Install librabbitmq
143-
wget http://ftp.debian.org/debian/pool/main/libr/librabbitmq/librabbitmq-dev_0.5.2-2_amd64.deb
144-
wget http://ftp.debian.org/debian/pool/main/libr/librabbitmq/librabbitmq1_0.5.2-2_amd64.deb
145-
sudo dpkg -i librabbitmq1_0.5.2-2_amd64.deb librabbitmq-dev_0.5.2-2_amd64.deb
146-
147-
# install libsodium
148-
sudo add-apt-repository ppa:ondrej/php -y
149-
sudo apt-get update -q
150-
sudo apt-get install libsodium-dev -y
151-
152-
tfold ext.apcu tpecl apcu-5.1.6 apcu.so $INI
153-
tfold ext.libsodium tpecl libsodium sodium.so $INI
154-
tfold ext.mongodb tpecl mongodb-1.5.0 mongodb.so $INI
155-
tfold ext.amqp tpecl amqp-1.9.3 amqp.so $INI
156-
tfold ext.igbinary tpecl igbinary-2.0.6 igbinary.so $INI
157126
done
158127
159128
- |
@@ -215,7 +184,6 @@ install:
215184
break
216185
fi
217186
phpenv global $PHP
218-
([[ $deps ]] && cd src/Symfony/Component/HttpFoundation; composer require --dev --no-update mongodb/mongodb)
219187
tfold 'composer update' $COMPOSER_UP
220188
tfold 'phpunit install' ./phpunit install
221189
if [[ $deps = high ]]; then

src/Symfony/Component/BrowserKit/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,11 @@ protected function getAbsoluteUri($uri)
665665
}
666666

667667
// anchor or query string parameters?
668-
if (!$uri || '#' == $uri[0] || '?' == $uri[0]) {
668+
if (0 === strcspn($uri, '#?')) {
669669
return preg_replace('/[#?].*?$/', '', $currentUri).$uri;
670670
}
671671

672-
if ('/' !== $uri[0]) {
672+
if (0 !== strpos($uri, '/')) {
673673
$path = parse_url($currentUri, PHP_URL_PATH);
674674

675675
if ('/' !== substr($path, -1)) {

src/Symfony/Component/Debug/Tests/phpt/decorate_exception_hander.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
Test catching fatal errors when handlers are nested
3+
--INI--
4+
display_errors=0
35
--FILE--
46
<?php
57

@@ -24,7 +26,6 @@ if (true) {
2426

2527
?>
2628
--EXPECTF--
27-
Fatal error: Class 'Symfony\Component\Debug\missing' not found in %s on line %d
2829
object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) {
2930
["message":protected]=>
3031
string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug".

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ public function testCookieOptions()
170170
'cookie_secure' => true,
171171
'cookie_httponly' => false,
172172
);
173+
if (\PHP_VERSION_ID >= 70300) {
174+
$options['cookie_samesite'] = '';
175+
}
173176

174177
$this->getStorage($options);
175178
$temp = session_get_cookie_params();

src/Symfony/Component/PropertyAccess/PropertyPath.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function __construct($propertyPath)
116116
throw new InvalidPropertyPathException(sprintf(
117117
'Could not parse property path "%s". Unexpected token "%s" at position %d',
118118
$propertyPath,
119-
$remaining[0],
119+
substr($remaining, 0, 1),
120120
$position
121121
));
122122
}

0 commit comments

Comments
 (0)