[DEPENDENCIES] Update dependencies and Symfony to 5.4 LTS

This commit is contained in:
Hugo Sales 2021-12-22 19:46:57 +00:00 committed by Diogo Peralta Cordeiro
parent 80ebd6fb7b
commit 774b33a522
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
9 changed files with 1300 additions and 1429 deletions

38
bin/update-dependencies Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env php
<?php
/**
* Raise/update static version numbers in composer.json.
*
* Run on the CLI: "composer outdated --direct > outdated.txt"
*/
$composerJson = json_decode(file_get_contents('composer.json'), true);
system('composer outdated --direct > outdated.txt');
$listOfOutdatedPackages = file('outdated.txt');
foreach($listOfOutdatedPackages as $line) {
$regexp = '/(?P<package>[\w]+\/[\w]+).*(?P<currentVersion>\d.\d.\d).*(?P<latestVersion>\d.\d.\d)/';
preg_match($regexp, $line, $matches);
$matches = array_filter($matches, 'is_string', ARRAY_FILTER_USE_KEY);
if(isset($matches['package']))
{
$package = $matches['package'];
if(isset($composerJson['require'][$package]))
{
$currentVersion = $composerJson['require'][$package];
echo sprintf('Updating %s from %s to %s', $package, $currentVersion, $matches['latestVersion']);
$composerJson['require'][$package] = $matches['latestVersion'];
}
if(isset($composerJson['require-dev'][$package]))
{
$currentVersion = $composerJson['require-dev'][$package];
echo sprintf('Updating %s from %s to %s', $package, $currentVersion, $matches['latestVersion']);
$composerJson['require-dev'][$package] = $matches['latestVersion'];
}
}
}
file_put_contents('composer.json', json_encode($composerJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));

View File

