diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c97a1fa..9da4fd91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this Instead, if you have more than 1 proxy in front of Shlink, you should provide `TRUSTED_PROXIES` env var, with either a comma-separated list of the IP addresses of your proxies, or a number indicating how many proxies are there in front of Shlink. +* [#2540](https://github.com/shlinkio/shlink/issues/2540) Update Symfony packages to 8.0. + ### Deprecated * *Nothing* diff --git a/composer.json b/composer.json index 78200845..8755c856 100644 --- a/composer.json +++ b/composer.json @@ -41,22 +41,22 @@ "pagerfanta/core": "^3.8", "ramsey/uuid": "^4.7", "shlinkio/doctrine-specification": "^2.2", - "shlinkio/shlink-common": "^7.2", - "shlinkio/shlink-config": "^4.0", - "shlinkio/shlink-event-dispatcher": "^4.3", - "shlinkio/shlink-importer": "^5.6", - "shlinkio/shlink-installer": "dev-develop#2b9e6bd as 10.0.0", - "shlinkio/shlink-ip-geolocation": "^4.4", - "shlinkio/shlink-json": "^1.2", + "shlinkio/shlink-common": "dev-main#f2550b5 as 7.3.0", + "shlinkio/shlink-config": "dev-main#fb186e4 as 4.1.0", + "shlinkio/shlink-event-dispatcher": "dev-main#54d4701 as 4.4.0", + "shlinkio/shlink-importer": "dev-main#4498f0a as 5.7.0", + "shlinkio/shlink-installer": "dev-develop#40e08cb as 10.0.0", + "shlinkio/shlink-ip-geolocation": "dev-main#e0c45b2 as 5.0.0", + "shlinkio/shlink-json": "dev-main#7c096d6 as 1.3.0", "spiral/roadrunner": "^2025.1", "spiral/roadrunner-cli": "^2.7", "spiral/roadrunner-http": "^3.5", "spiral/roadrunner-jobs": "^4.6", - "symfony/console": "^7.3", - "symfony/filesystem": "^7.3", - "symfony/lock": "^7.3.2", - "symfony/process": "^7.3", - "symfony/string": "^7.3" + "symfony/console": "^8.0 || ^7.4", + "symfony/filesystem": "^8.0", + "symfony/lock": "^8.0", + "symfony/process": "^8.0", + "symfony/string": "^8.0" }, "require-dev": { "devizzent/cebe-php-openapi": "^1.1.2", @@ -70,8 +70,8 @@ "phpunit/phpunit": "^12.0.10", "roave/security-advisories": "dev-master", "shlinkio/php-coding-standard": "~2.5.0", - "shlinkio/shlink-test-utils": "^4.3.1", - "symfony/var-dumper": "^7.3", + "shlinkio/shlink-test-utils": "^4.4", + "symfony/var-dumper": "^8.0", "veewee/composer-run-parallel": "^1.4" }, "conflict": { diff --git a/module/CLI/test/Command/Integration/MatomoSendVisitsCommandTest.php b/module/CLI/test/Command/Integration/MatomoSendVisitsCommandTest.php index f4eebdf5..dadce789 100644 --- a/module/CLI/test/Command/Integration/MatomoSendVisitsCommandTest.php +++ b/module/CLI/test/Command/Integration/MatomoSendVisitsCommandTest.php @@ -114,6 +114,7 @@ class MatomoSendVisitsCommandTest extends TestCase } /** + * @param list $input * @return array{string, int, MatomoSendVisitsCommand} */ private function executeCommand( diff --git a/module/CLI/test/Command/ShortUrl/DeleteShortUrlCommandTest.php b/module/CLI/test/Command/ShortUrl/DeleteShortUrlCommandTest.php index 6ffec859..62872123 100644 --- a/module/CLI/test/Command/ShortUrl/DeleteShortUrlCommandTest.php +++ b/module/CLI/test/Command/ShortUrl/DeleteShortUrlCommandTest.php @@ -64,6 +64,9 @@ class DeleteShortUrlCommandTest extends TestCase self::assertStringContainsString(sprintf('No URL found with short code "%s"', $shortCode), $output); } + /** + * @param list $retryAnswer + */ #[Test, DataProvider('provideRetryDeleteAnswers')] public function deleteIsRetriedWhenThresholdIsReachedAndQuestionIsAccepted( array $retryAnswer, diff --git a/module/CLI/test/Command/ShortUrl/DeleteShortUrlVisitsCommandTest.php b/module/CLI/test/Command/ShortUrl/DeleteShortUrlVisitsCommandTest.php index de038aef..3efa94b5 100644 --- a/module/CLI/test/Command/ShortUrl/DeleteShortUrlVisitsCommandTest.php +++ b/module/CLI/test/Command/ShortUrl/DeleteShortUrlVisitsCommandTest.php @@ -27,6 +27,9 @@ class DeleteShortUrlVisitsCommandTest extends TestCase $this->commandTester = CliTestUtils::testerForCommand(new DeleteShortUrlVisitsCommand($this->deleter)); } + /** + * @param list $input + */ #[Test, DataProvider('provideCancellingInputs')] public function executionIsAbortedIfManuallyCancelled(array $input): void { diff --git a/module/CLI/test/Command/Visit/LocateVisitsCommandTest.php b/module/CLI/test/Command/Visit/LocateVisitsCommandTest.php index ca7db909..2c82247f 100644 --- a/module/CLI/test/Command/Visit/LocateVisitsCommandTest.php +++ b/module/CLI/test/Command/Visit/LocateVisitsCommandTest.php @@ -81,7 +81,7 @@ class LocateVisitsCommandTest extends TestCase ->willReturnCallback($mockMethodBehavior); $this->visitToLocation->expects( $this->exactly($expectedUnlocatedCalls + $expectedEmptyCalls + $expectedAllCalls), - )->method('resolveVisitLocation')->withAnyParameters()->willReturn(Location::emptyInstance()); + )->method('resolveVisitLocation')->withAnyParameters()->willReturn(Location::empty()); $this->downloadDbCommand->method('run')->willReturn(Command::SUCCESS); $this->commandTester->setInputs(['y']); @@ -204,6 +204,9 @@ class LocateVisitsCommandTest extends TestCase self::assertStringContainsString('The --all flag has no effect on its own', $output); } + /** + * @param list $inputs + */ #[Test, DataProvider('provideAbortInputs')] public function processingAllCancelsCommandIfUserDoesNotActivelyAgreeToConfirmation(array $inputs): void { diff --git a/module/CLI/test/Util/CliTestUtils.php b/module/CLI/test/Util/CliTestUtils.php index 5f94c661..bacde361 100644 --- a/module/CLI/test/Util/CliTestUtils.php +++ b/module/CLI/test/Util/CliTestUtils.php @@ -40,9 +40,9 @@ class CliTestUtils public static function testerForCommand(Command $mainCommand, Command ...$extraCommands): CommandTester { $app = new Application(); - $app->add($mainCommand); + $app->addCommand($mainCommand); foreach ($extraCommands as $command) { - $app->add($command); + $app->addCommand($command); } return new CommandTester($mainCommand); diff --git a/module/Core/test/EventDispatcher/LocateUnlocatedVisitsTest.php b/module/Core/test/EventDispatcher/LocateUnlocatedVisitsTest.php index ef776d42..d8168f6e 100644 --- a/module/Core/test/EventDispatcher/LocateUnlocatedVisitsTest.php +++ b/module/Core/test/EventDispatcher/LocateUnlocatedVisitsTest.php @@ -40,7 +40,7 @@ class LocateUnlocatedVisitsTest extends TestCase public function visitToLocationHelperIsCalledToGeolocateVisits(): void { $visit = Visit::forBasePath(Visitor::empty()); - $location = Location::emptyInstance(); + $location = Location::empty(); $this->visitToLocation->expects($this->once())->method('resolveVisitLocation')->with($visit)->willReturn( $location, diff --git a/module/Core/test/Visit/Geolocation/VisitLocatorTest.php b/module/Core/test/Visit/Geolocation/VisitLocatorTest.php index 68c746d7..0d51b402 100644 --- a/module/Core/test/Visit/Geolocation/VisitLocatorTest.php +++ b/module/Core/test/Visit/Geolocation/VisitLocatorTest.php @@ -67,7 +67,7 @@ class VisitLocatorTest extends TestCase $this->visitService->{$serviceMethodName}(new class implements VisitGeolocationHelperInterface { public function geolocateVisit(Visit $visit): Location { - return Location::emptyInstance(); + return Location::empty(); } public function onVisitLocated(VisitLocation $visitLocation, Visit $visit): void