From b4718a93b21ab514e6022b07bef634619bee292b Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Wed, 29 May 2024 10:24:13 +0000 Subject: [PATCH] build(php): upgrade min php version to 8.3 --- .devcontainer/Dockerfile | 2 +- .gitlab-ci.yml | 2 +- app/Controllers/BaseController.php | 2 ++ app/Controllers/EpisodeAudioController.php | 2 ++ app/Controllers/PostController.php | 6 ++++++ app/Controllers/WebmanifestController.php | 2 +- .../Migrations/2021-05-29-152000_add_categories.php | 4 ++++ .../Migrations/2021-05-30-101000_add_languages.php | 4 ++++ .../Migrations/2021-05-30-101500_add_podcasts.php | 4 ++++ .../Migrations/2021-06-05-170000_add_episodes.php | 4 ++++ .../Migrations/2021-06-05-190000_add_platforms.php | 4 ++++ .../2021-06-05-200000_add_podcasts_platforms.php | 4 ++++ .../2021-08-12-150000_add_episode_comments.php | 4 ++++ .../Migrations/2021-08-12-160000_add_likes.php | 4 ++++ .../Migrations/2021-08-17-150000_add_pages.php | 4 ++++ .../2021-09-29-150000_add_podcasts_categories.php | 4 ++++ .../Migrations/2021-12-09-130000_add_clips.php | 4 ++++ .../Migrations/2021-12-25-120000_add_persons.php | 4 ++++ .../2021-12-25-130000_add_podcasts_persons.php | 4 ++++ .../2021-12-25-140000_add_episodes_persons.php | 4 ++++ .../Migrations/2021-12-25-150000_add_credits_view.php | 4 ++++ .../2022-02-23-100000_add_episode_id_to_posts.php | 4 ++++ .../2022-03-09-113000_add_created_by_to_posts.php | 4 ++++ ...2023-06-12-010000_add_full_text_search_indexes.php | 4 ++++ .../2023-08-22-120000_add_episode_preview_id.php | 4 ++++ ...023-12-29-150000_add_podcasts_owner_email_feed.php | 4 ++++ .../2024-02-05-160000_add_podcasts_medium.php | 4 ++++ .../2024-04-18-160000_add_podcasts_verify_txt.php | 4 ++++ .../2024-04-18-180000_refactor_platforms.php | 3 +++ .../2024-04-26-100000_clear_import_queue.php | 3 +++ app/Database/Migrations/BaseMigration.php | 3 +++ app/Database/Seeds/AppSeeder.php | 2 ++ app/Database/Seeds/CategorySeeder.php | 2 ++ app/Database/Seeds/DevSeeder.php | 2 ++ app/Database/Seeds/DevSuperadminSeeder.php | 2 ++ app/Database/Seeds/FakePodcastsAnalyticsSeeder.php | 2 ++ app/Database/Seeds/FakeWebsiteAnalyticsSeeder.php | 2 ++ app/Database/Seeds/LanguageSeeder.php | 2 ++ app/Entities/Actor.php | 3 +++ app/Entities/Clip/VideoClip.php | 2 ++ app/Entities/Location.php | 4 ++-- app/Filters/AllowCorsFilter.php | 3 +++ app/Libraries/Router.php | 2 ++ app/Libraries/SimpleRSSElement.php | 2 ++ app/Libraries/ViewComponents/Component.php | 3 +++ app/Libraries/ViewComponents/Decorator.php | 2 ++ app/Models/ActorModel.php | 2 ++ app/Views/Components/Alert.php | 2 ++ app/Views/Components/Button.php | 2 ++ app/Views/Components/Charts/ChartsComponent.php | 2 ++ app/Views/Components/DashboardCard.php | 2 ++ app/Views/Components/DropdownMenu.php | 2 ++ app/Views/Components/Forms/Checkbox.php | 2 ++ app/Views/Components/Forms/ColorRadioButton.php | 3 +++ app/Views/Components/Forms/DatetimePicker.php | 3 +++ app/Views/Components/Forms/Field.php | 2 ++ app/Views/Components/Forms/Helper.php | 2 ++ app/Views/Components/Forms/Input.php | 3 +++ app/Views/Components/Forms/Label.php | 2 ++ app/Views/Components/Forms/MarkdownEditor.php | 3 +++ app/Views/Components/Forms/Radio.php | 3 +++ app/Views/Components/Forms/RadioButton.php | 2 ++ app/Views/Components/Forms/RadioGroup.php | 2 ++ app/Views/Components/Forms/Section.php | 2 ++ app/Views/Components/Forms/Select.php | 3 +++ app/Views/Components/Forms/SelectMulti.php | 3 +++ app/Views/Components/Forms/Textarea.php | 3 +++ app/Views/Components/Forms/Toggler.php | 2 ++ app/Views/Components/Forms/XMLEditor.php | 3 +++ app/Views/Components/Heading.php | 2 ++ app/Views/Components/Hint.php | 2 ++ app/Views/Components/Pill.php | 2 ++ app/Views/Components/ReadMore.php | 2 ++ app/Views/Components/SeeMore.php | 2 ++ app/Views/Decorators/SiteHead.php | 2 ++ composer.json | 2 +- docker/ci/Dockerfile | 2 +- docker/production/app/Dockerfile | 2 +- docs/src/content/docs/ar/getting-started/install.mdx | 6 +++--- docs/src/content/docs/br/getting-started/install.mdx | 6 +++--- docs/src/content/docs/ca/getting-started/install.mdx | 6 +++--- docs/src/content/docs/da/getting-started/install.mdx | 6 +++--- docs/src/content/docs/de/getting-started/install.mdx | 6 +++--- docs/src/content/docs/el/getting-started/install.mdx | 6 +++--- docs/src/content/docs/en/getting-started/install.mdx | 6 +++--- docs/src/content/docs/es/getting-started/install.mdx | 6 +++--- docs/src/content/docs/eu/getting-started/install.mdx | 6 +++--- docs/src/content/docs/fa/getting-started/install.mdx | 6 +++--- docs/src/content/docs/fr/getting-started/install.mdx | 6 +++--- docs/src/content/docs/fr2/getting-started/install.mdx | 6 +++--- docs/src/content/docs/gd/getting-started/install.mdx | 6 +++--- docs/src/content/docs/gl/getting-started/install.mdx | 6 +++--- docs/src/content/docs/id/getting-started/install.mdx | 6 +++--- docs/src/content/docs/it/getting-started/install.mdx | 6 +++--- docs/src/content/docs/ja/getting-started/install.mdx | 6 +++--- docs/src/content/docs/kk/getting-started/install.mdx | 6 +++--- docs/src/content/docs/ko/getting-started/install.mdx | 6 +++--- docs/src/content/docs/nl/getting-started/install.mdx | 6 +++--- .../content/docs/nn-no/getting-started/install.mdx | 6 +++--- docs/src/content/docs/oc/getting-started/install.mdx | 6 +++--- docs/src/content/docs/pl/getting-started/install.mdx | 6 +++--- .../content/docs/pt-br/getting-started/install.mdx | 6 +++--- docs/src/content/docs/pt/getting-started/install.mdx | 6 +++--- docs/src/content/docs/ro/getting-started/install.mdx | 6 +++--- docs/src/content/docs/ru/getting-started/install.mdx | 6 +++--- docs/src/content/docs/sk/getting-started/install.mdx | 6 +++--- .../content/docs/sr-latn/getting-started/install.mdx | 6 +++--- docs/src/content/docs/sv/getting-started/install.mdx | 6 +++--- docs/src/content/docs/uk/getting-started/install.mdx | 6 +++--- .../content/docs/zh-hans/getting-started/install.mdx | 6 +++--- .../content/docs/zh-hant/getting-started/install.mdx | 6 +++--- modules/Admin/Controllers/BaseController.php | 2 ++ .../2017-12-01-000000_add_analytics_podcasts.php | 3 +++ ...12-01-010000_add_analytics_podcasts_by_episode.php | 3 +++ ...17-12-01-020000_add_analytics_podcasts_by_hour.php | 3 +++ ...-12-01-030000_add_analytics_podcasts_by_player.php | 3 +++ ...12-01-040000_add_analytics_podcasts_by_country.php | 3 +++ ...-12-01-050000_add_analytics_podcasts_by_region.php | 3 +++ ...-12-01-060000_add_analytics_website_by_browser.php | 3 +++ ...-12-01-070000_add_analytics_website_by_referer.php | 3 +++ ...-01-080000_add_analytics_website_by_entry_page.php | 3 +++ ...-12-01-090000_add_analytics_unknown_useragents.php | 3 +++ ...-100000_add_analytics_podcasts_by_subscription.php | 3 +++ ...-12-01-210000_add_analytics_podcasts_procedure.php | 3 +++ ...000_add_analytics_unknown_useragents_procedure.php | 3 +++ ...7-12-01-210000_add_analytics_website_procedure.php | 3 +++ modules/Api/Rest/V1/Core/RestApiExceptions.php | 2 ++ modules/Api/Rest/V1/Filters/ApiFilter.php | 3 +++ modules/Auth/Auth.php | 2 ++ modules/Auth/Commands/RolesDoc.php | 4 +++- modules/Auth/Config/Auth.php | 2 ++ modules/Auth/Controllers/ActionController.php | 2 ++ modules/Auth/Controllers/LoginController.php | 2 ++ modules/Auth/Controllers/MagicLinkController.php | 2 ++ modules/Auth/Controllers/RegisterController.php | 2 ++ .../2020-12-29-100000_add_is_owner_to_users.php | 4 ++++ modules/Auth/Filters/PermissionFilter.php | 3 +++ modules/Fediverse/Commands/Broadcast.php | 2 ++ .../Migrations/2018-01-01-010000_add_actors.php | 3 +++ .../Migrations/2018-01-01-020000_add_posts.php | 3 +++ .../Migrations/2018-01-01-100000_add_activities.php | 3 +++ .../Migrations/2018-01-01-100000_add_favourites.php | 3 +++ .../Migrations/2018-01-01-100000_add_follows.php | 3 +++ .../2018-01-01-100000_add_preview_cards.php | 3 +++ .../2018-01-01-110000_add_posts_preview_cards.php | 3 +++ .../2018-01-01-120000_add_blocked_domains.php | 3 +++ .../2018-01-01-130000_add_notifications.php | 4 ++++ modules/Fediverse/Filters/FediverseFilter.php | 3 +++ modules/Fediverse/HttpSignature.php | 2 +- modules/Fediverse/WebFinger.php | 2 +- modules/Install/Commands/CreateSuperadmin.php | 2 ++ modules/Install/Commands/InitDatabase.php | 2 ++ modules/Install/Controllers/InstallController.php | 2 ++ .../Migrations/2021-05-29-120000_add_media.php | 3 +++ .../2022-30-12-180000_rename_media_file_path.php | 3 +++ modules/Media/Entities/Audio.php | 3 +++ modules/Media/Entities/BaseMedia.php | 2 ++ modules/Media/Entities/Chapters.php | 3 +++ modules/Media/Entities/Image.php | 6 ++++++ modules/Media/Entities/Transcript.php | 5 +++++ modules/Media/FileManagers/FS.php | 11 +++++++++++ modules/Media/FileManagers/S3.php | 11 +++++++++++ modules/MediaClipper/Commands/Generate.php | 2 ++ modules/MediaClipper/VideoClipper.php | 2 +- modules/Plugins/Commands/InstallCommand.php | 2 ++ modules/Plugins/Commands/UninstallPlugin.php | 2 ++ modules/Plugins/Core/BasePlugin.php | 6 ++++++ modules/Plugins/Core/Markdown.php | 2 ++ modules/Plugins/Manifest/Person.php | 2 ++ modules/PodcastImport/Commands/PodcastImport.php | 2 ++ .../2022-07-07-120000_add_subscriptions.php | 3 +++ .../PremiumPodcasts/Filters/PodcastUnlockFilter.php | 3 +++ modules/Update/Commands/DatabaseUpdate.php | 2 ++ modules/WebSub/Commands/Publish.php | 2 ++ ...07-180000_add_is_published_on_hubs_to_podcasts.php | 3 +++ ...07-181500_add_is_published_on_hubs_to_episodes.php | 3 +++ public/index.php | 2 +- rector.php | 4 ++-- spark | 2 +- .../2020-02-22-222222_example_migration.php | 3 +++ tests/_support/Database/Seeds/ExampleSeeder.php | 2 ++ .../Database/Seeds/FakeSinglePodcastApiSeeder.php | 2 ++ 182 files changed, 517 insertions(+), 115 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ea6f4a4a..b4c12b9b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,7 +4,7 @@ # ⚠️ NOT optimized for production # should be used only for development purposes #--------------------------------------------------- -FROM php:8.2-fpm +FROM php:8.3-fpm LABEL maintainer="Yassine Doghri " diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee3acd7e..02221c59 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: code.castopod.org:5050/adaures/castopod:ci +image: code.castopod.org:5050/adaures/castopod:ci-8.3 stages: - prepare diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index 635f7fc8..c5875636 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -9,6 +9,7 @@ use CodeIgniter\HTTP\IncomingRequest; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\Response; use CodeIgniter\HTTP\ResponseInterface; +use Override; use Psr\Log\LoggerInterface; use ViewThemes\Theme; @@ -52,6 +53,7 @@ abstract class BaseController extends Controller /** * Constructor. */ + #[Override] public function initController( RequestInterface $request, ResponseInterface $response, diff --git a/app/Controllers/EpisodeAudioController.php b/app/Controllers/EpisodeAudioController.php index 613abb92..ae58363d 100644 --- a/app/Controllers/EpisodeAudioController.php +++ b/app/Controllers/EpisodeAudioController.php @@ -25,6 +25,7 @@ use Config\Services; use Modules\Analytics\Config\Analytics; use Modules\PremiumPodcasts\Entities\Subscription; use Modules\PremiumPodcasts\Models\SubscriptionModel; +use Override; use Psr\Log\LoggerInterface; class EpisodeAudioController extends Controller @@ -53,6 +54,7 @@ class EpisodeAudioController extends Controller /** * Constructor. */ + #[Override] public function initController( RequestInterface $request, ResponseInterface $response, diff --git a/app/Controllers/PostController.php b/app/Controllers/PostController.php index 6a8b24f2..42df121f 100644 --- a/app/Controllers/PostController.php +++ b/app/Controllers/PostController.php @@ -22,6 +22,7 @@ use CodeIgniter\HTTP\URI; use CodeIgniter\I18n\Time; use Modules\Analytics\AnalyticsTrait; use Modules\Fediverse\Controllers\PostController as FediversePostController; +use Override; class PostController extends FediversePostController { @@ -41,6 +42,7 @@ class PostController extends FediversePostController */ protected $helpers = ['auth', 'fediverse', 'svg', 'components', 'misc', 'seo', 'premium_podcasts']; + #[Override] public function _remap(string $method, string ...$params): mixed { if ( @@ -110,6 +112,7 @@ class PostController extends FediversePostController return $cachedView; } + #[Override] public function attemptCreate(): RedirectResponse { $rules = [ @@ -161,6 +164,7 @@ class PostController extends FediversePostController return redirect()->back(); } + #[Override] public function attemptReply(): RedirectResponse { $rules = [ @@ -200,6 +204,7 @@ class PostController extends FediversePostController return redirect()->back(); } + #[Override] public function attemptFavourite(): RedirectResponse { model('FavouriteModel')->toggleFavourite(interact_as_actor(), $this->post); @@ -207,6 +212,7 @@ class PostController extends FediversePostController return redirect()->back(); } + #[Override] public function attemptReblog(): RedirectResponse { (new PostModel())->toggleReblog(interact_as_actor(), $this->post); diff --git a/app/Controllers/WebmanifestController.php b/app/Controllers/WebmanifestController.php index 742709a3..2b252b54 100644 --- a/app/Controllers/WebmanifestController.php +++ b/app/Controllers/WebmanifestController.php @@ -21,7 +21,7 @@ class WebmanifestController extends Controller /** * @var array> */ - final public const THEME_COLORS = [ + final public const array THEME_COLORS = [ 'pine' => [ 'theme' => '#009486', 'background' => '#F0F9F8', diff --git a/app/Database/Migrations/2021-05-29-152000_add_categories.php b/app/Database/Migrations/2021-05-29-152000_add_categories.php index ba547987..e5a9cd82 100644 --- a/app/Database/Migrations/2021-05-29-152000_add_categories.php +++ b/app/Database/Migrations/2021-05-29-152000_add_categories.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddCategories extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -45,6 +48,7 @@ class AddCategories extends BaseMigration $this->forge->createTable('categories'); } + #[Override] public function down(): void { $this->forge->dropTable('categories'); diff --git a/app/Database/Migrations/2021-05-30-101000_add_languages.php b/app/Database/Migrations/2021-05-30-101000_add_languages.php index c5293f8f..c37cd19a 100644 --- a/app/Database/Migrations/2021-05-30-101000_add_languages.php +++ b/app/Database/Migrations/2021-05-30-101000_add_languages.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddLanguages extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -31,6 +34,7 @@ class AddLanguages extends BaseMigration $this->forge->createTable('languages'); } + #[Override] public function down(): void { $this->forge->dropTable('languages'); diff --git a/app/Database/Migrations/2021-05-30-101500_add_podcasts.php b/app/Database/Migrations/2021-05-30-101500_add_podcasts.php index fbf6916b..d1fe2761 100644 --- a/app/Database/Migrations/2021-05-30-101500_add_podcasts.php +++ b/app/Database/Migrations/2021-05-30-101500_add_podcasts.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPodcasts extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -205,6 +208,7 @@ class AddPodcasts extends BaseMigration $this->forge->createTable('podcasts'); } + #[Override] public function down(): void { $this->forge->dropTable('podcasts'); diff --git a/app/Database/Migrations/2021-06-05-170000_add_episodes.php b/app/Database/Migrations/2021-06-05-170000_add_episodes.php index 9aa57ba8..187310e6 100644 --- a/app/Database/Migrations/2021-06-05-170000_add_episodes.php +++ b/app/Database/Migrations/2021-06-05-170000_add_episodes.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddEpisodes extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -171,6 +174,7 @@ class AddEpisodes extends BaseMigration $this->db->query($createQuery); } + #[Override] public function down(): void { $this->forge->dropTable('episodes'); diff --git a/app/Database/Migrations/2021-06-05-190000_add_platforms.php b/app/Database/Migrations/2021-06-05-190000_add_platforms.php index eaba263b..10f248de 100644 --- a/app/Database/Migrations/2021-06-05-190000_add_platforms.php +++ b/app/Database/Migrations/2021-06-05-190000_add_platforms.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPlatforms extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -47,6 +50,7 @@ class AddPlatforms extends BaseMigration $this->forge->createTable('platforms'); } + #[Override] public function down(): void { $this->forge->dropTable('platforms'); diff --git a/app/Database/Migrations/2021-06-05-200000_add_podcasts_platforms.php b/app/Database/Migrations/2021-06-05-200000_add_podcasts_platforms.php index 5f30084e..b019b850 100644 --- a/app/Database/Migrations/2021-06-05-200000_add_podcasts_platforms.php +++ b/app/Database/Migrations/2021-06-05-200000_add_podcasts_platforms.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPodcastsPlatforms extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -52,6 +55,7 @@ class AddPodcastsPlatforms extends BaseMigration $this->forge->createTable('podcasts_platforms'); } + #[Override] public function down(): void { $this->forge->dropTable('podcasts_platforms'); diff --git a/app/Database/Migrations/2021-08-12-150000_add_episode_comments.php b/app/Database/Migrations/2021-08-12-150000_add_episode_comments.php index 54202baa..78eca47a 100644 --- a/app/Database/Migrations/2021-08-12-150000_add_episode_comments.php +++ b/app/Database/Migrations/2021-08-12-150000_add_episode_comments.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddEpisodeComments extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -71,6 +74,7 @@ class AddEpisodeComments extends BaseMigration $this->forge->createTable('episode_comments'); } + #[Override] public function down(): void { $this->forge->dropTable('episode_comments'); diff --git a/app/Database/Migrations/2021-08-12-160000_add_likes.php b/app/Database/Migrations/2021-08-12-160000_add_likes.php index 53917ac0..44aafbc0 100644 --- a/app/Database/Migrations/2021-08-12-160000_add_likes.php +++ b/app/Database/Migrations/2021-08-12-160000_add_likes.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddLikes extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -34,6 +37,7 @@ class AddLikes extends BaseMigration $this->forge->createTable('likes'); } + #[Override] public function down(): void { $this->forge->dropTable('likes'); diff --git a/app/Database/Migrations/2021-08-17-150000_add_pages.php b/app/Database/Migrations/2021-08-17-150000_add_pages.php index c5881287..51ec1584 100644 --- a/app/Database/Migrations/2021-08-17-150000_add_pages.php +++ b/app/Database/Migrations/2021-08-17-150000_add_pages.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPages extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -48,6 +51,7 @@ class AddPages extends BaseMigration $this->forge->createTable('pages'); } + #[Override] public function down(): void { $this->forge->dropTable('pages'); diff --git a/app/Database/Migrations/2021-09-29-150000_add_podcasts_categories.php b/app/Database/Migrations/2021-09-29-150000_add_podcasts_categories.php index c9754fd0..1633ecaf 100644 --- a/app/Database/Migrations/2021-09-29-150000_add_podcasts_categories.php +++ b/app/Database/Migrations/2021-09-29-150000_add_podcasts_categories.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPodcastsCategories extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -32,6 +35,7 @@ class AddPodcastsCategories extends BaseMigration $this->forge->createTable('podcasts_categories'); } + #[Override] public function down(): void { $this->forge->dropTable('podcasts_categories'); diff --git a/app/Database/Migrations/2021-12-09-130000_add_clips.php b/app/Database/Migrations/2021-12-09-130000_add_clips.php index eb47d1cc..2469b004 100644 --- a/app/Database/Migrations/2021-12-09-130000_add_clips.php +++ b/app/Database/Migrations/2021-12-09-130000_add_clips.php @@ -10,8 +10,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddClips extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -94,6 +97,7 @@ class AddClips extends BaseMigration $this->forge->createTable('clips'); } + #[Override] public function down(): void { $this->forge->dropTable('clips'); diff --git a/app/Database/Migrations/2021-12-25-120000_add_persons.php b/app/Database/Migrations/2021-12-25-120000_add_persons.php index fe72ee1c..2a5ba76b 100644 --- a/app/Database/Migrations/2021-12-25-120000_add_persons.php +++ b/app/Database/Migrations/2021-12-25-120000_add_persons.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPersons extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -67,6 +70,7 @@ class AddPersons extends BaseMigration $this->forge->createTable('persons'); } + #[Override] public function down(): void { $this->forge->dropTable('persons'); diff --git a/app/Database/Migrations/2021-12-25-130000_add_podcasts_persons.php b/app/Database/Migrations/2021-12-25-130000_add_podcasts_persons.php index 72740a28..35bf7d18 100644 --- a/app/Database/Migrations/2021-12-25-130000_add_podcasts_persons.php +++ b/app/Database/Migrations/2021-12-25-130000_add_podcasts_persons.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPodcastsPersons extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -46,6 +49,7 @@ class AddPodcastsPersons extends BaseMigration $this->forge->createTable('podcasts_persons'); } + #[Override] public function down(): void { $this->forge->dropTable('podcasts_persons'); diff --git a/app/Database/Migrations/2021-12-25-140000_add_episodes_persons.php b/app/Database/Migrations/2021-12-25-140000_add_episodes_persons.php index 6debdb38..f5a2a156 100644 --- a/app/Database/Migrations/2021-12-25-140000_add_episodes_persons.php +++ b/app/Database/Migrations/2021-12-25-140000_add_episodes_persons.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddEpisodesPersons extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -51,6 +54,7 @@ class AddEpisodesPersons extends BaseMigration $this->forge->createTable('episodes_persons'); } + #[Override] public function down(): void { $this->forge->dropTable('episodes_persons'); diff --git a/app/Database/Migrations/2021-12-25-150000_add_credits_view.php b/app/Database/Migrations/2021-12-25-150000_add_credits_view.php index 9955e3ca..85df46ce 100644 --- a/app/Database/Migrations/2021-12-25-150000_add_credits_view.php +++ b/app/Database/Migrations/2021-12-25-150000_add_credits_view.php @@ -10,8 +10,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddCreditsView extends BaseMigration { + #[Override] public function up(): void { // Creates View for credit UNION query @@ -37,6 +40,7 @@ class AddCreditsView extends BaseMigration $this->db->query($createQuery); } + #[Override] public function down(): void { $viewName = $this->db->prefixTable('credits'); diff --git a/app/Database/Migrations/2022-02-23-100000_add_episode_id_to_posts.php b/app/Database/Migrations/2022-02-23-100000_add_episode_id_to_posts.php index ecceb7e1..d7bfc23e 100644 --- a/app/Database/Migrations/2022-02-23-100000_add_episode_id_to_posts.php +++ b/app/Database/Migrations/2022-02-23-100000_add_episode_id_to_posts.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddEpisodeIdToPosts extends BaseMigration { + #[Override] public function up(): void { $prefix = $this->db->getPrefix(); @@ -38,6 +41,7 @@ class AddEpisodeIdToPosts extends BaseMigration $this->forge->processIndexes('fediverse_posts'); } + #[Override] public function down(): void { $prefix = $this->db->getPrefix(); diff --git a/app/Database/Migrations/2022-03-09-113000_add_created_by_to_posts.php b/app/Database/Migrations/2022-03-09-113000_add_created_by_to_posts.php index 93ff2022..7ead61bd 100644 --- a/app/Database/Migrations/2022-03-09-113000_add_created_by_to_posts.php +++ b/app/Database/Migrations/2022-03-09-113000_add_created_by_to_posts.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddCreatedByToPosts extends BaseMigration { + #[Override] public function up(): void { $prefix = $this->db->getPrefix(); @@ -38,6 +41,7 @@ class AddCreatedByToPosts extends BaseMigration $this->forge->processIndexes('fediverse_posts'); } + #[Override] public function down(): void { $prefix = $this->db->getPrefix(); diff --git a/app/Database/Migrations/2023-06-12-010000_add_full_text_search_indexes.php b/app/Database/Migrations/2023-06-12-010000_add_full_text_search_indexes.php index 8b4c3d24..4620ebf1 100644 --- a/app/Database/Migrations/2023-06-12-010000_add_full_text_search_indexes.php +++ b/app/Database/Migrations/2023-06-12-010000_add_full_text_search_indexes.php @@ -4,8 +4,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddFullTextSearchIndexes extends BaseMigration { + #[Override] public function up(): void { $prefix = $this->db->getPrefix(); @@ -31,6 +34,7 @@ class AddFullTextSearchIndexes extends BaseMigration $this->db->query($createQuery); } + #[Override] public function down(): void { $prefix = $this->db->getPrefix(); diff --git a/app/Database/Migrations/2023-08-22-120000_add_episode_preview_id.php b/app/Database/Migrations/2023-08-22-120000_add_episode_preview_id.php index 2bd026e2..b66e6cf1 100644 --- a/app/Database/Migrations/2023-08-22-120000_add_episode_preview_id.php +++ b/app/Database/Migrations/2023-08-22-120000_add_episode_preview_id.php @@ -4,8 +4,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddEpisodePreviewId extends BaseMigration { + #[Override] public function up(): void { $fields = [ @@ -28,6 +31,7 @@ class AddEpisodePreviewId extends BaseMigration $this->db->query($uniquePreviewId); } + #[Override] public function down(): void { $fields = ['preview_id']; diff --git a/app/Database/Migrations/2023-12-29-150000_add_podcasts_owner_email_feed.php b/app/Database/Migrations/2023-12-29-150000_add_podcasts_owner_email_feed.php index 88765f1e..4c7908ac 100644 --- a/app/Database/Migrations/2023-12-29-150000_add_podcasts_owner_email_feed.php +++ b/app/Database/Migrations/2023-12-29-150000_add_podcasts_owner_email_feed.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPodcastsOwnerEmailRemovedFromFeed extends BaseMigration { + #[Override] public function up(): void { $fields = [ @@ -28,6 +31,7 @@ class AddPodcastsOwnerEmailRemovedFromFeed extends BaseMigration $this->forge->addColumn('podcasts', $fields); } + #[Override] public function down(): void { $fields = ['is_owner_email_removed_from_feed']; diff --git a/app/Database/Migrations/2024-02-05-160000_add_podcasts_medium.php b/app/Database/Migrations/2024-02-05-160000_add_podcasts_medium.php index 1ea78d38..b3fd5f9d 100644 --- a/app/Database/Migrations/2024-02-05-160000_add_podcasts_medium.php +++ b/app/Database/Migrations/2024-02-05-160000_add_podcasts_medium.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPodcastsMediumField extends BaseMigration { + #[Override] public function up(): void { $fields = [ @@ -28,6 +31,7 @@ class AddPodcastsMediumField extends BaseMigration $this->forge->addColumn('podcasts', $fields); } + #[Override] public function down(): void { $fields = ['medium']; diff --git a/app/Database/Migrations/2024-04-18-160000_add_podcasts_verify_txt.php b/app/Database/Migrations/2024-04-18-160000_add_podcasts_verify_txt.php index 339d3ae7..23f17ded 100644 --- a/app/Database/Migrations/2024-04-18-160000_add_podcasts_verify_txt.php +++ b/app/Database/Migrations/2024-04-18-160000_add_podcasts_verify_txt.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddPodcastsVerifyTxtField extends BaseMigration { + #[Override] public function up(): void { $fields = [ @@ -27,6 +30,7 @@ class AddPodcastsVerifyTxtField extends BaseMigration $this->forge->addColumn('podcasts', $fields); } + #[Override] public function down(): void { $this->forge->dropColumn('podcasts', 'verify_txt'); diff --git a/app/Database/Migrations/2024-04-18-180000_refactor_platforms.php b/app/Database/Migrations/2024-04-18-180000_refactor_platforms.php index 8860a5fe..c5da952c 100644 --- a/app/Database/Migrations/2024-04-18-180000_refactor_platforms.php +++ b/app/Database/Migrations/2024-04-18-180000_refactor_platforms.php @@ -5,9 +5,11 @@ declare(strict_types=1); namespace App\Database\Migrations; use CodeIgniter\Database\Migration; +use Override; class RefactorPlatforms extends Migration { + #[Override] public function up(): void { $this->forge->addField([ @@ -80,6 +82,7 @@ class RefactorPlatforms extends Migration $this->forge->renameTable('platforms_temp', 'platforms'); } + #[Override] public function down(): void { // delete platforms diff --git a/app/Database/Migrations/2024-04-26-100000_clear_import_queue.php b/app/Database/Migrations/2024-04-26-100000_clear_import_queue.php index 6664c9e0..db7c556f 100644 --- a/app/Database/Migrations/2024-04-26-100000_clear_import_queue.php +++ b/app/Database/Migrations/2024-04-26-100000_clear_import_queue.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace App\Database\Migrations; use CodeIgniter\Database\Migration; +use Override; /** * CodeIgniter 4.5.1 introduces new DataCaster class that breaks deserialization of import queue tasks. @@ -12,11 +13,13 @@ use CodeIgniter\Database\Migration; */ class ClearImportQueue extends Migration { + #[Override] public function up(): void { service('settings')->forget('Import.queue'); } + #[Override] public function down(): void { // nothing diff --git a/app/Database/Migrations/BaseMigration.php b/app/Database/Migrations/BaseMigration.php index e3861389..c6a46f9b 100644 --- a/app/Database/Migrations/BaseMigration.php +++ b/app/Database/Migrations/BaseMigration.php @@ -14,6 +14,7 @@ namespace App\Database\Migrations; use CodeIgniter\Database\BaseConnection; use CodeIgniter\Database\Migration; +use Override; class BaseMigration extends Migration { @@ -24,10 +25,12 @@ class BaseMigration extends Migration */ protected $db; + #[Override] public function up(): void { } + #[Override] public function down(): void { } diff --git a/app/Database/Seeds/AppSeeder.php b/app/Database/Seeds/AppSeeder.php index 30ee0f7d..82fd99a3 100644 --- a/app/Database/Seeds/AppSeeder.php +++ b/app/Database/Seeds/AppSeeder.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace App\Database\Seeds; use CodeIgniter\Database\Seeder; +use Override; class AppSeeder extends Seeder { + #[Override] public function run(): void { $this->call('CategorySeeder'); diff --git a/app/Database/Seeds/CategorySeeder.php b/app/Database/Seeds/CategorySeeder.php index 76b8c673..f2af134c 100644 --- a/app/Database/Seeds/CategorySeeder.php +++ b/app/Database/Seeds/CategorySeeder.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace App\Database\Seeds; use CodeIgniter\Database\Seeder; +use Override; class CategorySeeder extends Seeder { + #[Override] public function run(): void { $data = [ diff --git a/app/Database/Seeds/DevSeeder.php b/app/Database/Seeds/DevSeeder.php index 810f6c04..32602718 100644 --- a/app/Database/Seeds/DevSeeder.php +++ b/app/Database/Seeds/DevSeeder.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace App\Database\Seeds; use CodeIgniter\Database\Seeder; +use Override; class DevSeeder extends Seeder { + #[Override] public function run(): void { $this->call('CategorySeeder'); diff --git a/app/Database/Seeds/DevSuperadminSeeder.php b/app/Database/Seeds/DevSuperadminSeeder.php index c852d9d1..c76b9821 100644 --- a/app/Database/Seeds/DevSuperadminSeeder.php +++ b/app/Database/Seeds/DevSuperadminSeeder.php @@ -15,9 +15,11 @@ namespace App\Database\Seeds; use CodeIgniter\Database\Seeder; use CodeIgniter\Shield\Entities\User; use Modules\Auth\Models\UserModel; +use Override; class DevSuperadminSeeder extends Seeder { + #[Override] public function run(): void { if ((new UserModel())->where('is_owner', true)->first() instanceof User) { diff --git a/app/Database/Seeds/FakePodcastsAnalyticsSeeder.php b/app/Database/Seeds/FakePodcastsAnalyticsSeeder.php index ec376146..58bdfe3e 100644 --- a/app/Database/Seeds/FakePodcastsAnalyticsSeeder.php +++ b/app/Database/Seeds/FakePodcastsAnalyticsSeeder.php @@ -20,9 +20,11 @@ use CodeIgniter\Database\Seeder; use Exception; use GeoIp2\Database\Reader; use GeoIp2\Exception\AddressNotFoundException; +use Override; class FakePodcastsAnalyticsSeeder extends Seeder { + #[Override] public function run(): void { $jsonUserAgents = json_decode( diff --git a/app/Database/Seeds/FakeWebsiteAnalyticsSeeder.php b/app/Database/Seeds/FakeWebsiteAnalyticsSeeder.php index 9c855d02..4dc69ef5 100644 --- a/app/Database/Seeds/FakeWebsiteAnalyticsSeeder.php +++ b/app/Database/Seeds/FakeWebsiteAnalyticsSeeder.php @@ -18,6 +18,7 @@ use App\Models\EpisodeModel; use App\Models\PodcastModel; use CodeIgniter\Database\Seeder; use Exception; +use Override; class FakeWebsiteAnalyticsSeeder extends Seeder { @@ -181,6 +182,7 @@ class FakeWebsiteAnalyticsSeeder extends Seeder 'WOSBrowser', ]; + #[Override] public function run(): void { $podcast = (new PodcastModel())->first(); diff --git a/app/Database/Seeds/LanguageSeeder.php b/app/Database/Seeds/LanguageSeeder.php index cdf024b5..1c361c1a 100644 --- a/app/Database/Seeds/LanguageSeeder.php +++ b/app/Database/Seeds/LanguageSeeder.php @@ -18,9 +18,11 @@ declare(strict_types=1); namespace App\Database\Seeds; use CodeIgniter\Database\Seeder; +use Override; class LanguageSeeder extends Seeder { + #[Override] public function run(): void { $data = [ diff --git a/app/Entities/Actor.php b/app/Entities/Actor.php index 020fd14e..5461814f 100644 --- a/app/Entities/Actor.php +++ b/app/Entities/Actor.php @@ -12,6 +12,7 @@ namespace App\Entities; use App\Models\PodcastModel; use Modules\Fediverse\Entities\Actor as FediverseActor; +use Override; use RuntimeException; /** @@ -42,6 +43,7 @@ class Actor extends FediverseActor return $this->podcast; } + #[Override] public function getAvatarImageUrl(): string { if ($this->podcast instanceof Podcast) { @@ -51,6 +53,7 @@ class Actor extends FediverseActor return parent::getAvatarImageUrl(); } + #[Override] public function getAvatarImageMimetype(): string { if ($this->podcast instanceof Podcast) { diff --git a/app/Entities/Clip/VideoClip.php b/app/Entities/Clip/VideoClip.php index e1eef2e4..889140aa 100644 --- a/app/Entities/Clip/VideoClip.php +++ b/app/Entities/Clip/VideoClip.php @@ -13,6 +13,7 @@ namespace App\Entities\Clip; use CodeIgniter\Files\File; use Modules\Media\Entities\Video; use Modules\Media\Models\MediaModel; +use Override; /** * @property array $theme @@ -63,6 +64,7 @@ class VideoClip extends BaseClip return $this; } + #[Override] public function setMedia(File $file, string $fileKey): static { if ($this->attributes['media_id'] !== null) { diff --git a/app/Entities/Location.php b/app/Entities/Location.php index 90b326d6..ca63a753 100644 --- a/app/Entities/Location.php +++ b/app/Entities/Location.php @@ -26,12 +26,12 @@ class Location extends Entity /** * @var string */ - private const OSM_URL = 'https://www.openstreetmap.org/'; + private const string OSM_URL = 'https://www.openstreetmap.org/'; /** * @var string */ - private const NOMINATIM_URL = 'https://nominatim.openstreetmap.org/'; + private const string NOMINATIM_URL = 'https://nominatim.openstreetmap.org/'; public function __construct( protected string $name, diff --git a/app/Filters/AllowCorsFilter.php b/app/Filters/AllowCorsFilter.php index 96d6409b..472be782 100644 --- a/app/Filters/AllowCorsFilter.php +++ b/app/Filters/AllowCorsFilter.php @@ -7,12 +7,14 @@ namespace App\Filters; use CodeIgniter\Filters\FilterInterface; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; +use Override; class AllowCorsFilter implements FilterInterface { /** * @param string[]|null $arguments */ + #[Override] public function before(RequestInterface $request, $arguments = null): void { // Do something here @@ -21,6 +23,7 @@ class AllowCorsFilter implements FilterInterface /** * @param string[]|null $arguments */ + #[Override] public function after(RequestInterface $request, ResponseInterface $response, $arguments = null): void { if (! $response->hasHeader('Cache-Control')) { diff --git a/app/Libraries/Router.php b/app/Libraries/Router.php index 1f3abc55..4d5b4ff8 100644 --- a/app/Libraries/Router.php +++ b/app/Libraries/Router.php @@ -19,6 +19,7 @@ use CodeIgniter\Router\Exceptions\RedirectException; use CodeIgniter\Router\Exceptions\RouterException; use CodeIgniter\Router\Router as CodeIgniterRouter; use Config\Services; +use Override; class Router extends CodeIgniterRouter { @@ -30,6 +31,7 @@ class Router extends CodeIgniterRouter * * @return boolean Whether the route was matched or not. */ + #[Override] protected function checkRoutes(string $uri): bool { $routes = $this->collection->getRoutes($this->collection->getHTTPVerb()); diff --git a/app/Libraries/SimpleRSSElement.php b/app/Libraries/SimpleRSSElement.php index 1dd2e431..a6bcbe2d 100644 --- a/app/Libraries/SimpleRSSElement.php +++ b/app/Libraries/SimpleRSSElement.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace App\Libraries; use DOMDocument; +use Override; use SimpleXMLElement; class SimpleRSSElement extends SimpleXMLElement @@ -47,6 +48,7 @@ class SimpleRSSElement extends SimpleXMLElement * * @return static The addChild method returns a SimpleXMLElement object representing the child added to the XML node. */ + #[Override] public function addChild($name, $value = null, $namespace = null, $escape = true): static { $newChild = parent::addChild($name, null, $namespace); diff --git a/app/Libraries/ViewComponents/Component.php b/app/Libraries/ViewComponents/Component.php index 6d45923c..8cddcf38 100644 --- a/app/Libraries/ViewComponents/Component.php +++ b/app/Libraries/ViewComponents/Component.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace ViewComponents; +use Override; + abstract class Component implements ComponentInterface { /** @@ -81,6 +83,7 @@ abstract class Component implements ComponentInterface return stringify_attributes($this->attributes); } + #[Override] public function render(): string { return static::class . ': RENDER METHOD NOT IMPLEMENTED'; diff --git a/app/Libraries/ViewComponents/Decorator.php b/app/Libraries/ViewComponents/Decorator.php index 4701052f..d8e7bfb6 100644 --- a/app/Libraries/ViewComponents/Decorator.php +++ b/app/Libraries/ViewComponents/Decorator.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace ViewComponents; use CodeIgniter\View\ViewDecoratorInterface; +use Override; /** * Enables rendering of View Components into the views. @@ -15,6 +16,7 @@ class Decorator implements ViewDecoratorInterface { private static ?ComponentRenderer $components = null; + #[Override] public static function decorate(string $html): string { $components = self::factory(); diff --git a/app/Models/ActorModel.php b/app/Models/ActorModel.php index b34993d9..c50b1b53 100644 --- a/app/Models/ActorModel.php +++ b/app/Models/ActorModel.php @@ -12,6 +12,7 @@ namespace App\Models; use App\Entities\Actor; use Modules\Fediverse\Models\ActorModel as FediverseActorModel; +use Override; class ActorModel extends FediverseActorModel { @@ -20,6 +21,7 @@ class ActorModel extends FediverseActorModel */ protected $returnType = Actor::class; + #[Override] public function getActorById(int $id): ?Actor { return $this->find($id); diff --git a/app/Views/Components/Alert.php b/app/Views/Components/Alert.php index b4043637..840a17a1 100644 --- a/app/Views/Components/Alert.php +++ b/app/Views/Components/Alert.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components; +use Override; use ViewComponents\Component; class Alert extends Component @@ -23,6 +24,7 @@ class Alert extends Component */ protected string $variant = 'default'; + #[Override] public function render(): string { $variantData = match ($this->variant) { diff --git a/app/Views/Components/Button.php b/app/Views/Components/Button.php index 68de5081..90d2ca63 100644 --- a/app/Views/Components/Button.php +++ b/app/Views/Components/Button.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components; +use Override; use ViewComponents\Component; class Button extends Component @@ -32,6 +33,7 @@ class Button extends Component protected bool $isExternal = false; + #[Override] public function render(): string { $this->mergeClass('shadow gap-x-2 flex-shrink-0 inline-flex items-center justify-center font-semibold rounded-full'); diff --git a/app/Views/Components/Charts/ChartsComponent.php b/app/Views/Components/Charts/ChartsComponent.php index c912734c..ec16c29a 100644 --- a/app/Views/Components/Charts/ChartsComponent.php +++ b/app/Views/Components/Charts/ChartsComponent.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components\Charts; +use Override; use ViewComponents\Component; class ChartsComponent extends Component @@ -16,6 +17,7 @@ class ChartsComponent extends Component protected string $type; + #[Override] public function render(): string { $subtitleBlock = ''; diff --git a/app/Views/Components/DashboardCard.php b/app/Views/Components/DashboardCard.php index e951f251..e4dbada3 100644 --- a/app/Views/Components/DashboardCard.php +++ b/app/Views/Components/DashboardCard.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components; +use Override; use ViewComponents\Component; class DashboardCard extends Component @@ -23,6 +24,7 @@ class DashboardCard extends Component $this->subtitle = html_entity_decode($value); } + #[Override] public function render(): string { $glyph = icon($this->glyph, [ diff --git a/app/Views/Components/DropdownMenu.php b/app/Views/Components/DropdownMenu.php index bed6e299..992ef22e 100644 --- a/app/Views/Components/DropdownMenu.php +++ b/app/Views/Components/DropdownMenu.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace App\Views\Components; use Exception; +use Override; use ViewComponents\Component; class DropdownMenu extends Component @@ -34,6 +35,7 @@ class DropdownMenu extends Component $this->items = json_decode(htmlspecialchars_decode($value), true); } + #[Override] public function render(): string { if ($this->items === []) { diff --git a/app/Views/Components/Forms/Checkbox.php b/app/Views/Components/Forms/Checkbox.php index 517ff38a..a90fde2f 100644 --- a/app/Views/Components/Forms/Checkbox.php +++ b/app/Views/Components/Forms/Checkbox.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace App\Views\Components\Forms; use App\Views\Components\Hint; +use Override; class Checkbox extends FormComponent { @@ -18,6 +19,7 @@ class Checkbox extends FormComponent protected bool $isChecked = false; + #[Override] public function render(): string { $checkboxInput = form_checkbox( diff --git a/app/Views/Components/Forms/ColorRadioButton.php b/app/Views/Components/Forms/ColorRadioButton.php index 9e2ebcd4..f1ff3fde 100644 --- a/app/Views/Components/Forms/ColorRadioButton.php +++ b/app/Views/Components/Forms/ColorRadioButton.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class ColorRadioButton extends FormComponent { protected array $props = ['isSelected']; @@ -14,6 +16,7 @@ class ColorRadioButton extends FormComponent protected bool $isSelected = false; + #[Override] public function render(): string { $data = [ diff --git a/app/Views/Components/Forms/DatetimePicker.php b/app/Views/Components/Forms/DatetimePicker.php index 57c5cd7d..1a339cc4 100644 --- a/app/Views/Components/Forms/DatetimePicker.php +++ b/app/Views/Components/Forms/DatetimePicker.php @@ -4,12 +4,15 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class DatetimePicker extends FormComponent { protected array $attributes = [ 'data-picker' => 'datetime', ]; + #[Override] public function render(): string { $dateInput = form_input([ diff --git a/app/Views/Components/Forms/Field.php b/app/Views/Components/Forms/Field.php index 3aaa64ee..bb370367 100644 --- a/app/Views/Components/Forms/Field.php +++ b/app/Views/Components/Forms/Field.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; use ViewComponents\Component; class Field extends Component @@ -37,6 +38,7 @@ class Field extends Component protected string $hint = ''; + #[Override] public function render(): string { $helperText = ''; diff --git a/app/Views/Components/Forms/Helper.php b/app/Views/Components/Forms/Helper.php index 331c14a9..06dc24a9 100644 --- a/app/Views/Components/Forms/Helper.php +++ b/app/Views/Components/Forms/Helper.php @@ -4,12 +4,14 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; use ViewComponents\Component; class Helper extends Component { // TODO: add type with error and show errors inline + #[Override] public function render(): string { $this->mergeClass('text-skin-muted'); diff --git a/app/Views/Components/Forms/Input.php b/app/Views/Components/Forms/Input.php index 6c4017c2..b34b07df 100644 --- a/app/Views/Components/Forms/Input.php +++ b/app/Views/Components/Forms/Input.php @@ -4,12 +4,15 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class Input extends FormComponent { protected array $props = ['type']; protected string $type = 'text'; + #[Override] public function render(): string { $this->mergeClass('w-full border-contrast rounded-lg focus:border-contrast border-3 focus-within:ring-accent'); diff --git a/app/Views/Components/Forms/Label.php b/app/Views/Components/Forms/Label.php index bdd97ae5..2aac8e8b 100644 --- a/app/Views/Components/Forms/Label.php +++ b/app/Views/Components/Forms/Label.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace App\Views\Components\Forms; use App\Views\Components\Hint; +use Override; use ViewComponents\Component; class Label extends Component @@ -21,6 +22,7 @@ class Label extends Component protected bool $isOptional = false; + #[Override] public function render(): string { $this->mergeClass('text-sm font-semibold'); diff --git a/app/Views/Components/Forms/MarkdownEditor.php b/app/Views/Components/Forms/MarkdownEditor.php index 8952b53f..f61a434b 100644 --- a/app/Views/Components/Forms/MarkdownEditor.php +++ b/app/Views/Components/Forms/MarkdownEditor.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class MarkdownEditor extends FormComponent { protected array $props = ['disallowList']; @@ -18,6 +20,7 @@ class MarkdownEditor extends FormComponent $this->disallowList = explode(',', $value); } + #[Override] public function render(): string { $this->mergeClass('w-full flex flex-col bg-elevated border-3 border-contrast rounded-lg overflow-hidden focus-within:ring-accent'); diff --git a/app/Views/Components/Forms/Radio.php b/app/Views/Components/Forms/Radio.php index fe0a6789..12f1e91d 100644 --- a/app/Views/Components/Forms/Radio.php +++ b/app/Views/Components/Forms/Radio.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class Radio extends FormComponent { protected array $props = ['isChecked']; @@ -14,6 +16,7 @@ class Radio extends FormComponent protected bool $isChecked = false; + #[Override] public function render(): string { $radioInput = form_radio( diff --git a/app/Views/Components/Forms/RadioButton.php b/app/Views/Components/Forms/RadioButton.php index 3da37392..e9b5992c 100644 --- a/app/Views/Components/Forms/RadioButton.php +++ b/app/Views/Components/Forms/RadioButton.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace App\Views\Components\Forms; use App\Views\Components\Hint; +use Override; class RadioButton extends FormComponent { @@ -18,6 +19,7 @@ class RadioButton extends FormComponent protected string $hint = ''; + #[Override] public function render(): string { $data = [ diff --git a/app/Views/Components/Forms/RadioGroup.php b/app/Views/Components/Forms/RadioGroup.php index 907002e3..99709910 100644 --- a/app/Views/Components/Forms/RadioGroup.php +++ b/app/Views/Components/Forms/RadioGroup.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace App\Views\Components\Forms; use App\Views\Components\Hint; +use Override; class RadioGroup extends FormComponent { @@ -25,6 +26,7 @@ class RadioGroup extends FormComponent protected string $hint = ''; + #[Override] public function render(): string { $this->mergeClass('flex flex-col'); diff --git a/app/Views/Components/Forms/Section.php b/app/Views/Components/Forms/Section.php index 4055985c..d50baaed 100644 --- a/app/Views/Components/Forms/Section.php +++ b/app/Views/Components/Forms/Section.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; use ViewComponents\Component; class Section extends Component @@ -14,6 +15,7 @@ class Section extends Component protected string $subtitle = ''; + #[Override] public function render(): string { $subtitle = $this->subtitle === '' ? '' : '

