8000 [travis] use PHP 8.0 to patch return types · symfony/symfony@8029402 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8029402

Browse files
[travis] use PHP 8.0 to patch return types
1 parent d23b74e commit 8029402

File tree

19 files changed

+32
-35
lines changed

19 files changed

+32
-35
lines changed

.github/patch-types.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,25 @@
2222

2323
foreach ($loader->getClassMap() as $class => $file) {
2424
switch (true) {
25-
case false !== strpos(realpath($file), '/vendor/'):
25+
case false !== strpos($file = realpath($file), '/vendor/'):
2626
case false !== strpos($file, '/src/Symfony/Bridge/PhpUnit/'):
2727
case false !== strpos($file, '/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Article.php'):
2828
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadFileName.php'):
2929
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/BadParent.php'):
3030
case false !== strpos($file, '/src/Symfony/Component/Config/Tests/Fixtures/ParseError.php'):
3131
case false !== strpos($file, '/src/Symfony/Component/Debug/Tests/Fixtures/'):
3232
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php'):
33-
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/UnionConstructor.php'):
3433
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php'):
35-
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/uniontype_classes.php'):
34+
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/MultipleArgumentsOptionalScalarNotReallyOptional.php'):
3635
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/ParentNotExists.php'):
3736
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Preload/'):
3837
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php'):
3938
case false !== strpos($file, '/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/'):
4039
case false !== strpos($file, '/src/Symfony/Component/ErrorHandler/Tests/Fixtures/'):
4140
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php'):
4241
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/ParentDummy.php'):
43-
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php80Dummy.php'):
4442
case false !== strpos($file, '/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectOuter.php'):
4543
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/NotLoadableClass.php'):
46-
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/Php74.php') && \PHP_VERSION_ID < 70400:
4744
continue 2;
4845
}
4946

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
error_reporting(-1);
44
set_error_handler(function ($type, $message, $file, $line) {
5-
if (error_reporting()) {
5+
if (error_reporting() & $type) {
66
throw new \ErrorException($message, 0, $type, $file, $line);
77
}
88
});

.travis.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ env:
2121
matrix:
2222
include:
2323
- php: 7.1
24-
env: php_extra="7.2 7.4"
25-
- php: 7.3
26-
env: deps=high
24+
env: php_extra="7.2 7.3 8.0"
2725
- php: 7.4
28-
env: deps=low
26+
env: deps=high
2927
- php: 8.0
30-
services: [memcached]
28+
env: deps=low
3129
fast_finish: true
3230

3331
cache:
@@ -248,7 +246,7 @@ install:
248246
set -e
249247
export PHP=$1
250248
251-
if [[ $PHP != 7.4* && $PHP != $TRAVIS_PHP_VERSION && $TRAVIS_PULL_REQUEST != false ]]; then
249+
if [[ $PHP != 8.0* && $PHP != $TRAVIS_PHP_VERSION && $TRAVIS_PULL_REQUEST != false ]]; then
252250
echo -e "\\n\\e[33;1mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"
253251
return
254252
fi
@@ -283,12 +281,12 @@ install:
283281
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && ([ -e composer.lock ] && ${COMPOSER_UP/update/install} || $COMPOSER_UP --prefer-lowest --prefer-stable) && $PHPUNIT_X'"
284282
echo "$COMPONENTS" | xargs -n1 -I{} tar --append -f ~/php-ext/composer-lowest.lock.tar {}/composer.lock
285283
else
286-
if [[ $PHP = 7.4* ]]; then
284+
if [[ $PHP = 8.0* ]]; then
287285
# add return types before running the test suite
288286
sed -i 's/"\*\*\/Tests\/"//' composer.json
289287
composer install --optimize-autoloader
290-
SYMFONY_PATCH_TYPE_DECLARATIONS=force=object php .github/patch-types.php
291-
SYMFONY_PATCH_TYPE_DECLARATIONS=force=object php .github/patch-types.php # ensure the script is idempotent
288+
SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php
289+
SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php # ensure the script is idempotent
292290
PHPUNIT_X="$PHPUNIT_X,legacy"
293291
fi
294292

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"friendsofphp/proxy-manager-lts": "^1.0.2",
2222
"doctrine/event-manager": "~1.0",
2323
"doctrine/persistence": "^1.3|^2",
24-
"twig/twig": "^1.41|^2.10|^3.0",
24+
"twig/twig": "^1.43|^2.13|^3.0.4",
2525
"psr/cache": "~1.0",
2626
"psr/container": "^1.0",
2727
"psr/link": "^1.0",
@@ -102,14 +102,14 @@
102102
"require-dev": {
103103
"cache/integration-tests": "dev-master",
104104
"composer/package-versions-deprecated": "^1.8",
105-
"doctrine/annotations": "~1.0",
105+
"doctrine/annotations": "^1.10.4",
106106
"doctrine/cache": "~1.6",
107107
"doctrine/collections": "~1.0",
108108
"doctrine/data-fixtures": "^1.1",
109109
"doctrine/dbal": "~2.4|^3.0",
110110
"doctrine/orm": "~2.4,>=2.4.5",
111111
"doctrine/doctrine-bundle": "^1.5|^2.0",
112-
"guzzlehttp/promises": "^1.3.1",
112+
"guzzlehttp/promises": "^1.4",
113113
"masterminds/html5": "^2.6",
114114
"monolog/monolog": "^1.25.1",
115115
"nyholm/psr7": "^1.0",

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"symfony/validator": "^4.4.2|^5.0.2",
4040
"symfony/var-dumper": "^3.4|^4.0|^5.0",
4141
"symfony/translation": "^3.4|^4.0|^5.0",
42-
"doctrine/annotations": "~1.7",
42+
"doctrine/annotations": "^1.10.4",
4343
"doctrine/cache": "~1.6",
4444
"doctrine/collections": "~1.0",
4545
"doctrine/data-fixtures": "^1.1",

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=7.1.3",
2020
"symfony/translation-contracts": "^1.1|^2",
21-
"twig/twig": "^1.41|^2.10|^3.0"
21+
"twig/twig": "^1.43|^2.13|^3.0.4"
2222
},
2323
"require-dev": {
2424
"egulias/email-validator": "^2.1.10",

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"symfony/routing": "^4.4|^5.0"
3131
},
3232
"require-dev": {
33-
"doctrine/annotations": "~1.7",
33+
"doctrine/annotations": "^1.10.4",
3434
"doctrine/cache": "~1.0",
3535
"paragonie/sodium_compat": "^1.8",
3636
"symfony/asset": "^3.4|^4.0|^5.0",
@@ -61,7 +61,7 @@
6161
"symfony/property-info": "^3.4|^4.0|^5.0",
6262
"symfony/web-link": "^4.4|^5.0",
6363
"phpdocumentor/reflection-docblock": "^3.0|^4.0",
64-
"twig/twig": "^1.41|^2.10|^3.0"
64+
"twig/twig": "^1.43|^2.13|^3.0.4"
6565
},
6666
"conflict": {
6767
"doctrine/persistence": "<1.3",

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"symfony/twig-bundle": "^4.4|^5.0",
4444
"symfony/validator": "^3.4|^4.0|^5.0",
4545
"symfony/yaml": "^3.4|^4.0|^5.0",
46-
"twig/twig": "^1.41|^2.10|^3.0"
46+
"twig/twig": "^1.43|^2.13|^3.0.4"
4747
},
4848
"conflict": {
4949
"symfony/browser-kit": "<4.2",

src/Symfony/Bundle/TwigBundle/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/http-foundation": "^4.3|^5.0",
2222
"symfony/http-kernel": "^4.4",
2323
"symfony/polyfill-ctype": "~1.8",
24-
"twig/twig": "^1.41|^2.10|^3.0"
24+
"twig/twig": "^1.43|^2.13|^3.0.4"
2525
},
2626
"require-dev": {
2727
"symfony/asset": "^3.4|^4.0|^5.0",
@@ -36,7 +36,7 @@
3636
"symfony/yaml": "^3.4|^4.0|^5.0",
3737
"symfony/framework-bundle": "^4.4|^5.0",
3838
"symfony/web-link": "^3.4|^4.0|^5.0",
39-
"doctrine/annotations": "~1.7",
39+
"doctrine/annotations": "^1.10.4",
4040
"doctrine/cache": "~1.0"
4141
},
4242
"conflict": {

src/Symfony/Bundle/WebProfilerBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"symfony/http-kernel": "^4.4",
2323
"symfony/routing": "^4.3|^5.0",
2424
"symfony/twig-bundle": "^4.2|^5.0",
25-
"twig/twig": "^1.41|^2.10|^3.0"
25+
"twig/twig": "^1.43|^2.13|^3.0.4"
2626
},
2727
"require-dev": {
2828
"symfony/browser-kit": "^4.3|^5.0",

0 commit comments

Comments
 (0)
0