Skip to content

Commit

Permalink
Drop support for PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Dec 2, 2024
1 parent bfaab6c commit e29c020
Show file tree
Hide file tree
Showing 109 changed files with 229 additions and 221 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-db-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.2', '8.3', '8.4']
php-version: ['8.3', '8.4']
env:
LC_ALL: C
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.2', '8.3', '8.4']
php-version: ['8.3', '8.4']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # rr get-binary picks this env automatically
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.2', '8.3', '8.4']
php-version: ['8.3', '8.4']
steps:
- uses: actions/checkout@v4
- uses: './.github/actions/ci-setup'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-swagger-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.2']
php-version: ['8.3']
steps:
- uses: actions/checkout@v4
- name: Determine version
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
* *Nothing*

### Removed
* *Nothing*
* * [#2247](https://github.com/shlinkio/shlink/issues/2247) Drop support for PHP 8.2

### Fixed
* *Nothing*
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The idea is that you can just generate a container using the image and provide t

First, make sure the host where you are going to run shlink fulfills these requirements:

* PHP 8.2 or 8.3
* PHP 8.3 or 8.4
* The next PHP extensions: json, curl, pdo, intl, gd and gmp/bcmath.
* apcu extension is recommended if you don't plan to use RoadRunner.
* xml extension is required if you want to generate QR codes in svg format.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {
"php": "^8.2",
"php": "^8.3",
"ext-curl": "*",
"ext-gd": "*",
"ext-json": "*",
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Api/DisableKeyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class DisableKeyCommand extends Command
{
public const NAME = 'api-key:disable';
public const string NAME = 'api-key:disable';

public function __construct(private readonly ApiKeyServiceInterface $apiKeyService)
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Api/GenerateKeyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class GenerateKeyCommand extends Command
{
public const NAME = 'api-key:generate';
public const string NAME = 'api-key:generate';

public function __construct(
private readonly ApiKeyServiceInterface $apiKeyService,
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Api/InitialApiKeyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class InitialApiKeyCommand extends Command
{
public const NAME = 'api-key:initial';
public const string NAME = 'api-key:initial';

public function __construct(private readonly ApiKeyServiceInterface $apiKeyService)
{
Expand Down
8 changes: 4 additions & 4 deletions module/CLI/src/Command/Api/ListKeysCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

class ListKeysCommand extends Command
{
private const ERROR_STRING_PATTERN = '<fg=red>%s</>';
private const SUCCESS_STRING_PATTERN = '<info>%s</info>';
private const WARNING_STRING_PATTERN = '<comment>%s</comment>';
private const string ERROR_STRING_PATTERN = '<fg=red>%s</>';
private const string SUCCESS_STRING_PATTERN = '<info>%s</info>';
private const string WARNING_STRING_PATTERN = '<comment>%s</comment>';

public const NAME = 'api-key:list';
public const string NAME = 'api-key:list';

public function __construct(private readonly ApiKeyServiceInterface $apiKeyService)
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Api/RenameApiKeyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class RenameApiKeyCommand extends Command
{
public const NAME = 'api-key:rename';
public const string NAME = 'api-key:rename';

public function __construct(private readonly ApiKeyServiceInterface $apiKeyService)
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Config/ReadEnvVarCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class ReadEnvVarCommand extends Command
{
public const NAME = 'env-var:read';
public const string NAME = 'env-var:read';

/** @var Closure(string $envVar): mixed */
private readonly Closure $loadEnvVar;
Expand Down
6 changes: 3 additions & 3 deletions module/CLI/src/Command/Db/CreateDatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class CreateDatabaseCommand extends AbstractDatabaseCommand
{
private readonly Connection $regularConn;

public const NAME = 'db:create';
public const DOCTRINE_SCRIPT = 'bin/doctrine';
public const DOCTRINE_CREATE_SCHEMA_COMMAND = 'orm:schema-tool:create';
public const string NAME = 'db:create';
public const string DOCTRINE_SCRIPT = 'bin/doctrine';
public const string DOCTRINE_CREATE_SCHEMA_COMMAND = 'orm:schema-tool:create';

public function __construct(
LockFactory $locker,
Expand Down
6 changes: 3 additions & 3 deletions module/CLI/src/Command/Db/MigrateDatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

class MigrateDatabaseCommand extends AbstractDatabaseCommand
{
public const NAME = 'db:migrate';
public const DOCTRINE_MIGRATIONS_SCRIPT = 'vendor/doctrine/migrations/bin/doctrine-migrations.php';
public const DOCTRINE_MIGRATE_COMMAND = 'migrations:migrate';
public const string NAME = 'db:migrate';
public const string DOCTRINE_MIGRATIONS_SCRIPT = 'vendor/doctrine/migrations/bin/doctrine-migrations.php';
public const string DOCTRINE_MIGRATE_COMMAND = 'migrations:migrate';

protected function configure(): void
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Domain/DomainRedirectsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class DomainRedirectsCommand extends Command
{
public const NAME = 'domain:redirects';
public const string NAME = 'domain:redirects';

public function __construct(private readonly DomainServiceInterface $domainService)
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Domain/GetDomainVisitsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class GetDomainVisitsCommand extends AbstractVisitsListCommand
{
public const NAME = 'domain:visits';
public const string NAME = 'domain:visits';

public function __construct(
VisitsStatsHelperInterface $visitsHelper,
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Domain/ListDomainsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class ListDomainsCommand extends Command
{
public const NAME = 'domain:list';
public const string NAME = 'domain:list';

public function __construct(private readonly DomainServiceInterface $domainService)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

class MatomoSendVisitsCommand extends Command implements VisitSendingProgressTrackerInterface
{
public const NAME = 'integration:matomo:send-visits';
public const string NAME = 'integration:matomo:send-visits';

private readonly bool $matomoEnabled;
private SymfonyStyle $io;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class ManageRedirectRulesCommand extends Command
{
public const NAME = 'short-url:manage-rules';
public const string NAME = 'short-url:manage-rules';

private readonly ShortUrlIdentifierInput $shortUrlIdentifierInput;

Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/ShortUrl/CreateShortUrlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class CreateShortUrlCommand extends Command
{
public const NAME = 'short-url:create';
public const string NAME = 'short-url:create';

private SymfonyStyle $io;
private readonly ShortUrlDataInput $shortUrlDataInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class DeleteExpiredShortUrlsCommand extends Command
{
public const NAME = 'short-url:delete-expired';
public const string NAME = 'short-url:delete-expired';

public function __construct(private readonly DeleteShortUrlServiceInterface $deleteShortUrlService)
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/ShortUrl/DeleteShortUrlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class DeleteShortUrlCommand extends Command
{
public const NAME = 'short-url:delete';
public const string NAME = 'short-url:delete';

private readonly ShortUrlIdentifierInput $shortUrlIdentifierInput;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class DeleteShortUrlVisitsCommand extends AbstractDeleteVisitsCommand
{
public const NAME = 'short-url:visits-delete';
public const string NAME = 'short-url:visits-delete';

private readonly ShortUrlIdentifierInput $shortUrlIdentifierInput;

Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/ShortUrl/EditShortUrlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class EditShortUrlCommand extends Command
{
public const NAME = 'short-url:edit';
public const string NAME = 'short-url:edit';

private readonly ShortUrlDataInput $shortUrlDataInput;
private readonly ShortUrlIdentifierInput $shortUrlIdentifierInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class GetShortUrlVisitsCommand extends AbstractVisitsListCommand
{
public const NAME = 'short-url:visits';
public const string NAME = 'short-url:visits';

private ShortUrlIdentifierInput $shortUrlIdentifierInput;

Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

class ListShortUrlsCommand extends Command
{
public const NAME = 'short-url:list';
public const string NAME = 'short-url:list';

private readonly StartDateOption $startDateOption;
private readonly EndDateOption $endDateOption;
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/ShortUrl/ResolveUrlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class ResolveUrlCommand extends Command
{
public const NAME = 'short-url:parse';
public const string NAME = 'short-url:parse';

private readonly ShortUrlIdentifierInput $shortUrlIdentifierInput;

Expand Down
4 changes: 2 additions & 2 deletions module/CLI/src/Command/Tag/DeleteTagsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

class DeleteTagsCommand extends Command
{
public const NAME = 'tag:delete';
public const string NAME = 'tag:delete';

public function __construct(private TagServiceInterface $tagService)
public function __construct(private readonly TagServiceInterface $tagService)
{
parent::__construct();
}
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Tag/GetTagVisitsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class GetTagVisitsCommand extends AbstractVisitsListCommand
{
public const NAME = 'tag:visits';
public const string NAME = 'tag:visits';

public function __construct(
VisitsStatsHelperInterface $visitsHelper,
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Tag/ListTagsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class ListTagsCommand extends Command
{
public const NAME = 'tag:list';
public const string NAME = 'tag:list';

public function __construct(private readonly TagServiceInterface $tagService)
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Tag/RenameTagCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class RenameTagCommand extends Command
{
public const NAME = 'tag:rename';
public const string NAME = 'tag:rename';

public function __construct(private readonly TagServiceInterface $tagService)
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Util/LockedCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

final class LockedCommandConfig
{
public const DEFAULT_TTL = 600.0; // 10 minutes
public const float DEFAULT_TTL = 600.0; // 10 minutes

private function __construct(
public readonly string $lockName,
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Visit/DeleteOrphanVisitsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class DeleteOrphanVisitsCommand extends AbstractDeleteVisitsCommand
{
public const NAME = 'visit:orphan-delete';
public const string NAME = 'visit:orphan-delete';

public function __construct(private readonly VisitsDeleterInterface $deleter)
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Visit/DownloadGeoLiteDbCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class DownloadGeoLiteDbCommand extends Command
{
public const NAME = 'visit:download-db';
public const string NAME = 'visit:download-db';

private ProgressBar|null $progressBar = null;

Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Visit/GetNonOrphanVisitsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class GetNonOrphanVisitsCommand extends AbstractVisitsListCommand
{
public const NAME = 'visit:non-orphan';
public const string NAME = 'visit:non-orphan';

public function __construct(
VisitsStatsHelperInterface $visitsHelper,
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Visit/GetOrphanVisitsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class GetOrphanVisitsCommand extends AbstractVisitsListCommand
{
public const NAME = 'visit:orphan';
public const string NAME = 'visit:orphan';

protected function configure(): void
{
Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/Command/Visit/LocateVisitsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

class LocateVisitsCommand extends AbstractLockedCommand implements VisitGeolocationHelperInterface
{
public const NAME = 'visit:locate';
public const string NAME = 'visit:locate';

private SymfonyStyle $io;

Expand Down
2 changes: 1 addition & 1 deletion module/CLI/src/GeoLite/GeolocationDbUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class GeolocationDbUpdater implements GeolocationDbUpdaterInterface
{
private const LOCK_NAME = 'geolocation-db-update';
private const string LOCK_NAME = 'geolocation-db-update';

/** @var Closure(): Reader */
private readonly Closure $geoLiteDbReaderFactory;
Expand Down
6 changes: 3 additions & 3 deletions module/CLI/src/Util/ExitCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

final class ExitCode
{
public const EXIT_SUCCESS = 0;
public const EXIT_FAILURE = -1;
public const EXIT_WARNING = 1;
public const int EXIT_SUCCESS = 0;
public const int EXIT_FAILURE = -1;
public const int EXIT_WARNING = 1;
}
4 changes: 2 additions & 2 deletions module/CLI/src/Util/ShlinkTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

final class ShlinkTable
{
private const DEFAULT_STYLE_NAME = 'default';
private const TABLE_TITLE_STYLE = '<options=bold> %s </>';
private const string DEFAULT_STYLE_NAME = 'default';
private const string TABLE_TITLE_STYLE = '<options=bold> %s </>';

private function __construct(private readonly Table $baseTable, private readonly bool $withRowSeparators = false)
{
Expand Down
2 changes: 1 addition & 1 deletion module/Core/migrations/Version20230211171904.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

final class Version20230211171904 extends AbstractMigration
{
private const INDEX_NAME = 'IDX_visits_potential_bot';
private const string INDEX_NAME = 'IDX_visits_potential_bot';

public function up(Schema $schema): void
{
Expand Down
Loading

0 comments on commit e29c020

Please sign in to comment.