' . $this->subtitle . '

'; diff --git a/app/Views/Components/Forms/Select.php b/app/Views/Components/Forms/Select.php index a364a231..8e8d02a8 100644 --- a/app/Views/Components/Forms/Select.php +++ b/app/Views/Components/Forms/Select.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class Select extends FormComponent { protected array $props = ['options', 'defaultValue']; @@ -19,6 +21,7 @@ class Select extends FormComponent protected string $defaultValue = ''; + #[Override] public function render(): string { $this->mergeClass('w-full focus:border-contrast border-3 rounded-lg bg-elevated border-contrast'); diff --git a/app/Views/Components/Forms/SelectMulti.php b/app/Views/Components/Forms/SelectMulti.php index 4251724d..3023046b 100644 --- a/app/Views/Components/Forms/SelectMulti.php +++ b/app/Views/Components/Forms/SelectMulti.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class SelectMulti extends FormComponent { protected array $props = ['options', 'defaultValue']; @@ -24,6 +26,7 @@ class SelectMulti extends FormComponent */ protected array $defaultValue = []; + #[Override] public function render(): string { $this->mergeClass('w-full bg-elevated border-3 border-contrast rounded-lg relative'); diff --git a/app/Views/Components/Forms/Textarea.php b/app/Views/Components/Forms/Textarea.php index d3976565..85dd3f8e 100644 --- a/app/Views/Components/Forms/Textarea.php +++ b/app/Views/Components/Forms/Textarea.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class Textarea extends FormComponent { public function setValue(?string $value): void @@ -13,6 +15,7 @@ class Textarea extends FormComponent } } + #[Override] public function render(): string { $this->mergeClass('bg-elevated w-full rounded-lg border-3 border-contrast focus:border-contrast focus-within:ring-accent'); diff --git a/app/Views/Components/Forms/Toggler.php b/app/Views/Components/Forms/Toggler.php index 342891b7..84bbe5bf 100644 --- a/app/Views/Components/Forms/Toggler.php +++ b/app/Views/Components/Forms/Toggler.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace App\Views\Components\Forms; use App\Views\Components\Hint; +use Override; class Toggler extends FormComponent { @@ -18,6 +19,7 @@ class Toggler extends FormComponent protected bool $isChecked = false; + #[Override] public function render(): string { $this->mergeClass('relative justify-between inline-flex items-center gap-x-2'); diff --git a/app/Views/Components/Forms/XMLEditor.php b/app/Views/Components/Forms/XMLEditor.php index 1a6a0880..1d63efa5 100644 --- a/app/Views/Components/Forms/XMLEditor.php +++ b/app/Views/Components/Forms/XMLEditor.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Views\Components\Forms; +use Override; + class XMLEditor extends FormComponent { protected array $props = ['content']; @@ -23,6 +25,7 @@ class XMLEditor extends FormComponent $this->content = htmlspecialchars_decode($value); } + #[Override] public function render(): string { $this->attributes['slot'] = 'textarea'; diff --git a/app/Views/Components/Heading.php b/app/Views/Components/Heading.php index f5f8ed0c..87d2de6e 100644 --- a/app/Views/Components/Heading.php +++ b/app/Views/Components/Heading.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components; +use Override; use ViewComponents\Component; class Heading extends Component @@ -17,6 +18,7 @@ class Heading extends Component */ protected string $size = 'base'; + #[Override] public function render(): string { $sizeClass = match ($this->size) { diff --git a/app/Views/Components/Hint.php b/app/Views/Components/Hint.php index 51eb080a..c329296f 100644 --- a/app/Views/Components/Hint.php +++ b/app/Views/Components/Hint.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components; +use Override; use ViewComponents\Component; class Hint extends Component @@ -13,6 +14,7 @@ class Hint extends Component 'tabindex' => '0', ]; + #[Override] public function render(): string { $this->attributes['title'] = $this->slot; diff --git a/app/Views/Components/Pill.php b/app/Views/Components/Pill.php index 3fd4944c..cd9c18e1 100644 --- a/app/Views/Components/Pill.php +++ b/app/Views/Components/Pill.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components; +use Override; use ViewComponents\Component; class Pill extends Component @@ -23,6 +24,7 @@ class Pill extends Component protected string $hint = ''; + #[Override] public function render(): string { $variantClass = match ($this->variant) { diff --git a/app/Views/Components/ReadMore.php b/app/Views/Components/ReadMore.php index 3739cbcc..d55e48d9 100644 --- a/app/Views/Components/ReadMore.php +++ b/app/Views/Components/ReadMore.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Views\Components; +use Override; use ViewComponents\Component; class ReadMore extends Component @@ -12,6 +13,7 @@ class ReadMore extends Component protected string $id; + #[Override] public function render(): string { $readMoreLabel = lang('Common.read_more'); diff --git a/app/Views/Components/SeeMore.php b/app/Views/Components/SeeMore.php index db30ab94..e8e42deb 100644 --- a/app/Views/Components/SeeMore.php +++ b/app/Views/Components/SeeMore.php @@ -4,10 +4,12 @@ declare(strict_types=1); namespace App\Views\Components; +use Override; use ViewComponents\Component; class SeeMore extends Component { + #[Override] public function render(): string { $seeMoreLabel = lang('Common.see_more'); diff --git a/app/Views/Decorators/SiteHead.php b/app/Views/Decorators/SiteHead.php index ff8e91a1..b1c29123 100644 --- a/app/Views/Decorators/SiteHead.php +++ b/app/Views/Decorators/SiteHead.php @@ -5,11 +5,13 @@ declare(strict_types=1); namespace App\Views\Decorators; use CodeIgniter\View\ViewDecoratorInterface; +use Override; class SiteHead implements ViewDecoratorInterface { private static int $renderedCount = 0; + #[Override] public static function decorate(string $html): string { if (url_is(config('Admin')->gateway . '*') || url_is(config('Install')->gateway)) { diff --git a/composer.json b/composer.json index b00fe83f..28579d79 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "homepage": "https://castopod.org", "license": "AGPL-3.0-or-later", "require": { - "php": "^8.1", + "php": "^8.3", "adaures/ipcat-php": "^v1.0.0", "adaures/podcast-persons-taxonomy": "^v1.0.1", "aws/aws-sdk-php": "^3.305.4", diff --git a/docker/ci/Dockerfile b/docker/ci/Dockerfile index a5a71bf9..10efa624 100644 --- a/docker/ci/Dockerfile +++ b/docker/ci/Dockerfile @@ -4,7 +4,7 @@ # ⚠️ NOT optimized for production # should be used only for continuous integration #--------------------------------------------------- -FROM php:8.1-fpm-alpine3.19 +FROM php:8.3-fpm-alpine3.20 LABEL maintainer="Yassine Doghri " diff --git a/docker/production/app/Dockerfile b/docker/production/app/Dockerfile index 2c58c761..672a6565 100644 --- a/docker/production/app/Dockerfile +++ b/docker/production/app/Dockerfile @@ -11,7 +11,7 @@ RUN apt-get update && \ mv supercronic /usr/local/bin -FROM docker.io/php:8.1-fpm +FROM docker.io/php:8.3-fpm COPY --from=CRON_BUILDER /usr/local/bin/supercronic /usr/local/bin/supercronic diff --git a/docs/src/content/docs/ar/getting-started/install.mdx b/docs/src/content/docs/ar/getting-started/install.mdx index 9471b0b3..e55c4609 100644 --- a/docs/src/content/docs/ar/getting-started/install.mdx +++ b/docs/src/content/docs/ar/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1, alebo vyššia +### PHP v8.3, alebo vyššia -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/br/getting-started/install.mdx b/docs/src/content/docs/br/getting-started/install.mdx index 2d1f988a..2161629d 100644 --- a/docs/src/content/docs/br/getting-started/install.mdx +++ b/docs/src/content/docs/br/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/ca/getting-started/install.mdx b/docs/src/content/docs/ca/getting-started/install.mdx index 85eb926d..a20a2562 100644 --- a/docs/src/content/docs/ca/getting-started/install.mdx +++ b/docs/src/content/docs/ca/getting-started/install.mdx @@ -19,15 +19,15 @@ Si preferiu utilitzar Docker, podeu ometre això i anar directament a la ## Requisits -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL versió 5.7 o superior o MariaDB versió 10.2 o superior - Support d'HTTPS - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/da/getting-started/install.mdx b/docs/src/content/docs/da/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/da/getting-started/install.mdx +++ b/docs/src/content/docs/da/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/de/getting-started/install.mdx b/docs/src/content/docs/de/getting-started/install.mdx index 5401bc22..c62a784c 100644 --- a/docs/src/content/docs/de/getting-started/install.mdx +++ b/docs/src/content/docs/de/getting-started/install.mdx @@ -19,15 +19,15 @@ direkt zur [Docker-Dokumentation](./docker.md) für Castopod gehen. ## Voraussetzungen -- PHP v8.1 oder höher +- PHP v8.3 oder höher - MySQL Version 5.7 oder höher oder MariaDB Version 10.2 oder höher - HTTPS-Unterstützung - Eine [ntp-synchronisierte Uhr](https://wiki.debian.org/NTP) um die eingehenden Anfragen zu überprüfen -### PHP v8.1 oder höher +### PHP v8.3 oder höher -PHP Version 8.1 oder höher ist erforderlich, mit folgenden Erweiterungen +PHP Version 8.3 oder höher ist erforderlich, mit folgenden Erweiterungen installiert: - [intl](https://php.net/manual/en/intl.requirements.php) diff --git a/docs/src/content/docs/el/getting-started/install.mdx b/docs/src/content/docs/el/getting-started/install.mdx index 92961778..756f1a05 100644 --- a/docs/src/content/docs/el/getting-started/install.mdx +++ b/docs/src/content/docs/el/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Vereisten -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/en/getting-started/install.mdx b/docs/src/content/docs/en/getting-started/install.mdx index 6f08c121..49c73ba9 100644 --- a/docs/src/content/docs/en/getting-started/install.mdx +++ b/docs/src/content/docs/en/getting-started/install.mdx @@ -9,15 +9,15 @@ shared hosting, you can install it on most PHP-MySQL compatible web servers. ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/es/getting-started/install.mdx b/docs/src/content/docs/es/getting-started/install.mdx index dd575eb6..eaa341e2 100644 --- a/docs/src/content/docs/es/getting-started/install.mdx +++ b/docs/src/content/docs/es/getting-started/install.mdx @@ -19,15 +19,15 @@ Si prefieres usar Docker, puedes saltarte esto e ir directamente a la ## Requisitos -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL versión 5.7 o superior o MariaDB versión 10.2 o superior - Soporte HTTPS - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/eu/getting-started/install.mdx b/docs/src/content/docs/eu/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/eu/getting-started/install.mdx +++ b/docs/src/content/docs/eu/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/fa/getting-started/install.mdx b/docs/src/content/docs/fa/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/fa/getting-started/install.mdx +++ b/docs/src/content/docs/fa/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/fr/getting-started/install.mdx b/docs/src/content/docs/fr/getting-started/install.mdx index e8647bfd..014b1c34 100644 --- a/docs/src/content/docs/fr/getting-started/install.mdx +++ b/docs/src/content/docs/fr/getting-started/install.mdx @@ -19,15 +19,15 @@ directement à la [documentation Docker](./docker.md) pour Castopod. ## Prérequis -- PHP v8.1 ou supérieure +- PHP v8.3 ou supérieure - MySQL version 5.7 ou supérieure ou MariaDB version 10.2 ou supérieure - Prise en charge HTTPS - Une horloge [synchronisée ntp](https://wiki.debian.org/NTP) pour valider les requêtes fédérés entrantes -### PHP v8.1 ou supérieure +### PHP v8.3 ou supérieure -PHP version 8.1 ou supérieure est requise, avec les extensions suivantes +PHP version 8.3 ou supérieure est requise, avec les extensions suivantes installées : - [intl](https://www.php.net/manual/fr/intl.requirements.php) diff --git a/docs/src/content/docs/fr2/getting-started/install.mdx b/docs/src/content/docs/fr2/getting-started/install.mdx index f1706b56..6ece7230 100644 --- a/docs/src/content/docs/fr2/getting-started/install.mdx +++ b/docs/src/content/docs/fr2/getting-started/install.mdx @@ -19,15 +19,15 @@ directement à la [documentation Docker](./docker.md) pour Castopod. ## Prérequis -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 ou supérieure ou MariaDB version 10.2 ou supérieure - Prise en charge HTTPS - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://www.php.net/manual/fr/intl.requirements.php) - [libcurl](https://www.php.net/manual/fr/curl.requirements.php) diff --git a/docs/src/content/docs/gd/getting-started/install.mdx b/docs/src/content/docs/gd/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/gd/getting-started/install.mdx +++ b/docs/src/content/docs/gd/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/gl/getting-started/install.mdx b/docs/src/content/docs/gl/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/gl/getting-started/install.mdx +++ b/docs/src/content/docs/gl/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/id/getting-started/install.mdx b/docs/src/content/docs/id/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/id/getting-started/install.mdx +++ b/docs/src/content/docs/id/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/it/getting-started/install.mdx b/docs/src/content/docs/it/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/it/getting-started/install.mdx +++ b/docs/src/content/docs/it/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/ja/getting-started/install.mdx b/docs/src/content/docs/ja/getting-started/install.mdx index 3067a367..98e775ae 100644 --- a/docs/src/content/docs/ja/getting-started/install.mdx +++ b/docs/src/content/docs/ja/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/kk/getting-started/install.mdx b/docs/src/content/docs/kk/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/kk/getting-started/install.mdx +++ b/docs/src/content/docs/kk/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/ko/getting-started/install.mdx b/docs/src/content/docs/ko/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/ko/getting-started/install.mdx +++ b/docs/src/content/docs/ko/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/nl/getting-started/install.mdx b/docs/src/content/docs/nl/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/nl/getting-started/install.mdx +++ b/docs/src/content/docs/nl/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/nn-no/getting-started/install.mdx b/docs/src/content/docs/nn-no/getting-started/install.mdx index 16983097..2f4729a9 100644 --- a/docs/src/content/docs/nn-no/getting-started/install.mdx +++ b/docs/src/content/docs/nn-no/getting-started/install.mdx @@ -19,15 +19,15 @@ Viss du helst vil bruka Docker, kan du hoppa over dette og gå rett til ## Krav -- PHP v8.1 eller nyare +- PHP v8.3 eller nyare - MySQL versjon 5.7 eller nyare, eller MariaDB versjon 10.2 eller nyare - Støtte for HTTPS - Ei [ntp-synkronisert klokke](https://wiki.debian.org/NTP) for å stadfesta innkomande førespurnader frå allheimen -### PHP v8.1 eller nyare +### PHP v8.3 eller nyare -Du treng PHP versjon 8.1 eller nyare, og mde desse tillegga: +Du treng PHP versjon 8.3 eller nyare, og mde desse tillegga: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/oc/getting-started/install.mdx b/docs/src/content/docs/oc/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/oc/getting-started/install.mdx +++ b/docs/src/content/docs/oc/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/pl/getting-started/install.mdx b/docs/src/content/docs/pl/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/pl/getting-started/install.mdx +++ b/docs/src/content/docs/pl/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/pt-br/getting-started/install.mdx b/docs/src/content/docs/pt-br/getting-started/install.mdx index 886051db..f32e738f 100644 --- a/docs/src/content/docs/pt-br/getting-started/install.mdx +++ b/docs/src/content/docs/pt-br/getting-started/install.mdx @@ -19,15 +19,15 @@ Se você prefere usar o Docker, você pode pular isso e ir direto para a ## Requisitos -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL versão 5.7 ou superior ou MariaDB versão 10.2 ou superior - Suporte a HTTPS - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/pt/getting-started/install.mdx b/docs/src/content/docs/pt/getting-started/install.mdx index c65647d9..31864020 100644 --- a/docs/src/content/docs/pt/getting-started/install.mdx +++ b/docs/src/content/docs/pt/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/ro/getting-started/install.mdx b/docs/src/content/docs/ro/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/ro/getting-started/install.mdx +++ b/docs/src/content/docs/ro/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/ru/getting-started/install.mdx b/docs/src/content/docs/ru/getting-started/install.mdx index c65647d9..31864020 100644 --- a/docs/src/content/docs/ru/getting-started/install.mdx +++ b/docs/src/content/docs/ru/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/sk/getting-started/install.mdx b/docs/src/content/docs/sk/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/sk/getting-started/install.mdx +++ b/docs/src/content/docs/sk/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/sr-latn/getting-started/install.mdx b/docs/src/content/docs/sr-latn/getting-started/install.mdx index 9789a7fd..4bb838b5 100644 --- a/docs/src/content/docs/sr-latn/getting-started/install.mdx +++ b/docs/src/content/docs/sr-latn/getting-started/install.mdx @@ -19,15 +19,15 @@ Ako više volite da koristite Docker, možete ovo preskočiti i preći direktno ## Uslovi -- PHP v8.1 ili novija verzija +- PHP v8.3 ili novija verzija - MySQL verzija 5.7 ili novija ili MariaDB verzija 10.2 ili novija - HTTPS podrška - [ntp-sinhronizovani sat](https://viki.debian.org/NTP) za potvrdu dolaznih zahteva federacije -### PHP v8.1 ili kasnija verzija +### PHP v8.3 ili kasnija verzija -Potrebna je PHP verzija 8.1 ili novija, sa instaliranim sledećim ekstenzijama: +Potrebna je PHP verzija 8.3 ili novija, sa instaliranim sledećim ekstenzijama: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/sv/getting-started/install.mdx b/docs/src/content/docs/sv/getting-started/install.mdx index a9f98f9c..501f4824 100644 --- a/docs/src/content/docs/sv/getting-started/install.mdx +++ b/docs/src/content/docs/sv/getting-started/install.mdx @@ -19,15 +19,15 @@ Om du föredrar att använda Docker, kan du hoppa över detta och gå direkt til ## Krav -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 eller högre eller MariaDB version 10.2 eller högre - Stöd för HTTPS - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/uk/getting-started/install.mdx b/docs/src/content/docs/uk/getting-started/install.mdx index 9789a7fd..4bb838b5 100644 --- a/docs/src/content/docs/uk/getting-started/install.mdx +++ b/docs/src/content/docs/uk/getting-started/install.mdx @@ -19,15 +19,15 @@ Ako više volite da koristite Docker, možete ovo preskočiti i preći direktno ## Uslovi -- PHP v8.1 ili novija verzija +- PHP v8.3 ili novija verzija - MySQL verzija 5.7 ili novija ili MariaDB verzija 10.2 ili novija - HTTPS podrška - [ntp-sinhronizovani sat](https://viki.debian.org/NTP) za potvrdu dolaznih zahteva federacije -### PHP v8.1 ili kasnija verzija +### PHP v8.3 ili kasnija verzija -Potrebna je PHP verzija 8.1 ili novija, sa instaliranim sledećim ekstenzijama: +Potrebna je PHP verzija 8.3 ili novija, sa instaliranim sledećim ekstenzijama: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/zh-hans/getting-started/install.mdx b/docs/src/content/docs/zh-hans/getting-started/install.mdx index d3e7e614..b791646e 100644 --- a/docs/src/content/docs/zh-hans/getting-started/install.mdx +++ b/docs/src/content/docs/zh-hans/getting-started/install.mdx @@ -18,14 +18,14 @@ Castopod 的安装非常简单。 你能在大多数兼容的 PHP-MySQL 的服 ## 要求 -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL 5.7 或更高版本与 MariaDB 10.2 或更高版本 - HTTPS 支持 - 用于验证的 [NTP 同步时钟](https://wiki.debian.org/NTP) 传入请求 -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/docs/src/content/docs/zh-hant/getting-started/install.mdx b/docs/src/content/docs/zh-hant/getting-started/install.mdx index d8888954..49c0872e 100644 --- a/docs/src/content/docs/zh-hant/getting-started/install.mdx +++ b/docs/src/content/docs/zh-hant/getting-started/install.mdx @@ -18,15 +18,15 @@ If you prefer using Docker, you may skip this and go straight to the ## Requirements -- PHP v8.1 or higher +- PHP v8.3 or higher - MySQL version 5.7 or higher or MariaDB version 10.2 or higher - HTTPS support - An [ntp-synced clock](https://wiki.debian.org/NTP) to validate federation's incoming requests -### PHP v8.1 or higher +### PHP v8.3 or higher -PHP version 8.1 or higher is required, with the following extensions installed: +PHP version 8.3 or higher is required, with the following extensions installed: - [intl](https://php.net/manual/en/intl.requirements.php) - [libcurl](https://php.net/manual/en/curl.requirements.php) diff --git a/modules/Admin/Controllers/BaseController.php b/modules/Admin/Controllers/BaseController.php index 29f5b3ff..db1763f1 100644 --- a/modules/Admin/Controllers/BaseController.php +++ b/modules/Admin/Controllers/BaseController.php @@ -8,6 +8,7 @@ use CodeIgniter\Controller; use CodeIgniter\HTTP\IncomingRequest; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; +use Override; use Psr\Log\LoggerInterface; use ViewThemes\Theme; @@ -30,6 +31,7 @@ abstract class BaseController extends Controller /** * Constructor. */ + #[Override] public function initController( RequestInterface $request, ResponseInterface $response, diff --git a/modules/Analytics/Database/Migrations/2017-12-01-000000_add_analytics_podcasts.php b/modules/Analytics/Database/Migrations/2017-12-01-000000_add_analytics_podcasts.php index ab757aa0..e95fb7a8 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-000000_add_analytics_podcasts.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-000000_add_analytics_podcasts.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsPodcasts extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -56,6 +58,7 @@ class AddAnalyticsPodcasts extends BaseMigration $this->forge->createTable('analytics_podcasts'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_podcasts'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-010000_add_analytics_podcasts_by_episode.php b/modules/Analytics/Database/Migrations/2017-12-01-010000_add_analytics_podcasts_by_episode.php index 490b296f..421d76ca 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-010000_add_analytics_podcasts_by_episode.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-010000_add_analytics_podcasts_by_episode.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsPodcastsByEpisode extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -49,6 +51,7 @@ class AddAnalyticsPodcastsByEpisode extends BaseMigration $this->forge->createTable('analytics_podcasts_by_episode'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_podcasts_by_episode'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-020000_add_analytics_podcasts_by_hour.php b/modules/Analytics/Database/Migrations/2017-12-01-020000_add_analytics_podcasts_by_hour.php index 73fb643d..3050d0af 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-020000_add_analytics_podcasts_by_hour.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-020000_add_analytics_podcasts_by_hour.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsPodcastsByHour extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -44,6 +46,7 @@ class AddAnalyticsPodcastsByHour extends BaseMigration $this->forge->createTable('analytics_podcasts_by_hour'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_podcasts_by_hour'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-030000_add_analytics_podcasts_by_player.php b/modules/Analytics/Database/Migrations/2017-12-01-030000_add_analytics_podcasts_by_player.php index 6187b755..e6b653c1 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-030000_add_analytics_podcasts_by_player.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-030000_add_analytics_podcasts_by_player.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsPodcastsByPlayer extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -61,6 +63,7 @@ class AddAnalyticsPodcastsByPlayer extends BaseMigration $this->forge->createTable('analytics_podcasts_by_player'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_podcasts_by_player'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-040000_add_analytics_podcasts_by_country.php b/modules/Analytics/Database/Migrations/2017-12-01-040000_add_analytics_podcasts_by_country.php index 33db986e..cd668c0b 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-040000_add_analytics_podcasts_by_country.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-040000_add_analytics_podcasts_by_country.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsPodcastsByCountry extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -45,6 +47,7 @@ class AddAnalyticsPodcastsByCountry extends BaseMigration $this->forge->createTable('analytics_podcasts_by_country'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_podcasts_by_country'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-050000_add_analytics_podcasts_by_region.php b/modules/Analytics/Database/Migrations/2017-12-01-050000_add_analytics_podcasts_by_region.php index 51a12a05..3e5ec698 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-050000_add_analytics_podcasts_by_region.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-050000_add_analytics_podcasts_by_region.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsPodcastsByRegion extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -58,6 +60,7 @@ class AddAnalyticsPodcastsByRegion extends BaseMigration $this->forge->createTable('analytics_podcasts_by_region'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_podcasts_by_region'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-060000_add_analytics_website_by_browser.php b/modules/Analytics/Database/Migrations/2017-12-01-060000_add_analytics_website_by_browser.php index 3b47f828..8e37d154 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-060000_add_analytics_website_by_browser.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-060000_add_analytics_website_by_browser.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsWebsiteByBrowser extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -45,6 +47,7 @@ class AddAnalyticsWebsiteByBrowser extends BaseMigration $this->forge->createTable('analytics_website_by_browser'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_website_by_browser'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-070000_add_analytics_website_by_referer.php b/modules/Analytics/Database/Migrations/2017-12-01-070000_add_analytics_website_by_referer.php index c7d6d40c..cfbbd362 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-070000_add_analytics_website_by_referer.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-070000_add_analytics_website_by_referer.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsWebsiteByReferer extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -55,6 +57,7 @@ class AddAnalyticsWebsiteByReferer extends BaseMigration $this->forge->createTable('analytics_website_by_referer'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_website_by_referer'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-080000_add_analytics_website_by_entry_page.php b/modules/Analytics/Database/Migrations/2017-12-01-080000_add_analytics_website_by_entry_page.php index 9d21b9ce..bdfebcbc 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-080000_add_analytics_website_by_entry_page.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-080000_add_analytics_website_by_entry_page.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsWebsiteByEntryPage extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -44,6 +46,7 @@ class AddAnalyticsWebsiteByEntryPage extends BaseMigration $this->forge->createTable('analytics_website_by_entry_page'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_website_by_entry_page'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-090000_add_analytics_unknown_useragents.php b/modules/Analytics/Database/Migrations/2017-12-01-090000_add_analytics_unknown_useragents.php index bdff40a7..986848c5 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-090000_add_analytics_unknown_useragents.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-090000_add_analytics_unknown_useragents.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsUnknownUseragents extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -45,6 +47,7 @@ class AddAnalyticsUnknownUseragents extends BaseMigration $this->forge->createTable('analytics_unknown_useragents'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_unknown_useragents'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-100000_add_analytics_podcasts_by_subscription.php b/modules/Analytics/Database/Migrations/2017-12-01-100000_add_analytics_podcasts_by_subscription.php index 9d6e2c7e..44ea8c5e 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-100000_add_analytics_podcasts_by_subscription.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-100000_add_analytics_podcasts_by_subscription.php @@ -11,9 +11,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsPodcastsBySubscription extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -48,6 +50,7 @@ class AddAnalyticsPodcastsBySubscription extends BaseMigration $this->forge->createTable('analytics_podcasts_by_subscription'); } + #[Override] public function down(): void { $this->forge->dropTable('analytics_podcasts_by_subscription'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_podcasts_procedure.php b/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_podcasts_procedure.php index fafe2d5c..9472f0f2 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_podcasts_procedure.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_podcasts_procedure.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsPodcastsProcedure extends BaseMigration { + #[Override] public function up(): void { // Creates Procedure for data insertion @@ -85,6 +87,7 @@ class AddAnalyticsPodcastsProcedure extends BaseMigration $this->db->query($createQuery); } + #[Override] public function down(): void { $prefix = $this->db->getPrefix(); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_unknown_useragents_procedure.php b/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_unknown_useragents_procedure.php index d236318e..af627bf2 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_unknown_useragents_procedure.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_unknown_useragents_procedure.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsUnknownUseragentsProcedure extends BaseMigration { + #[Override] public function up(): void { // Creates Procedure for data insertion @@ -33,6 +35,7 @@ class AddAnalyticsUnknownUseragentsProcedure extends BaseMigration $this->db->query($createQuery); } + #[Override] public function down(): void { $procedureName = $this->db->prefixTable('analytics_unknown_useragents'); diff --git a/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_website_procedure.php b/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_website_procedure.php index 452b6b0a..dc2b0bd2 100644 --- a/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_website_procedure.php +++ b/modules/Analytics/Database/Migrations/2017-12-01-210000_add_analytics_website_procedure.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Analytics\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddAnalyticsWebsiteProcedure extends BaseMigration { + #[Override] public function up(): void { // Creates Procedure for data insertion @@ -51,6 +53,7 @@ class AddAnalyticsWebsiteProcedure extends BaseMigration $this->db->query($createQuery); } + #[Override] public function down(): void { $procedureName = $this->db->prefixTable('analytics_website'); diff --git a/modules/Api/Rest/V1/Core/RestApiExceptions.php b/modules/Api/Rest/V1/Core/RestApiExceptions.php index 7484c1b0..7d132aea 100644 --- a/modules/Api/Rest/V1/Core/RestApiExceptions.php +++ b/modules/Api/Rest/V1/Core/RestApiExceptions.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Modules\Api\Rest\V1\Core; use CodeIgniter\Debug\Exceptions; +use Override; use Throwable; class RestApiExceptions extends Exceptions { + #[Override] protected function render(Throwable $exception, int $statusCode): void { header('Content-Type: application/json'); diff --git a/modules/Api/Rest/V1/Filters/ApiFilter.php b/modules/Api/Rest/V1/Filters/ApiFilter.php index ba03bc2e..8ce40143 100644 --- a/modules/Api/Rest/V1/Filters/ApiFilter.php +++ b/modules/Api/Rest/V1/Filters/ApiFilter.php @@ -11,6 +11,7 @@ use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\Response; use CodeIgniter\HTTP\ResponseInterface; use Modules\Api\Rest\V1\Config\RestApi; +use Override; class ApiFilter implements FilterInterface { @@ -18,6 +19,7 @@ class ApiFilter implements FilterInterface * @param Request $request * @return RequestInterface|ResponseInterface|string|void */ + #[Override] public function before(RequestInterface $request, $arguments = null) { /** @var RestApi $restApiConfig */ @@ -55,6 +57,7 @@ class ApiFilter implements FilterInterface } } + #[Override] public function after(RequestInterface $request, ResponseInterface $response, $arguments = null): void { // Do something here diff --git a/modules/Auth/Auth.php b/modules/Auth/Auth.php index 2e123609..83403106 100644 --- a/modules/Auth/Auth.php +++ b/modules/Auth/Auth.php @@ -6,6 +6,7 @@ namespace Modules\Auth; use CodeIgniter\Router\RouteCollection; use CodeIgniter\Shield\Auth as ShieldAuth; +use Override; class Auth extends ShieldAuth { @@ -19,6 +20,7 @@ class Auth extends ShieldAuth * * @param array{except?:list} $config */ + #[Override] public function routes(RouteCollection &$routes, array $config = []): void { $authRoutes = config('AuthRoutes') diff --git a/modules/Auth/Commands/RolesDoc.php b/modules/Auth/Commands/RolesDoc.php index 6e78d9b0..bc9d9cc6 100644 --- a/modules/Auth/Commands/RolesDoc.php +++ b/modules/Auth/Commands/RolesDoc.php @@ -12,13 +12,14 @@ use Config\Services; use League\HTMLToMarkdown\Converter\TableConverter; use League\HTMLToMarkdown\HtmlConverter; use Modules\Auth\Config\AuthGroups; +use Override; class RolesDoc extends BaseCommand { /** * @var array */ - private const COMMENT_BLOCK_IDS = [ + private const array COMMENT_BLOCK_IDS = [ 'instance_roles' => 'AUTH-INSTANCE-ROLES-LIST', 'instance_permissions' => 'AUTH-INSTANCE-PERMISSIONS-LIST', 'podcast_roles' => 'AUTH-PODCAST-ROLES-LIST', @@ -40,6 +41,7 @@ class RolesDoc extends BaseCommand */ protected $description = 'Generates the html table references for roles and permissions in the docs.'; + #[Override] public function run(array $params): void { // loop over all files in path diff --git a/modules/Auth/Config/Auth.php b/modules/Auth/Config/Auth.php index fd935745..f5fc2c68 100644 --- a/modules/Auth/Config/Auth.php +++ b/modules/Auth/Config/Auth.php @@ -10,6 +10,7 @@ use CodeIgniter\Shield\Authentication\AuthenticatorInterface; use CodeIgniter\Shield\Config\Auth as ShieldAuth; use CodeIgniter\Shield\Entities\User; use Modules\Auth\Models\UserModel; +use Override; class Auth extends ShieldAuth { @@ -148,6 +149,7 @@ class Auth extends ShieldAuth * * Redirects to the set-password form if magicLogin */ + #[Override] public function loginRedirect(): string { if (! session('magicLogin')) { diff --git a/modules/Auth/Controllers/ActionController.php b/modules/Auth/Controllers/ActionController.php index 5dfbaf5b..087bfa16 100644 --- a/modules/Auth/Controllers/ActionController.php +++ b/modules/Auth/Controllers/ActionController.php @@ -7,6 +7,7 @@ namespace Modules\Auth\Controllers; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Shield\Controllers\ActionController as ShieldActionController; +use Override; use Psr\Log\LoggerInterface; use ViewThemes\Theme; @@ -15,6 +16,7 @@ use ViewThemes\Theme; */ class ActionController extends ShieldActionController { + #[Override] public function initController( RequestInterface $request, ResponseInterface $response, diff --git a/modules/Auth/Controllers/LoginController.php b/modules/Auth/Controllers/LoginController.php index 75163cd6..91e375c6 100644 --- a/modules/Auth/Controllers/LoginController.php +++ b/modules/Auth/Controllers/LoginController.php @@ -7,11 +7,13 @@ namespace Modules\Auth\Controllers; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Shield\Controllers\LoginController as ShieldLoginController; +use Override; use Psr\Log\LoggerInterface; use ViewThemes\Theme; class LoginController extends ShieldLoginController { + #[Override] public function initController( RequestInterface $request, ResponseInterface $response, diff --git a/modules/Auth/Controllers/MagicLinkController.php b/modules/Auth/Controllers/MagicLinkController.php index 609aed15..d37f85ee 100644 --- a/modules/Auth/Controllers/MagicLinkController.php +++ b/modules/Auth/Controllers/MagicLinkController.php @@ -9,6 +9,7 @@ use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Shield\Controllers\MagicLinkController as ShieldMagicLinkController; use CodeIgniter\Shield\Entities\User; +use Override; use Psr\Log\LoggerInterface; use ViewThemes\Theme; @@ -19,6 +20,7 @@ use ViewThemes\Theme; */ class MagicLinkController extends ShieldMagicLinkController { + #[Override] public function initController( RequestInterface $request, ResponseInterface $response, diff --git a/modules/Auth/Controllers/RegisterController.php b/modules/Auth/Controllers/RegisterController.php index 6db353de..d015392f 100644 --- a/modules/Auth/Controllers/RegisterController.php +++ b/modules/Auth/Controllers/RegisterController.php @@ -7,6 +7,7 @@ namespace Modules\Auth\Controllers; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Shield\Controllers\RegisterController as ShieldRegisterController; +use Override; use Psr\Log\LoggerInterface; use ViewThemes\Theme; @@ -15,6 +16,7 @@ use ViewThemes\Theme; */ class RegisterController extends ShieldRegisterController { + #[Override] public function initController( RequestInterface $request, ResponseInterface $response, diff --git a/modules/Auth/Database/Migrations/2020-12-29-100000_add_is_owner_to_users.php b/modules/Auth/Database/Migrations/2020-12-29-100000_add_is_owner_to_users.php index 0e12311f..7f0badee 100644 --- a/modules/Auth/Database/Migrations/2020-12-29-100000_add_is_owner_to_users.php +++ b/modules/Auth/Database/Migrations/2020-12-29-100000_add_is_owner_to_users.php @@ -4,8 +4,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddIsOwnerToUsers extends BaseMigration { + #[Override] public function up(): void { $fields = [ @@ -20,6 +23,7 @@ class AddIsOwnerToUsers extends BaseMigration $this->forge->addColumn('users', $fields); } + #[Override] public function down(): void { $fields = ['is_owner']; diff --git a/modules/Auth/Filters/PermissionFilter.php b/modules/Auth/Filters/PermissionFilter.php index d8d4240e..8d53c4a3 100644 --- a/modules/Auth/Filters/PermissionFilter.php +++ b/modules/Auth/Filters/PermissionFilter.php @@ -10,6 +10,7 @@ use CodeIgniter\Filters\FilterInterface; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Config\Services; +use Override; use RuntimeException; /** @@ -22,6 +23,7 @@ class PermissionFilter implements FilterInterface * * @return RequestInterface|ResponseInterface|string|void */ + #[Override] public function before(RequestInterface $request, $arguments = null) { if ($arguments === null || $arguments === []) { @@ -42,6 +44,7 @@ class PermissionFilter implements FilterInterface /** * @param string[]|null $arguments */ + #[Override] public function after(RequestInterface $request, ResponseInterface $response, $arguments = null): void { } diff --git a/modules/Fediverse/Commands/Broadcast.php b/modules/Fediverse/Commands/Broadcast.php index 559dc682..ed718f0b 100644 --- a/modules/Fediverse/Commands/Broadcast.php +++ b/modules/Fediverse/Commands/Broadcast.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Modules\Fediverse\Commands; use CodeIgniter\CLI\BaseCommand; +use Override; class Broadcast extends BaseCommand { @@ -14,6 +15,7 @@ class Broadcast extends BaseCommand protected $description = 'Broadcasts new outgoing activity to followers.'; + #[Override] public function run(array $params): void { helper('fediverse'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-010000_add_actors.php b/modules/Fediverse/Database/Migrations/2018-01-01-010000_add_actors.php index ddf5228c..dc323b9d 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-010000_add_actors.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-010000_add_actors.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Fediverse\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddActors extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -116,6 +118,7 @@ class AddActors extends BaseMigration $this->forge->createTable('fediverse_actors'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_actors'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-020000_add_posts.php b/modules/Fediverse/Database/Migrations/2018-01-01-020000_add_posts.php index 903f8aec..c6bffce5 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-020000_add_posts.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-020000_add_posts.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Fediverse\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddPosts extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -85,6 +87,7 @@ class AddPosts extends BaseMigration $this->forge->createTable('fediverse_posts'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_posts'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_activities.php b/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_activities.php index 18b94cdf..b497009b 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_activities.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_activities.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Fediverse\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddActivities extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -65,6 +67,7 @@ class AddActivities extends BaseMigration $this->forge->createTable('fediverse_activities'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_activities'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_favourites.php b/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_favourites.php index 75ec8f21..be9b5755 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_favourites.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_favourites.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Fediverse\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddFavourites extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -36,6 +38,7 @@ class AddFavourites extends BaseMigration $this->forge->createTable('fediverse_favourites'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_favourites'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_follows.php b/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_follows.php index 0b0273ba..945933f4 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_follows.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_follows.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Fediverse\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddFollowers extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -38,6 +40,7 @@ class AddFollowers extends BaseMigration $this->forge->createTable('fediverse_follows'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_follows'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_preview_cards.php b/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_preview_cards.php index f0359070..479d7102 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_preview_cards.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-100000_add_preview_cards.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Fediverse\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddPreviewCards extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -78,6 +80,7 @@ class AddPreviewCards extends BaseMigration $this->forge->createTable('fediverse_preview_cards'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_preview_cards'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-110000_add_posts_preview_cards.php b/modules/Fediverse/Database/Migrations/2018-01-01-110000_add_posts_preview_cards.php index 2bd9d9ba..3d8d4d70 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-110000_add_posts_preview_cards.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-110000_add_posts_preview_cards.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Fediverse\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddPostsPreviewCards extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -35,6 +37,7 @@ class AddPostsPreviewCards extends BaseMigration $this->forge->createTable('fediverse_posts_preview_cards'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_posts_preview_cards'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-120000_add_blocked_domains.php b/modules/Fediverse/Database/Migrations/2018-01-01-120000_add_blocked_domains.php index 044a0e0b..d17079a1 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-120000_add_blocked_domains.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-120000_add_blocked_domains.php @@ -13,9 +13,11 @@ declare(strict_types=1); namespace Modules\Fediverse\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddBlockedDomains extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -31,6 +33,7 @@ class AddBlockedDomains extends BaseMigration $this->forge->createTable('fediverse_blocked_domains'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_blocked_domains'); diff --git a/modules/Fediverse/Database/Migrations/2018-01-01-130000_add_notifications.php b/modules/Fediverse/Database/Migrations/2018-01-01-130000_add_notifications.php index df979192..a1764482 100644 --- a/modules/Fediverse/Database/Migrations/2018-01-01-130000_add_notifications.php +++ b/modules/Fediverse/Database/Migrations/2018-01-01-130000_add_notifications.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace App\Database\Migrations; +use Override; + class AddNotifications extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -63,6 +66,7 @@ class AddNotifications extends BaseMigration $this->forge->createTable('fediverse_notifications'); } + #[Override] public function down(): void { $this->forge->dropTable('fediverse_notifications'); diff --git a/modules/Fediverse/Filters/FediverseFilter.php b/modules/Fediverse/Filters/FediverseFilter.php index 355bfa3a..67d90498 100644 --- a/modules/Fediverse/Filters/FediverseFilter.php +++ b/modules/Fediverse/Filters/FediverseFilter.php @@ -12,6 +12,7 @@ use CodeIgniter\HTTP\URI; use Config\Services; use Exception; use Modules\Fediverse\HttpSignature; +use Override; class FediverseFilter implements FilterInterface { @@ -24,6 +25,7 @@ class FediverseFilter implements FilterInterface * @param string[]|null $params * @return RequestInterface|ResponseInterface|string|void */ + #[Override] public function before(RequestInterface $request, $params = null) { if ($params === null) { @@ -81,6 +83,7 @@ class FediverseFilter implements FilterInterface * * @param string[]|null $arguments */ + #[Override] public function after(RequestInterface $request, ResponseInterface $response, $arguments = null): void { } diff --git a/modules/Fediverse/HttpSignature.php b/modules/Fediverse/HttpSignature.php index d0399038..cbec3f44 100644 --- a/modules/Fediverse/HttpSignature.php +++ b/modules/Fediverse/HttpSignature.php @@ -28,7 +28,7 @@ class HttpSignature /** * @var string */ - private const SIGNATURE_PATTERN = '/ + private const string SIGNATURE_PATTERN = '/ (?=.*(keyId="(?Phttps?:\/\/[\w\-\.]+[\w]+(:[\d]+)?[\w\-\.#\/@]+)")) (?=.*(signature="(?P[\w+\/]+={0,2})")) (?=.*(headers="\(request-target\)(?P[\w\\-\s]+)"))? diff --git a/modules/Fediverse/WebFinger.php b/modules/Fediverse/WebFinger.php index c66886ec..89af5d84 100644 --- a/modules/Fediverse/WebFinger.php +++ b/modules/Fediverse/WebFinger.php @@ -18,7 +18,7 @@ class WebFinger /** * @var string */ - private const RESOURCE_PATTERN = '/^acct:(?P([\w_]+))@(?P([\w\-\.]+[\w]+)(:[\d]+)?)$/x'; + private const string RESOURCE_PATTERN = '/^acct:(?P([\w_]+))@(?P([\w\-\.]+[\w]+)(:[\d]+)?)$/x'; protected string $username; diff --git a/modules/Install/Commands/CreateSuperadmin.php b/modules/Install/Commands/CreateSuperadmin.php index 799b36b8..7cf6a6ec 100644 --- a/modules/Install/Commands/CreateSuperadmin.php +++ b/modules/Install/Commands/CreateSuperadmin.php @@ -9,6 +9,7 @@ use CodeIgniter\Shield\Commands\Exceptions\BadInputException; use CodeIgniter\Shield\Commands\Exceptions\CancelException; use CodeIgniter\Shield\Entities\User; use CodeIgniter\Shield\Validation\ValidationRules; +use Override; class CreateSuperadmin extends BaseCommand { @@ -34,6 +35,7 @@ class CreateSuperadmin extends BaseCommand */ private array $validationRules = []; + #[Override] public function run(array $params): void { // first, check that super admin does not exist diff --git a/modules/Install/Commands/InitDatabase.php b/modules/Install/Commands/InitDatabase.php index 7f433487..7f4b22a8 100644 --- a/modules/Install/Commands/InitDatabase.php +++ b/modules/Install/Commands/InitDatabase.php @@ -7,6 +7,7 @@ namespace Modules\Install\Commands; use CodeIgniter\CLI\BaseCommand; use Config\Database; use Config\Services; +use Override; class InitDatabase extends BaseCommand { @@ -25,6 +26,7 @@ class InitDatabase extends BaseCommand */ protected $description = 'Runs all database migrations for Castopod.'; + #[Override] public function run(array $params): void { // Run all migrations diff --git a/modules/Install/Controllers/InstallController.php b/modules/Install/Controllers/InstallController.php index 6a967e8c..1389ff3c 100644 --- a/modules/Install/Controllers/InstallController.php +++ b/modules/Install/Controllers/InstallController.php @@ -23,6 +23,7 @@ use Config\Services; use Dotenv\Dotenv; use Dotenv\Exception\ValidationException; use Modules\Auth\Models\UserModel; +use Override; use Psr\Log\LoggerInterface; use Throwable; use ViewThemes\Theme; @@ -37,6 +38,7 @@ class InstallController extends Controller /** * Constructor. */ + #[Override] public function initController( RequestInterface $request, ResponseInterface $response, diff --git a/modules/Media/Database/Migrations/2021-05-29-120000_add_media.php b/modules/Media/Database/Migrations/2021-05-29-120000_add_media.php index f2e86573..d7409038 100644 --- a/modules/Media/Database/Migrations/2021-05-29-120000_add_media.php +++ b/modules/Media/Database/Migrations/2021-05-29-120000_add_media.php @@ -11,9 +11,11 @@ declare(strict_types=1); namespace Media\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddMedia extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -78,6 +80,7 @@ class AddMedia extends BaseMigration $this->forge->createTable('media'); } + #[Override] public function down(): void { $this->forge->dropTable('media'); diff --git a/modules/Media/Database/Migrations/2022-30-12-180000_rename_media_file_path.php b/modules/Media/Database/Migrations/2022-30-12-180000_rename_media_file_path.php index 1cd9c196..14b54394 100644 --- a/modules/Media/Database/Migrations/2022-30-12-180000_rename_media_file_path.php +++ b/modules/Media/Database/Migrations/2022-30-12-180000_rename_media_file_path.php @@ -11,9 +11,11 @@ declare(strict_types=1); namespace Media\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class RenameMediafileKey extends BaseMigration { + #[Override] public function up(): void { $fields = [ @@ -26,6 +28,7 @@ class RenameMediafileKey extends BaseMigration $this->forge->modifyColumn('media', $fields); } + #[Override] public function down(): void { $fields = [ diff --git a/modules/Media/Entities/Audio.php b/modules/Media/Entities/Audio.php index 7637099d..2219a537 100644 --- a/modules/Media/Entities/Audio.php +++ b/modules/Media/Entities/Audio.php @@ -12,6 +12,7 @@ namespace Modules\Media\Entities; use CodeIgniter\Files\File; use JamesHeinrich\GetID3\GetID3; +use Override; /** * @property float $duration @@ -21,6 +22,7 @@ class Audio extends BaseMedia { protected string $type = 'audio'; + #[Override] public function initFileProperties(): void { parent::initFileProperties(); @@ -31,6 +33,7 @@ class Audio extends BaseMedia } } + #[Override] public function setFile(File $file): self { parent::setFile($file); diff --git a/modules/Media/Entities/BaseMedia.php b/modules/Media/Entities/BaseMedia.php index f7566ab7..206ad115 100644 --- a/modules/Media/Entities/BaseMedia.php +++ b/modules/Media/Entities/BaseMedia.php @@ -13,6 +13,7 @@ namespace Modules\Media\Entities; use CodeIgniter\Entity\Entity; use CodeIgniter\Files\File; use Modules\Media\Models\MediaModel; +use Override; use RuntimeException; /** @@ -59,6 +60,7 @@ class BaseMedia extends Entity /** * @param array $data */ + #[Override] public function injectRawData(array $data): static { parent::injectRawData($data); diff --git a/modules/Media/Entities/Chapters.php b/modules/Media/Entities/Chapters.php index e3f2ef2e..44cbfc54 100644 --- a/modules/Media/Entities/Chapters.php +++ b/modules/Media/Entities/Chapters.php @@ -12,11 +12,13 @@ namespace Modules\Media\Entities; use CodeIgniter\Files\File; use Exception; +use Override; class Chapters extends BaseMedia { protected string $type = 'chapters'; + #[Override] public function initFileProperties(): void { parent::initFileProperties(); @@ -28,6 +30,7 @@ class Chapters extends BaseMedia } } + #[Override] public function setFile(File $file): self { parent::setFile($file); diff --git a/modules/Media/Entities/Image.php b/modules/Media/Entities/Image.php index a5c265d9..db2ffa45 100644 --- a/modules/Media/Entities/Image.php +++ b/modules/Media/Entities/Image.php @@ -13,6 +13,7 @@ namespace Modules\Media\Entities; use CodeIgniter\Files\File; use Config\Services; use GdImage; +use Override; /** * @property array $sizes @@ -26,6 +27,7 @@ class Image extends BaseMedia */ protected array $sizes = []; + #[Override] public function initFileProperties(): void { parent::initFileProperties(); @@ -55,6 +57,7 @@ class Image extends BaseMedia /** * @param array $data */ + #[Override] public function injectRawData(array $data): static { parent::injectRawData($data); @@ -73,6 +76,7 @@ class Image extends BaseMedia return $this; } + #[Override] public function setFile(File $file): self { parent::setFile($file); @@ -95,6 +99,7 @@ class Image extends BaseMedia return $this; } + #[Override] public function saveFile(): void { if ($this->attributes['sizes'] !== []) { @@ -105,6 +110,7 @@ class Image extends BaseMedia parent::saveFile(); } + #[Override] public function deleteFile(): bool { if (parent::deleteFile()) { diff --git a/modules/Media/Entities/Transcript.php b/modules/Media/Entities/Transcript.php index 56302e21..160d9551 100644 --- a/modules/Media/Entities/Transcript.php +++ b/modules/Media/Entities/Transcript.php @@ -13,6 +13,7 @@ namespace Modules\Media\Entities; use CodeIgniter\Files\File; use Exception; use Modules\Media\TranscriptParser; +use Override; class Transcript extends BaseMedia { @@ -22,6 +23,7 @@ class Transcript extends BaseMedia protected string $type = 'transcript'; + #[Override] public function initFileProperties(): void { parent::initFileProperties(); @@ -35,6 +37,7 @@ class Transcript extends BaseMedia } } + #[Override] public function setFile(File $file): self { parent::setFile($file); @@ -58,6 +61,7 @@ class Transcript extends BaseMedia return $this; } + #[Override] public function saveFile(): void { $this->saveJsonTranscript(); @@ -65,6 +69,7 @@ class Transcript extends BaseMedia parent::saveFile(); } + #[Override] public function deleteFile(): bool { if (! parent::deleteFile()) { diff --git a/modules/Media/FileManagers/FS.php b/modules/Media/FileManagers/FS.php index dfca7ed0..e58001df 100644 --- a/modules/Media/FileManagers/FS.php +++ b/modules/Media/FileManagers/FS.php @@ -7,6 +7,7 @@ namespace Modules\Media\FileManagers; use CodeIgniter\Files\File; use Exception; use Modules\Media\Config\Media as MediaConfig; +use Override; class FS implements FileManagerInterface { @@ -19,6 +20,7 @@ class FS implements FileManagerInterface /** * Saves a file to the corresponding folder in `public/media` */ + #[Override] public function save(File $file, string $key): string { helper('media'); @@ -46,6 +48,7 @@ class FS implements FileManagerInterface return $key; } + #[Override] public function delete(string $key): bool { helper('media'); @@ -53,11 +56,13 @@ class FS implements FileManagerInterface return @unlink($this->media_path_absolute($key)); } + #[Override] public function getUrl(string $key): string { return media_url($this->config->root . '/' . $key); } + #[Override] public function rename(string $oldKey, string $newKey): bool { helper('media'); @@ -65,6 +70,7 @@ class FS implements FileManagerInterface return rename($this->media_path_absolute($oldKey), $this->media_path_absolute($newKey)); } + #[Override] public function getFileContents(string $key): string|false { helper('media'); @@ -72,6 +78,7 @@ class FS implements FileManagerInterface return file_get_contents($this->media_path_absolute($key)); } + #[Override] public function getFileInput(string $key): string { helper('media'); @@ -79,6 +86,7 @@ class FS implements FileManagerInterface return $this->media_path_absolute($key); } + #[Override] public function deletePodcastImageSizes(string $podcastHandle): bool { foreach (['jpg', 'jpeg', 'png', 'webp'] as $ext) { @@ -88,6 +96,7 @@ class FS implements FileManagerInterface return true; } + #[Override] public function deletePersonImagesSizes(): bool { foreach (['jpg', 'jpeg', 'png', 'webp'] as $ext) { @@ -97,6 +106,7 @@ class FS implements FileManagerInterface return true; } + #[Override] public function deleteAll(string $prefix, string $pattern = '*'): bool { helper('media'); @@ -123,6 +133,7 @@ class FS implements FileManagerInterface return true; } + #[Override] public function isHealthy(): bool { helper('media'); diff --git a/modules/Media/FileManagers/S3.php b/modules/Media/FileManagers/S3.php index d3cf7f92..ef96de59 100644 --- a/modules/Media/FileManagers/S3.php +++ b/modules/Media/FileManagers/S3.php @@ -9,6 +9,7 @@ use Aws\S3\S3Client; use CodeIgniter\Files\File; use Exception; use Modules\Media\Config\Media as MediaConfig; +use Override; class S3 implements FileManagerInterface { @@ -27,6 +28,7 @@ class S3 implements FileManagerInterface ]); } + #[Override] public function save(File $file, string $key): string { $this->s3->putObject([ @@ -44,6 +46,7 @@ class S3 implements FileManagerInterface return $key; } + #[Override] public function delete(string $key): bool { try { @@ -58,11 +61,13 @@ class S3 implements FileManagerInterface return true; } + #[Override] public function getUrl(string $key): string { return media_url($this->prefixKey($key)); } + #[Override] public function rename(string $oldKey, string $newKey): bool { try { @@ -81,6 +86,7 @@ class S3 implements FileManagerInterface return $this->delete($oldKey); } + #[Override] public function getFileContents(string $key): string|false { try { @@ -95,11 +101,13 @@ class S3 implements FileManagerInterface return (string) $result->get('Body'); } + #[Override] public function getFileInput(string $key): string { return $this->getUrl($key); } + #[Override] public function deletePodcastImageSizes(string $podcastHandle): bool { foreach (['jpg', 'jpeg', 'png', 'webp'] as $ext) { @@ -109,6 +117,7 @@ class S3 implements FileManagerInterface return true; } + #[Override] public function deletePersonImagesSizes(): bool { foreach (['jpg', 'jpeg', 'png', 'webp'] as $ext) { @@ -118,6 +127,7 @@ class S3 implements FileManagerInterface return true; } + #[Override] public function deleteAll(string $prefix, ?string $pattern = '*'): bool { $prefix = rtrim($this->prefixKey($prefix), '/') . '/'; // make sure that there is a trailing slash @@ -161,6 +171,7 @@ class S3 implements FileManagerInterface return true; } + #[Override] public function isHealthy(): bool { // check that bucket exists diff --git a/modules/MediaClipper/Commands/Generate.php b/modules/MediaClipper/Commands/Generate.php index 9ceb0825..dc604d5c 100644 --- a/modules/MediaClipper/Commands/Generate.php +++ b/modules/MediaClipper/Commands/Generate.php @@ -10,6 +10,7 @@ use CodeIgniter\Files\File; use CodeIgniter\I18n\Time; use Exception; use Modules\MediaClipper\VideoClipper; +use Override; class Generate extends BaseCommand { @@ -19,6 +20,7 @@ class Generate extends BaseCommand protected $description = 'Displays basic application information.'; + #[Override] public function run(array $params): void { // get number of running clips to prevent from having too much running in parallel diff --git a/modules/MediaClipper/VideoClipper.php b/modules/MediaClipper/VideoClipper.php index 5f5a1292..7de153a4 100644 --- a/modules/MediaClipper/VideoClipper.php +++ b/modules/MediaClipper/VideoClipper.php @@ -25,7 +25,7 @@ class VideoClipper /** * @var array */ - final public const FONTS = [ + final public const array FONTS = [ 'episodeTitle' => 'Rubik-Bold.ttf', 'podcastTitle' => 'Inter-Regular.otf', 'subtitles' => 'Inter-SemiBold', diff --git a/modules/Plugins/Commands/InstallCommand.php b/modules/Plugins/Commands/InstallCommand.php index fa3efc3e..b2ca8c07 100644 --- a/modules/Plugins/Commands/InstallCommand.php +++ b/modules/Plugins/Commands/InstallCommand.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Modules\Fediverse\Commands; use CodeIgniter\CLI\BaseCommand; +use Override; class InstallCommand extends BaseCommand { /** * @param array $params */ + #[Override] public function run(array $params): void { // TODO: diff --git a/modules/Plugins/Commands/UninstallPlugin.php b/modules/Plugins/Commands/UninstallPlugin.php index 8a2aacb3..bd573875 100644 --- a/modules/Plugins/Commands/UninstallPlugin.php +++ b/modules/Plugins/Commands/UninstallPlugin.php @@ -7,6 +7,7 @@ namespace Modules\Plugins\Commands; use CodeIgniter\CLI\BaseCommand; use CodeIgniter\CLI\CLI; use Modules\Plugins\Core\Plugins; +use Override; class UninstallPlugin extends BaseCommand { @@ -50,6 +51,7 @@ class UninstallPlugin extends BaseCommand /** * @param list $pluginKeys */ + #[Override] public function run(array $pluginKeys): int { /** @var Plugins $plugins */ diff --git a/modules/Plugins/Core/BasePlugin.php b/modules/Plugins/Core/BasePlugin.php index 211ed0b8..985c095f 100644 --- a/modules/Plugins/Core/BasePlugin.php +++ b/modules/Plugins/Core/BasePlugin.php @@ -21,6 +21,7 @@ use Modules\Plugins\Manifest\Manifest; use Modules\Plugins\Manifest\Person; use Modules\Plugins\Manifest\Repository; use Modules\Plugins\Manifest\Settings; +use Override; /** * @property string $key @@ -70,22 +71,27 @@ abstract class BasePlugin implements PluginInterface $this->{$name} = $value; } + #[Override] public function rssBeforeChannel(Podcast $podcast): void { } + #[Override] public function rssAfterChannel(Podcast $podcast, SimpleRSSElement $channel): void { } + #[Override] public function rssBeforeItem(Episode $episode): void { } + #[Override] public function rssAfterItem(Episode $episode, SimpleRSSElement $item): void { } + #[Override] public function siteHead(): void { } diff --git a/modules/Plugins/Core/Markdown.php b/modules/Plugins/Core/Markdown.php index 0dd36b23..318a8562 100644 --- a/modules/Plugins/Core/Markdown.php +++ b/modules/Plugins/Core/Markdown.php @@ -10,6 +10,7 @@ use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension; use League\CommonMark\Extension\DisallowedRawHtml\DisallowedRawHtmlExtension; use League\CommonMark\Extension\SmartPunct\SmartPunctExtension; use League\CommonMark\MarkdownConverter; +use Override; use Stringable; class Markdown implements Stringable @@ -19,6 +20,7 @@ class Markdown implements Stringable ) { } + #[Override] public function __toString(): string { return $this->markdown; diff --git a/modules/Plugins/Manifest/Person.php b/modules/Plugins/Manifest/Person.php index 3a4a0927..581c8a90 100644 --- a/modules/Plugins/Manifest/Person.php +++ b/modules/Plugins/Manifest/Person.php @@ -6,6 +6,7 @@ namespace Modules\Plugins\Manifest; use CodeIgniter\HTTP\URI; use Exception; +use Override; /** * @property string $name @@ -35,6 +36,7 @@ class Person extends ManifestObject protected ?URI $url = null; + #[Override] public function loadData(array|string $data): void { if (is_string($data)) { diff --git a/modules/PodcastImport/Commands/PodcastImport.php b/modules/PodcastImport/Commands/PodcastImport.php index 3a07724c..4985faf0 100644 --- a/modules/PodcastImport/Commands/PodcastImport.php +++ b/modules/PodcastImport/Commands/PodcastImport.php @@ -23,6 +23,7 @@ use Modules\Auth\Models\UserModel; use Modules\Platforms\Models\PlatformModel; use Modules\PodcastImport\Entities\PodcastImportTask; use Modules\PodcastImport\Entities\TaskStatus; +use Override; use PodcastFeed\PodcastFeed; use PodcastFeed\Tags\Podcast\PodcastPerson; use PodcastFeed\Tags\RSS\Channel; @@ -91,6 +92,7 @@ class PodcastImport extends BaseCommand $this->podcastFeed = new PodcastFeed($this->importTask->feed_url); } + #[Override] public function run(array $params): void { // FIXME: getting named routes doesn't work from v4.3 anymore, so loading all routes before importing diff --git a/modules/PremiumPodcasts/Database/Migrations/2022-07-07-120000_add_subscriptions.php b/modules/PremiumPodcasts/Database/Migrations/2022-07-07-120000_add_subscriptions.php index 5f7abaaa..57fa8dfd 100644 --- a/modules/PremiumPodcasts/Database/Migrations/2022-07-07-120000_add_subscriptions.php +++ b/modules/PremiumPodcasts/Database/Migrations/2022-07-07-120000_add_subscriptions.php @@ -11,9 +11,11 @@ declare(strict_types=1); namespace Modules\PremiumPodcasts\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddSubscriptions extends BaseMigration { + #[Override] public function up(): void { $this->forge->addField([ @@ -73,6 +75,7 @@ class AddSubscriptions extends BaseMigration $this->forge->createTable('subscriptions'); } + #[Override] public function down(): void { $this->forge->dropTable('subscriptions'); diff --git a/modules/PremiumPodcasts/Filters/PodcastUnlockFilter.php b/modules/PremiumPodcasts/Filters/PodcastUnlockFilter.php index 965b2036..cb8d3f56 100644 --- a/modules/PremiumPodcasts/Filters/PodcastUnlockFilter.php +++ b/modules/PremiumPodcasts/Filters/PodcastUnlockFilter.php @@ -11,6 +11,7 @@ use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Router\Router; use Modules\PremiumPodcasts\PremiumPodcasts; +use Override; class PodcastUnlockFilter implements FilterInterface { @@ -21,6 +22,7 @@ class PodcastUnlockFilter implements FilterInterface * * @return RequestInterface|ResponseInterface|string|void */ + #[Override] public function before(RequestInterface $request, $arguments = null) { if (! function_exists('is_unlocked')) { @@ -79,6 +81,7 @@ class PodcastUnlockFilter implements FilterInterface /** * @param string[]|null $arguments */ + #[Override] public function after(RequestInterface $request, ResponseInterface $response, $arguments = null): void { } diff --git a/modules/Update/Commands/DatabaseUpdate.php b/modules/Update/Commands/DatabaseUpdate.php index 1b7b6b39..bda484b0 100644 --- a/modules/Update/Commands/DatabaseUpdate.php +++ b/modules/Update/Commands/DatabaseUpdate.php @@ -6,6 +6,7 @@ namespace Modules\Update\Commands; use CodeIgniter\CLI\BaseCommand; use Config\Services; +use Override; class DatabaseUpdate extends BaseCommand { @@ -24,6 +25,7 @@ class DatabaseUpdate extends BaseCommand */ protected $description = 'Runs all new database migrations for Castopod.'; + #[Override] public function run(array $params): void { $migrate = Services::migrations(); diff --git a/modules/WebSub/Commands/Publish.php b/modules/WebSub/Commands/Publish.php index 1b167865..9ecd6bfd 100644 --- a/modules/WebSub/Commands/Publish.php +++ b/modules/WebSub/Commands/Publish.php @@ -9,6 +9,7 @@ use App\Models\PodcastModel; use CodeIgniter\CLI\BaseCommand; use CodeIgniter\HTTP\CURLRequest; use Exception; +use Override; class Publish extends BaseCommand { @@ -18,6 +19,7 @@ class Publish extends BaseCommand protected $description = 'Publishes feed updates to websub hubs.'; + #[Override] public function run(array $params): void { if (ENVIRONMENT !== 'production') { diff --git a/modules/WebSub/Database/Migrations/2022-03-07-180000_add_is_published_on_hubs_to_podcasts.php b/modules/WebSub/Database/Migrations/2022-03-07-180000_add_is_published_on_hubs_to_podcasts.php index a5297b65..179e1bf9 100644 --- a/modules/WebSub/Database/Migrations/2022-03-07-180000_add_is_published_on_hubs_to_podcasts.php +++ b/modules/WebSub/Database/Migrations/2022-03-07-180000_add_is_published_on_hubs_to_podcasts.php @@ -11,9 +11,11 @@ declare(strict_types=1); namespace Modules\WebSub\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddIsPublishedOnHubsToPodcasts extends BaseMigration { + #[Override] public function up(): void { $this->forge->addColumn('podcasts', [ @@ -26,6 +28,7 @@ class AddIsPublishedOnHubsToPodcasts extends BaseMigration ]); } + #[Override] public function down(): void { $this->forge->dropColumn('podcasts', 'is_published_on_hubs'); diff --git a/modules/WebSub/Database/Migrations/2022-03-07-181500_add_is_published_on_hubs_to_episodes.php b/modules/WebSub/Database/Migrations/2022-03-07-181500_add_is_published_on_hubs_to_episodes.php index 05ee0d0b..b57be027 100644 --- a/modules/WebSub/Database/Migrations/2022-03-07-181500_add_is_published_on_hubs_to_episodes.php +++ b/modules/WebSub/Database/Migrations/2022-03-07-181500_add_is_published_on_hubs_to_episodes.php @@ -11,9 +11,11 @@ declare(strict_types=1); namespace Modules\WebSub\Database\Migrations; use App\Database\Migrations\BaseMigration; +use Override; class AddIsPublishedOnHubsToEpisodes extends BaseMigration { + #[Override] public function up(): void { $this->forge->addColumn('episodes', [ @@ -26,6 +28,7 @@ class AddIsPublishedOnHubsToEpisodes extends BaseMigration ]); } + #[Override] public function down(): void { $this->forge->dropColumn('episodes', 'is_published_on_hubs'); diff --git a/public/index.php b/public/index.php index 231a2e3b..e4a895b5 100644 --- a/public/index.php +++ b/public/index.php @@ -11,7 +11,7 @@ use Config\Paths; *--------------------------------------------------------------- */ -$minPhpVersion = '8.1'; // If you update this, don't forget to update `spark`. +$minPhpVersion = '8.3'; // If you update this, don't forget to update `spark`. if (version_compare(PHP_VERSION, $minPhpVersion, '<')) { $message = sprintf( 'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s', diff --git a/rector.php b/rector.php index ee49c79a..0ad340ec 100644 --- a/rector.php +++ b/rector.php @@ -18,8 +18,8 @@ use Rector\ValueObject\PhpVersion; return RectorConfig::configure() ->withPaths([__DIR__ . '/app', __DIR__ . '/modules', __DIR__ . '/tests', __DIR__ . '/public']) ->withBootstrapFiles([__DIR__ . '/vendor/codeigniter4/framework/system/Test/bootstrap.php']) - ->withPhpVersion(PhpVersion::PHP_81) - ->withPhpSets(php81: true) + ->withPhpVersion(PhpVersion::PHP_83) + ->withPhpSets(php83: true) ->withPreparedSets( typeDeclarations: true, codeQuality: true, diff --git a/spark b/spark index 1bb9ba67..9de70fa5 100644 --- a/spark +++ b/spark @@ -37,7 +37,7 @@ if (strpos(PHP_SAPI, 'cgi') === 0) { *--------------------------------------------------------------- */ -$minPhpVersion = '8.1'; // If you update this, don't forget to update `public/index.php`. +$minPhpVersion = '8.3'; // If you update this, don't forget to update `public/index.php`. if (version_compare(PHP_VERSION, $minPhpVersion, '<')) { $message = sprintf( 'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s', diff --git a/tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php b/tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php index 9609c8c0..faf98ca8 100644 --- a/tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php +++ b/tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Tests\Support\Database\Migrations; use CodeIgniter\Database\Migration; +use Override; class ExampleMigration extends Migration { @@ -13,6 +14,7 @@ class ExampleMigration extends Migration */ protected $DBGroup = 'tests'; + #[Override] public function up(): void { $fields = [ @@ -61,6 +63,7 @@ class ExampleMigration extends Migration $this->forge->createTable('factories'); } + #[Override] public function down(): void { $this->forge->dropTable('factories'); diff --git a/tests/_support/Database/Seeds/ExampleSeeder.php b/tests/_support/Database/Seeds/ExampleSeeder.php index ddb0a6b5..52a4bed6 100644 --- a/tests/_support/Database/Seeds/ExampleSeeder.php +++ b/tests/_support/Database/Seeds/ExampleSeeder.php @@ -5,9 +5,11 @@ declare(strict_types=1); namespace Tests\Support\Database\Seeds; use CodeIgniter\Database\Seeder; +use Override; class ExampleSeeder extends Seeder { + #[Override] public function run(): void { $factories = [ diff --git a/tests/_support/Database/Seeds/FakeSinglePodcastApiSeeder.php b/tests/_support/Database/Seeds/FakeSinglePodcastApiSeeder.php index a5bc51ef..27906d76 100644 --- a/tests/_support/Database/Seeds/FakeSinglePodcastApiSeeder.php +++ b/tests/_support/Database/Seeds/FakeSinglePodcastApiSeeder.php @@ -7,6 +7,7 @@ namespace Tests\Support\Database\Seeds; use App\Database\Seeds\AppSeeder; use App\Database\Seeds\DevSeeder; use CodeIgniter\Database\Seeder; +use Override; class FakeSinglePodcastApiSeeder extends Seeder { @@ -188,6 +189,7 @@ class FakeSinglePodcastApiSeeder extends Seeder ]; } + #[Override] public function run(): void { $this->call(AppSeeder::class);