Merge pull request #2539 from acelaya-forks/symfony-8.0

Update to Symfony 8.0
This commit is contained in:
Alejandro Celaya
2025-12-03 07:58:39 +01:00
committed by GitHub
9 changed files with 31 additions and 19 deletions

View File

@@ -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*

View File

@@ -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": {

View File

@@ -114,6 +114,7 @@ class MatomoSendVisitsCommandTest extends TestCase
}
/**
* @param list<string> $input
* @return array{string, int, MatomoSendVisitsCommand}
*/
private function executeCommand(

View File

@@ -64,6 +64,9 @@ class DeleteShortUrlCommandTest extends TestCase
self::assertStringContainsString(sprintf('No URL found with short code "%s"', $shortCode), $output);
}
/**
* @param list<string> $retryAnswer
*/
#[Test, DataProvider('provideRetryDeleteAnswers')]
public function deleteIsRetriedWhenThresholdIsReachedAndQuestionIsAccepted(
array $retryAnswer,

View File

@@ -27,6 +27,9 @@ class DeleteShortUrlVisitsCommandTest extends TestCase
$this->commandTester = CliTestUtils::testerForCommand(new DeleteShortUrlVisitsCommand($this->deleter));
}
/**
* @param list<string> $input
*/
#[Test, DataProvider('provideCancellingInputs')]
public function executionIsAbortedIfManuallyCancelled(array $input): void
{

View File

@@ -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<string> $inputs
*/
#[Test, DataProvider('provideAbortInputs')]
public function processingAllCancelsCommandIfUserDoesNotActivelyAgreeToConfirmation(array $inputs): void
{

View File

@@ -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);

View File

@@ -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,

View File

@@ -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