@ -9,8 +9,7 @@
"ext-curl": "*", "ext-curl": "*",
"ext-iconv": "*", "ext-iconv": "*",
"ext-openssl": "*", "ext-openssl": "*",
"alchemy/zippy": "v0.5.x-dev", "composer/package-versions-deprecated": "1.11.*",
"composer/package-versions-deprecated": "1.11.99.3",
"doctrine/annotations": "^1.0", "doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.4", "doctrine/doctrine-bundle": "^2.4",
"doctrine/doctrine-migrations-bundle": "^3.1", "doctrine/doctrine-migrations-bundle": "^3.1",
@ -23,43 +22,45 @@
"oro/doctrine-extensions": "^2.0", "oro/doctrine-extensions": "^2.0",
"php-ds/php-ds": "^1.2", "php-ds/php-ds": "^1.2",
"phpdocumentor/reflection-docblock": "^5.2", "phpdocumentor/reflection-docblock": "^5.2",
"sensio/framework-extra-bundle": "^5.2", "sensio/framework-extra-bundle": "6.*",
"someonewithpc/memcached-polyfill": "^1.0", "someonewithpc/memcached-polyfill": "^1.0",
"someonewithpc/redis-polyfill": "dev-master", "someonewithpc/redis-polyfill": "dev-master",
"symfony/asset": "5.3.*", "symfony/asset": "5.4.*",
"symfony/cache": "5.3.*", "symfony/cache": "5.4.*",
"symfony/config": "5.3.*", "symfony/config": "5.4.*",
"symfony/console": "5.3.*", "symfony/console": "5.4.*",
"symfony/dom-crawler": "5.3.*", "symfony/dom-crawler": "5.4.*",
"symfony/dotenv": "5.3.*", "symfony/dotenv": "5.4.*",
"symfony/event-dispatcher": "5.3.*", "symfony/event-dispatcher": "5.4.*",
"symfony/expression-language": "5.3.*", "symfony/expression-language": "5.4.*",
"symfony/filesystem": "5.3.*", "symfony/filesystem": "5.4.*",
"symfony/flex": "^1.3.1", "symfony/flex": "^1.3.1",
"symfony/form": "5.3.*", "symfony/form": "5.4.*",
"symfony/framework-bundle": "5.3.*", "symfony/framework-bundle": "5.4.*",
"symfony/http-client": "5.3.*", "symfony/http-client": "5.4.*",
"symfony/intl": "5.3.*", "symfony/intl": "5.4.*",
"symfony/mailer": "5.3.*", "symfony/mailer": "5.4.*",
"symfony/messenger": "5.3.*", "symfony/messenger": "5.4.*",
"symfony/mime": "5.3.*", "symfony/mime": "5.4.*",
"symfony/monolog-bundle": "^3.1", "symfony/monolog-bundle": "^3.1",
"symfony/notifier": "5.3.*", "symfony/notifier": "5.4.*",
"symfony/process": "5.3.*", "symfony/process": "5.4.*",
"symfony/property-access": "5.3.*", "symfony/property-access": "5.4.*",
"symfony/property-info": "5.3.*", "symfony/property-info": "5.4.*",
"symfony/proxy-manager-bridge": "5.3.*", "symfony/proxy-manager-bridge": "5.4.*",
"symfony/security-bundle": "5.3.*", "symfony/security-bundle": "5.4.*",
"symfony/serializer": "5.3.*", "symfony/serializer": "5.4.*",
"symfony/string": "5.3.*", "symfony/string": "5.4.*",
"symfony/translation": "5.3.*", "symfony/translation": "5.4.*",
"symfony/twig-bundle": "5.3.*", "symfony/twig-bundle": "5.4.*",
"symfony/validator": "5.3.*", "symfony/validator": "5.4.*",
"symfony/web-link": "5.3.*", "symfony/var-exporter": "5.4.*",
"symfony/yaml": "5.3.*", "symfony/web-link": "5.4.*",
"symfony/yaml": "5.4.*",
"symfonycasts/reset-password-bundle": "^1.9", "symfonycasts/reset-password-bundle": "^1.9",
"symfonycasts/verify-email-bundle": "^1.0", "symfonycasts/verify-email-bundle": "^1.0",
"tgalopin/html-sanitizer-bundle": "^1.2", "tgalopin/html-sanitizer-bundle": "^1.2",
"theofidry/psysh-bundle": "^4.4",
"twig/extra-bundle": "^2.12|^3.0", "twig/extra-bundle": "^2.12|^3.0",
"twig/markdown-extra": "^3.0", "twig/markdown-extra": "^3.0",
"twig/twig": "^2.12|^3.0", "twig/twig": "^2.12|^3.0",
@ -72,14 +73,14 @@
"niels-de-blaauw/php-doc-check": "^0.2.2", "niels-de-blaauw/php-doc-check": "^0.2.2",
"phpstan/phpstan": "^0.12.98", "phpstan/phpstan": "^0.12.98",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^5.3", "symfony/browser-kit": "^5.4.",
"symfony/css-selector": "^5.3", "symfony/css-selector": "^5.4.",
"symfony/debug-bundle": "^5.3", "symfony/debug-bundle": "^5.4.",
"symfony/maker-bundle": "^1.14", "symfony/maker-bundle": "^1.14",
"symfony/phpunit-bridge": "^5.3", "symfony/phpunit-bridge": "^5.4.",
"symfony/stopwatch": "^5.3", "symfony/stopwatch": "5.4.*",
"symfony/web-profiler-bundle": "^5.3", "symfony/web-profiler-bundle": "^5.4.",
"theofidry/psysh-bundle": "^4.4" "symfony/error-handler": "^5.4."
}, },
"config": { "config": {
"preferred-install": { "preferred-install": {
@ -130,7 +131,7 @@
"extra": { "extra": {
"symfony": { "symfony": {
"allow-contrib": false, "allow-contrib": false,
"require": "5.3.*" "require": "5.4.*"
}, },
"merge-plugin": { "merge-plugin": {
"include": [ "include": [

2332
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types = 1);
return [ return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
@ -17,6 +19,6 @@ return [
HtmlSanitizer\Bundle\HtmlSanitizerBundle::class => ['all' => true], HtmlSanitizer\Bundle\HtmlSanitizerBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true], SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true],
Fidry\PsyshBundle\PsyshBundle::class => ['dev' => true, 'test' => true],
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true], Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
Fidry\PsyshBundle\PsyshBundle::class => ['all' => true],
]; ];

View File

@ -1,5 +1,5 @@
{ {
"require": { "require": {
"php-ffmpeg/php-ffmpeg": "^0.18.0" "php-ffmpeg/php-ffmpeg": "^0.19.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"require": { "require": {
"ext-vips": "*", "ext-vips": "*",
"jcupitt/vips": "1.0.8" "jcupitt/vips": "1.0.9"
} }
} }

View File

@ -1,5 +1,5 @@
{ {
"require": { "require": {
"php-ffmpeg/php-ffmpeg": "^0.18.0" "php-ffmpeg/php-ffmpeg": "^0.19.0"
} }
} }

View File

@ -35,7 +35,9 @@ namespace App\Util;
use App\Core\GNUsocial; use App\Core\GNUsocial;
use Functional as F; use Functional as F;
use ReflectionClass; use ReflectionClass;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpKernel\KernelInterface;
class GNUsocialTestCase extends WebTestCase class GNUsocialTestCase extends WebTestCase
{ {
@ -44,14 +46,14 @@ class GNUsocialTestCase extends WebTestCase
/** /**
* Provide our own initialization for testing * Provide our own initialization for testing
*/ */
public static function createClient(array $options = [], array $server = []) public static function createClient(array $options = [], array $server = []): KernelBrowser
{ {
$client = parent::createClient($options, $server); $client = parent::createClient($options, $server);
self::do_setup(); self::do_setup();
return $client; return $client;
} }
public static function bootKernel(array $options = []) public static function bootKernel(array $options = []): KernelInterface
{ {
$kernel = parent::bootKernel(); $kernel = parent::bootKernel();
self::do_setup(); self::do_setup();

View File

@ -2,15 +2,6 @@
"alchemy/binary-driver": { "alchemy/binary-driver": {
"version": "v5.2.0" "version": "v5.2.0"
}, },
"alchemy/resource-component": {
"version": "0.1.1"
},
"alchemy/zippy": {
"version": "v0.5.x-dev"
},
"beberlei/assert": {
"version": "v2.9.9"
},
"composer/ca-bundle": { "composer/ca-bundle": {
"version": "1.2.10" "version": "1.2.10"
}, },
@ -152,7 +143,7 @@
"version": "1.9" "version": "1.9"
}, },
"guzzlehttp/guzzle": { "guzzlehttp/guzzle": {
"version": "7.4.0" "version": "7.4.1"
}, },
"guzzlehttp/promises": { "guzzlehttp/promises": {
"version": "1.5.1" "version": "1.5.1"
@ -337,7 +328,7 @@
"version": "1.1.3" "version": "1.1.3"
}, },
"psy/psysh": { "psy/psysh": {
"version": "v0.10.8" "version": "v0.10.12"
}, },
"ralouphie/getallheaders": { "ralouphie/getallheaders": {
"version": "3.0.3" "version": "3.0.3"
@ -409,7 +400,7 @@
"version": "dev-master" "version": "dev-master"
}, },
"symfony/amqp-messenger": { "symfony/amqp-messenger": {
"version": "v5.2.4" "version": "v5.4.0"
}, },
"symfony/asset": { "symfony/asset": {
"version": "v5.2.4" "version": "v5.2.4"
@ -463,7 +454,7 @@
"version": "v5.2.6" "version": "v5.2.6"
}, },
"symfony/doctrine-messenger": { "symfony/doctrine-messenger": {
"version": "v5.2.5" "version": "v5.4.0"
}, },
"symfony/dom-crawler": { "symfony/dom-crawler": {
"version": "v5.2.4" "version": "v5.2.4"
@ -642,7 +633,7 @@
"version": "v1.22.1" "version": "v1.22.1"
}, },
"symfony/polyfill-php73": { "symfony/polyfill-php73": {
"version": "v1.22.1" "version": "v1.23.0"
}, },
"symfony/polyfill-php80": { "symfony/polyfill-php80": {
"version": "v1.22.1" "version": "v1.22.1"
@ -663,7 +654,7 @@
"version": "v5.2.4" "version": "v5.2.4"
}, },
"symfony/redis-messenger": { "symfony/redis-messenger": {
"version": "v5.2.4" "version": "v5.4.0"
}, },
"symfony/routing": { "symfony/routing": {
"version": "5.1", "version": "5.1",
@ -698,7 +689,7 @@
"version": "v5.2.4" "version": "v5.2.4"
}, },
"symfony/security-guard": { "symfony/security-guard": {
"version": "v5.2.4" "version": "v5.4.0"
}, },
"symfony/security-http": { "symfony/security-http": {
"version": "v5.2.6" "version": "v5.2.6"
@ -844,6 +835,9 @@
"webmozart/assert": { "webmozart/assert": {
"version": "1.10.0" "version": "1.10.0"
}, },
"wikimedia/composer-merge-plugin": {
"version": "v2.0.1"
},
"wp-cli/php-cli-tools": { "wp-cli/php-cli-tools": {
"version": "v0.11.12" "version": "v0.11.12"
} }