mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-24 18:00:17 -06:00
Update dependencies
This commit is contained in:
parent
aa4b9fc27e
commit
b747b8448e
@ -18,30 +18,30 @@
|
||||
"ext-json": "*",
|
||||
"ext-pdo": "*",
|
||||
"akrabat/ip-address-middleware": "^2.1",
|
||||
"cakephp/chronos": "^2.3",
|
||||
"doctrine/migrations": "^3.5",
|
||||
"doctrine/orm": "^2.14",
|
||||
"endroid/qr-code": "^4.7",
|
||||
"cakephp/chronos": "^2.4",
|
||||
"doctrine/migrations": "^3.6",
|
||||
"doctrine/orm": "^2.16",
|
||||
"endroid/qr-code": "^4.8",
|
||||
"friendsofphp/proxy-manager-lts": "^1.0",
|
||||
"geoip2/geoip2": "^2.13",
|
||||
"guzzlehttp/guzzle": "^7.5",
|
||||
"happyr/doctrine-specification": "^2.0",
|
||||
"jaybizzle/crawler-detect": "^1.2.112",
|
||||
"jaybizzle/crawler-detect": "^1.2.116",
|
||||
"laminas/laminas-config": "^3.8",
|
||||
"laminas/laminas-config-aggregator": "^1.13",
|
||||
"laminas/laminas-diactoros": "^2.24",
|
||||
"laminas/laminas-inputfilter": "^2.24",
|
||||
"laminas/laminas-diactoros": "^2.25",
|
||||
"laminas/laminas-inputfilter": "^2.27",
|
||||
"laminas/laminas-servicemanager": "^3.21",
|
||||
"laminas/laminas-stdlib": "^3.16",
|
||||
"laminas/laminas-stdlib": "^3.17",
|
||||
"league/uri": "^6.8",
|
||||
"lstrojny/functional-php": "^1.17",
|
||||
"mezzio/mezzio": "^3.15",
|
||||
"mezzio/mezzio-fastroute": "^3.8",
|
||||
"mezzio/mezzio-problem-details": "^1.11",
|
||||
"mezzio/mezzio-swoole": "^4.6",
|
||||
"mezzio/mezzio": "^3.17",
|
||||
"mezzio/mezzio-fastroute": "^3.10",
|
||||
"mezzio/mezzio-problem-details": "^1.12",
|
||||
"mezzio/mezzio-swoole": "^4.7",
|
||||
"mlocati/ip-lib": "^1.18",
|
||||
"mobiledetect/mobiledetectlib": "^3.74",
|
||||
"ocramius/proxy-manager": "^2.14",
|
||||
"pagerfanta/core": "^3.7",
|
||||
"pagerfanta/core": "^3.8",
|
||||
"php-middleware/request-id": "^4.1",
|
||||
"pugx/shortid-php": "^1.1",
|
||||
"ramsey/uuid": "^4.7",
|
||||
@ -52,15 +52,15 @@
|
||||
"shlinkio/shlink-installer": "dev-develop#b393e6b as 8.5",
|
||||
"shlinkio/shlink-ip-geolocation": "^3.2",
|
||||
"shlinkio/shlink-json": "^1.0",
|
||||
"spiral/roadrunner": "^2023.1",
|
||||
"spiral/roadrunner": "^2023.2",
|
||||
"spiral/roadrunner-cli": "^2.5",
|
||||
"spiral/roadrunner-http": "^3.0",
|
||||
"spiral/roadrunner-http": "^3.1",
|
||||
"spiral/roadrunner-jobs": "^4.0",
|
||||
"symfony/console": "^6.2",
|
||||
"symfony/filesystem": "^6.2",
|
||||
"symfony/lock": "^6.2",
|
||||
"symfony/process": "^6.2",
|
||||
"symfony/string": "^6.2"
|
||||
"symfony/console": "^6.3",
|
||||
"symfony/filesystem": "^6.3",
|
||||
"symfony/lock": "^6.3",
|
||||
"symfony/process": "^6.3",
|
||||
"symfony/string": "^6.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"devizzent/cebe-php-openapi": "^1.0.1",
|
||||
@ -71,12 +71,12 @@
|
||||
"phpstan/phpstan-doctrine": "^1.3",
|
||||
"phpstan/phpstan-phpunit": "^1.3",
|
||||
"phpstan/phpstan-symfony": "^1.3",
|
||||
"phpunit/php-code-coverage": "^10.0",
|
||||
"phpunit/phpunit": "^10.2.0",
|
||||
"phpunit/php-code-coverage": "^10.1",
|
||||
"phpunit/phpunit": "^10.3",
|
||||
"roave/security-advisories": "dev-master",
|
||||
"shlinkio/php-coding-standard": "~2.3.0",
|
||||
"shlinkio/shlink-test-utils": "^3.7.1",
|
||||
"symfony/var-dumper": "^6.2",
|
||||
"symfony/var-dumper": "^6.3",
|
||||
"veewee/composer-run-parallel": "^1.2"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -70,7 +70,7 @@ class GeolocationDbUpdater implements GeolocationDbUpdaterInterface
|
||||
$buildTimestamp = $this->resolveBuildTimestamp($meta);
|
||||
$buildDate = Chronos::createFromTimestamp($buildTimestamp);
|
||||
|
||||
return Chronos::now()->gt($buildDate->addDays(35));
|
||||
return Chronos::now()->greaterThan($buildDate->addDays(35));
|
||||
}
|
||||
|
||||
private function resolveBuildTimestamp(Metadata $meta): int
|
||||
|
@ -24,7 +24,7 @@ class ListApiKeysTest extends CliTestCase
|
||||
|
||||
public static function provideFlags(): iterable
|
||||
{
|
||||
$expiredApiKeyDate = Chronos::now()->subDay()->startOfDay()->toAtomString();
|
||||
$expiredApiKeyDate = Chronos::now()->subDays(1)->startOfDay()->toAtomString();
|
||||
$enabledOnlyOutput = <<<OUT
|
||||
+--------------------+------+---------------------------+--------------------------+
|
||||
| Key | Name | Expiration date | Roles |
|
||||
|
@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
namespace ShlinkioTest\Shlink\CLI\Util;
|
||||
|
||||
use PHPUnit\Framework\Assert;
|
||||
use PHPUnit\Framework\MockObject\Generator;
|
||||
use PHPUnit\Framework\MockObject\Generator\Generator;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
@ -139,7 +139,7 @@ class ImportedLinksProcessor implements ImportedLinksProcessorInterface
|
||||
$importedVisits = 0;
|
||||
foreach ($iterable as $importedOrphanVisit) {
|
||||
// Skip visits which are older than the most recent already imported visit's date
|
||||
if ($mostRecentOrphanVisit?->getDate()->gte(normalizeDate($importedOrphanVisit->date))) {
|
||||
if ($mostRecentOrphanVisit?->getDate()->greaterThanOrEquals(normalizeDate($importedOrphanVisit->date))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ final class ShortUrlImporting
|
||||
$importedVisits = 0;
|
||||
foreach ($visits as $importedVisit) {
|
||||
// Skip visits which are older than the most recent already imported visit's date
|
||||
if ($mostRecentImportedDate?->gte(normalizeDate($importedVisit->date))) {
|
||||
if ($mostRecentImportedDate?->greaterThanOrEquals(normalizeDate($importedVisit->date))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -319,12 +319,12 @@ class ShortUrl extends AbstractEntity
|
||||
}
|
||||
|
||||
$now = Chronos::now();
|
||||
$beforeValidSince = $this->validSince !== null && $this->validSince->gt($now);
|
||||
$beforeValidSince = $this->validSince !== null && $this->validSince->greaterThan($now);
|
||||
if ($beforeValidSince) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$afterValidUntil = $this->validUntil !== null && $this->validUntil->lt($now);
|
||||
$afterValidUntil = $this->validUntil !== null && $this->validUntil->lessThan($now);
|
||||
if ($afterValidUntil) {
|
||||
return false;
|
||||
}
|
||||
|
@ -307,9 +307,9 @@ class ImportedLinksProcessorTest extends TestCase
|
||||
yield 'existing orphan visit' => [true, [
|
||||
new ImportedShlinkOrphanVisit('', '', Chronos::now()->subDays(3), '', '', null),
|
||||
new ImportedShlinkOrphanVisit('', '', Chronos::now()->subDays(2), '', '', null),
|
||||
new ImportedShlinkOrphanVisit('', '', Chronos::now()->addDay(), '', '', null),
|
||||
new ImportedShlinkOrphanVisit('', '', Chronos::now()->addDay(), '', '', null),
|
||||
new ImportedShlinkOrphanVisit('', '', Chronos::now()->addDay(), '', '', null),
|
||||
new ImportedShlinkOrphanVisit('', '', Chronos::now()->addDays(1), '', '', null),
|
||||
new ImportedShlinkOrphanVisit('', '', Chronos::now()->addDays(1), '', '', null),
|
||||
new ImportedShlinkOrphanVisit('', '', Chronos::now()->addDays(1), '', '', null),
|
||||
], Visit::forBasePath(Visitor::botInstance()), 3];
|
||||
}
|
||||
|
||||
|
@ -121,15 +121,15 @@ class ShortUrlResolverTest extends TestCase
|
||||
return $shortUrl;
|
||||
})()];
|
||||
yield 'future validSince' => [ShortUrl::create(ShortUrlCreation::fromRawData(
|
||||
['validSince' => $now->addMonth()->toAtomString(), 'longUrl' => 'https://longUrl'],
|
||||
['validSince' => $now->addMonths(1)->toAtomString(), 'longUrl' => 'https://longUrl'],
|
||||
))];
|
||||
yield 'past validUntil' => [ShortUrl::create(ShortUrlCreation::fromRawData(
|
||||
['validUntil' => $now->subMonth()->toAtomString(), 'longUrl' => 'https://longUrl'],
|
||||
['validUntil' => $now->subMonths(1)->toAtomString(), 'longUrl' => 'https://longUrl'],
|
||||
))];
|
||||
yield 'mixed' => [(function () use ($now) {
|
||||
$shortUrl = ShortUrl::create(ShortUrlCreation::fromRawData([
|
||||
'maxVisits' => 3,
|
||||
'validUntil' => $now->subMonth()->toAtomString(),
|
||||
'validUntil' => $now->subMonths(1)->toAtomString(),
|
||||
'longUrl' => 'https://longUrl',
|
||||
]));
|
||||
$shortUrl->setVisits(new ArrayCollection(map(
|
||||
|
@ -65,7 +65,7 @@ class ApiKey extends AbstractEntity
|
||||
|
||||
public function isExpired(): bool
|
||||
{
|
||||
return $this->expirationDate !== null && $this->expirationDate->lt(Chronos::now());
|
||||
return $this->expirationDate !== null && $this->expirationDate->lessThan(Chronos::now());
|
||||
}
|
||||
|
||||
public function name(): ?string
|
||||
|
@ -115,7 +115,7 @@ class CreateShortUrlTest extends ApiTestCase
|
||||
public function createsShortUrlWithValidSince(): void
|
||||
{
|
||||
[$statusCode, ['shortCode' => $shortCode]] = $this->createShortUrl([
|
||||
'validSince' => Chronos::now()->addDay()->toAtomString(),
|
||||
'validSince' => Chronos::now()->addDays(1)->toAtomString(),
|
||||
]);
|
||||
|
||||
self::assertEquals(self::STATUS_OK, $statusCode);
|
||||
@ -129,7 +129,7 @@ class CreateShortUrlTest extends ApiTestCase
|
||||
public function createsShortUrlWithValidUntil(): void
|
||||
{
|
||||
[$statusCode, ['shortCode' => $shortCode]] = $this->createShortUrl([
|
||||
'validUntil' => Chronos::now()->subDay()->toAtomString(),
|
||||
'validUntil' => Chronos::now()->subDays(1)->toAtomString(),
|
||||
]);
|
||||
|
||||
self::assertEquals(self::STATUS_OK, $statusCode);
|
||||
|
@ -55,13 +55,13 @@ class EditShortUrlTest extends ApiTestCase
|
||||
{
|
||||
$now = Chronos::now();
|
||||
|
||||
yield [['validSince' => $now->addMonth()->toAtomString()]];
|
||||
yield [['validUntil' => $now->subMonth()->toAtomString()]];
|
||||
yield [['validSince' => $now->addMonths(1)->toAtomString()]];
|
||||
yield [['validUntil' => $now->subMonths(1)->toAtomString()]];
|
||||
yield [['maxVisits' => 20]];
|
||||
yield [['validUntil' => $now->addYear()->toAtomString(), 'maxVisits' => 100]];
|
||||
yield [['validUntil' => $now->addYears(1)->toAtomString(), 'maxVisits' => 100]];
|
||||
yield [[
|
||||
'validSince' => $now->subYear()->toAtomString(),
|
||||
'validUntil' => $now->addYear()->toAtomString(),
|
||||
'validSince' => $now->subYears(1)->toAtomString(),
|
||||
'validUntil' => $now->addYears(1)->toAtomString(),
|
||||
'maxVisits' => 100,
|
||||
]];
|
||||
}
|
||||
|
@ -30,6 +30,6 @@ class NonOrphanVisitsTest extends ApiTestCase
|
||||
yield 'last page' => [['page' => 3, 'itemsPerPage' => 3], 7, 1];
|
||||
yield 'bots excluded' => [['excludeBots' => 'true'], 6, 6];
|
||||
yield 'bots excluded and pagination' => [['excludeBots' => 'true', 'page' => 1, 'itemsPerPage' => 4], 6, 4];
|
||||
yield 'date filter' => [['startDate' => Chronos::now()->addDay()->toAtomString()], 0, 0];
|
||||
yield 'date filter' => [['startDate' => Chronos::now()->addDays(1)->toAtomString()], 0, 0];
|
||||
}
|
||||
}
|
||||
|
@ -37,8 +37,8 @@ class ResolveShortUrlTest extends ApiTestCase
|
||||
{
|
||||
$now = Chronos::now();
|
||||
|
||||
yield 'future validSince' => [['validSince' => $now->addMonth()->toAtomString()]];
|
||||
yield 'past validUntil' => [['validUntil' => $now->subMonth()->toAtomString()]];
|
||||
yield 'future validSince' => [['validSince' => $now->addMonths(1)->toAtomString()]];
|
||||
yield 'past validUntil' => [['validUntil' => $now->subMonths(1)->toAtomString()]];
|
||||
yield 'maxVisits reached' => [['maxVisits' => 1]];
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class ApiKeyFixture extends AbstractFixture implements DependentFixtureInterface
|
||||
$manager->persist($this->buildApiKey(
|
||||
'expired_api_key',
|
||||
enabled: true,
|
||||
expiresAt: Chronos::now()->subDay()->startOfDay(),
|
||||
expiresAt: Chronos::now()->subDays(1)->startOfDay(),
|
||||
));
|
||||
|
||||
$authorApiKey = $this->buildApiKey('author_api_key', enabled: true);
|
||||
|
@ -81,7 +81,7 @@ class ApiKeyServiceTest extends TestCase
|
||||
{
|
||||
yield 'non-existent api key' => [null];
|
||||
yield 'disabled api key' => [ApiKey::create()->disable()];
|
||||
yield 'expired api key' => [ApiKey::fromMeta(ApiKeyMeta::withExpirationDate(Chronos::now()->subDay()))];
|
||||
yield 'expired api key' => [ApiKey::fromMeta(ApiKeyMeta::withExpirationDate(Chronos::now()->subDays(1)))];
|
||||
}
|
||||
|
||||
#[Test]
|
||||
|
Loading…
Reference in New Issue
Block a user