[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

@ -1,142 +1,143 @@
{
"type": "project",
"name": "gnu/social",
"description": "Free software social networking platform.",
"license": "AGPL-3.0-only",
"require": {
"php": "^8.0",
"ext-ctype": "*",
"ext-curl": "*",
"ext-iconv": "*",
"ext-openssl": "*",
"alchemy/zippy": "v0.5.x-dev",
"composer/package-versions-deprecated": "1.11.99.3",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.4",
"doctrine/doctrine-migrations-bundle": "^3.1",
"doctrine/orm": "^2.9",
"erusev/parsedown": "^1.7",
"knplabs/knp-time-bundle": "^1.17",
"lstrojny/functional-php": "^1.17",
"nyholm/psr7": "^1.4",
"odolbeau/phone-number-bundle": "^3.1",
"oro/doctrine-extensions": "^2.0",
"php-ds/php-ds": "^1.2",
"phpdocumentor/reflection-docblock": "^5.2",
"sensio/framework-extra-bundle": "^5.2",
"someonewithpc/memcached-polyfill": "^1.0",
"someonewithpc/redis-polyfill": "dev-master",
"symfony/asset": "5.3.*",
"symfony/cache": "5.3.*",
"symfony/config": "5.3.*",
"symfony/console": "5.3.*",
"symfony/dom-crawler": "5.3.*",
"symfony/dotenv": "5.3.*",
"symfony/event-dispatcher": "5.3.*",
"symfony/expression-language": "5.3.*",
"symfony/filesystem": "5.3.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.3.*",
"symfony/framework-bundle": "5.3.*",
"symfony/http-client": "5.3.*",
"symfony/intl": "5.3.*",
"symfony/mailer": "5.3.*",
"symfony/messenger": "5.3.*",
"symfony/mime": "5.3.*",
"symfony/monolog-bundle": "^3.1",
"symfony/notifier": "5.3.*",
"symfony/process": "5.3.*",
"symfony/property-access": "5.3.*",
"symfony/property-info": "5.3.*",
"symfony/proxy-manager-bridge": "5.3.*",
"symfony/security-bundle": "5.3.*",
"symfony/serializer": "5.3.*",
"symfony/string": "5.3.*",
"symfony/translation": "5.3.*",
"symfony/twig-bundle": "5.3.*",
"symfony/validator": "5.3.*",
"symfony/web-link": "5.3.*",
"symfony/yaml": "5.3.*",
"symfonycasts/reset-password-bundle": "^1.9",
"symfonycasts/verify-email-bundle": "^1.0",
"tgalopin/html-sanitizer-bundle": "^1.2",
"twig/extra-bundle": "^2.12|^3.0",
"twig/markdown-extra": "^3.0",
"twig/twig": "^2.12|^3.0",
"wikimedia/composer-merge-plugin": "^2.0"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"friendsofphp/php-cs-fixer": "^3.2.1",
"jchook/phpunit-assert-throws": "^1.0",
"niels-de-blaauw/php-doc-check": "^0.2.2",
"phpstan/phpstan": "^0.12.98",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^5.3",
"symfony/css-selector": "^5.3",
"symfony/debug-bundle": "^5.3",
"symfony/maker-bundle": "^1.14",
"symfony/phpunit-bridge": "^5.3",
"symfony/stopwatch": "^5.3",
"symfony/web-profiler-bundle": "^5.3",
"theofidry/psysh-bundle": "^4.4"
},
"config": {
"preferred-install": {
"*": "dist"
"type": "project",
"name": "gnu/social",
"description": "Free software social networking platform.",
"license": "AGPL-3.0-only",
"require": {
"php": "^8.0",
"ext-ctype": "*",
"ext-curl": "*",
"ext-iconv": "*",
"ext-openssl": "*",
"composer/package-versions-deprecated": "1.11.*",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.4",
"doctrine/doctrine-migrations-bundle": "^3.1",
"doctrine/orm": "^2.9",
"erusev/parsedown": "^1.7",
"knplabs/knp-time-bundle": "^1.17",
"lstrojny/functional-php": "^1.17",
"nyholm/psr7": "^1.4",
"odolbeau/phone-number-bundle": "^3.1",
"oro/doctrine-extensions": "^2.0",
"php-ds/php-ds": "^1.2",
"phpdocumentor/reflection-docblock": "^5.2",
"sensio/framework-extra-bundle": "6.*",
"someonewithpc/memcached-polyfill": "^1.0",
"someonewithpc/redis-polyfill": "dev-master",
"symfony/asset": "5.4.*",
"symfony/cache": "5.4.*",
"symfony/config": "5.4.*",
"symfony/console": "5.4.*",
"symfony/dom-crawler": "5.4.*",
"symfony/dotenv": "5.4.*",
"symfony/event-dispatcher": "5.4.*",
"symfony/expression-language": "5.4.*",
"symfony/filesystem": "5.4.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.4.*",
"symfony/framework-bundle": "5.4.*",
"symfony/http-client": "5.4.*",
"symfony/intl": "5.4.*",
"symfony/mailer": "5.4.*",
"symfony/messenger": "5.4.*",
"symfony/mime": "5.4.*",
"symfony/monolog-bundle": "^3.1",
"symfony/notifier": "5.4.*",
"symfony/process": "5.4.*",
"symfony/property-access": "5.4.*",
"symfony/property-info": "5.4.*",
"symfony/proxy-manager-bridge": "5.4.*",
"symfony/security-bundle": "5.4.*",
"symfony/serializer": "5.4.*",
"symfony/string": "5.4.*",
"symfony/translation": "5.4.*",
"symfony/twig-bundle": "5.4.*",
"symfony/validator": "5.4.*",
"symfony/var-exporter": "5.4.*",
"symfony/web-link": "5.4.*",
"symfony/yaml": "5.4.*",
"symfonycasts/reset-password-bundle": "^1.9",
"symfonycasts/verify-email-bundle": "^1.0",
"tgalopin/html-sanitizer-bundle": "^1.2",
"theofidry/psysh-bundle": "^4.4",
"twig/extra-bundle": "^2.12|^3.0",
"twig/markdown-extra": "^3.0",
"twig/twig": "^2.12|^3.0",
"wikimedia/composer-merge-plugin": "^2.0"
},
"sort-packages": true
},
"autoload": {
"files": [
"src/Core/I18n/I18n.php"
],
"psr-4": {
"App\\": "src/",
"Plugin\\": "plugins/",
"Component\\": "components/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"friendsofphp/php-cs-fixer": "^3.2.1",
"jchook/phpunit-assert-throws": "^1.0",
"niels-de-blaauw/php-doc-check": "^0.2.2",
"phpstan/phpstan": "^0.12.98",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^5.4.",
"symfony/css-selector": "^5.4.",
"symfony/debug-bundle": "^5.4.",
"symfony/maker-bundle": "^1.14",
"symfony/phpunit-bridge": "^5.4.",
"symfony/stopwatch": "5.4.*",
"symfony/web-profiler-bundle": "^5.4.",
"symfony/error-handler": "^5.4."
},
"post-install-cmd": [
"@auto-scripts",
"cp -fu bin/pre-commit .git/hooks"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.3.*"
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"merge-plugin": {
"include": [
"components/*/composer.json",
"plugins/*/composer.json"
]
"autoload": {
"files": [
"src/Core/I18n/I18n.php"
],
"psr-4": {
"App\\": "src/",
"Plugin\\": "plugins/",
"Component\\": "components/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts",
"cp -fu bin/pre-commit .git/hooks"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.4.*"
},
"merge-plugin": {
"include": [
"components/*/composer.json",
"plugins/*/composer.json"
]
}
}
}
}

2332
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,24 @@
<?php
declare(strict_types = 1);
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
Misd\PhoneNumberBundle\MisdPhoneNumberBundle::class => ['all' => true],
HtmlSanitizer\Bundle\HtmlSanitizerBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
Misd\PhoneNumberBundle\MisdPhoneNumberBundle::class => ['all' => true],
HtmlSanitizer\Bundle\HtmlSanitizerBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => 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": {
"php-ffmpeg/php-ffmpeg": "^0.18.0"
}
"require": {
"php-ffmpeg/php-ffmpeg": "^0.19.0"
}
}

View File

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

View File

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

View File

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

View File

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