build(php): upgrade min php version to 8.3

This commit is contained in:
Yassine Doghri 2024-05-29 10:24:13 +00:00
commit b5bd2db28f
182 changed files with 517 additions and 115 deletions

View file

@ -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 <yassine@doghri.fr>"

View file

@ -1,4 +1,4 @@
image: code.castopod.org:5050/adaures/castopod:ci
image: code.castopod.org:5050/adaures/castopod:ci-php8.3
stages:
- prepare

View file

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

View file

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

View file

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

View file

@ -21,7 +21,7 @@ class WebmanifestController extends Controller
/**
* @var array<string, array<string, string>>
*/
final public const THEME_COLORS = [
final public const array THEME_COLORS = [
'pine' => [
'theme' => '#009486',
'background' => '#F0F9F8',

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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'];

View file

@ -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'];

View file

@ -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'];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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')) {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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 = '';

View file

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

View file

@ -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 === []) {

View file

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

View file

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

View file

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

View file

@ -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 = '';

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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 === '' ? '' : '<p class="text-sm text-skin-muted">' . $this->subtitle . '</p>';

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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 <yassine@doghri.fr>"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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<string>} $config
*/
#[Override]
public function routes(RouteCollection &$routes, array $config = []): void
{
$authRoutes = config('AuthRoutes')

View file

@ -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<string, string>
*/
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

View file

@ -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')) {

View file

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

View file

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

View file

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

View file

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

View file

@ -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'];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -28,7 +28,7 @@ class HttpSignature
/**
* @var string
*/
private const SIGNATURE_PATTERN = '/
private const string SIGNATURE_PATTERN = '/
(?=.*(keyId="(?P<keyId>https?:\/\/[\w\-\.]+[\w]+(:[\d]+)?[\w\-\.#\/@]+)"))
(?=.*(signature="(?P<signature>[\w+\/]+={0,2})"))
(?=.*(headers="\(request-target\)(?P<headers>[\w\\-\s]+)"))?

View file

@ -18,7 +18,7 @@ class WebFinger
/**
* @var string
*/
private const RESOURCE_PATTERN = '/^acct:(?P<username>([\w_]+))@(?P<domain>([\w\-\.]+[\w]+)(:[\d]+)?)$/x';
private const string RESOURCE_PATTERN = '/^acct:(?P<username>([\w_]+))@(?P<domain>([\w\-\.]+[\w]+)(:[\d]+)?)$/x';
protected string $username;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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<string, mixed> $data
*/
#[Override]
public function injectRawData(array $data): static
{
parent::injectRawData($data);

View file

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

View file

@ -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<string, string> $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()) {

View file

@ -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()) {

View file

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

View file

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

View file

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

View file

@ -25,7 +25,7 @@ class VideoClipper
/**
* @var array<string, string>
*/
final public const FONTS = [
final public const array FONTS = [
'episodeTitle' => 'Rubik-Bold.ttf',
'podcastTitle' => 'Inter-Regular.otf',
'subtitles' => 'Inter-SemiBold',

View file

@ -5,12 +5,14 @@ declare(strict_types=1);
namespace Modules\Fediverse\Commands;
use CodeIgniter\CLI\BaseCommand;
use Override;
class InstallCommand extends BaseCommand
{
/**
* @param array<int|string, string|null> $params
*/
#[Override]
public function run(array $params): void
{
// TODO:

View file

@ -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<string> $pluginKeys
*/
#[Override]
public function run(array $pluginKeys): int
{
/** @var Plugins $plugins */

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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') {

View file

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

View file

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

View file

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

View file

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

2
spark
View file

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

View file

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

View file

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

View file

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