Skip to content
Snippets Groups Projects
Commit 958c1213 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

chore: update codeigniter4 after 4.1.7 hot fix release

parent 00987610
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,7 @@ class Toolbar extends BaseConfig ...@@ -37,8 +37,7 @@ class Toolbar extends BaseConfig
*/ */
public array $collectors = [ public array $collectors = [
Timers::class, Timers::class,
// TODO: uncomment when fixed: https://github.com/codeigniter4/CodeIgniter4/issues/5539 Database::class,
// Database::class,
Logs::class, Logs::class,
Views::class, Views::class,
// Cache::class, // Cache::class,
......
...@@ -87,18 +87,22 @@ class EpisodeComment extends UuidEntity ...@@ -87,18 +87,22 @@ class EpisodeComment extends UuidEntity
/** /**
* Returns the comment's actor * Returns the comment's actor
*
* @noRector ReturnTypeDeclarationRector
*/ */
public function getActor(): Actor public function getActor(): ?Actor
{ {
if ($this->actor_id === null) { if ($this->actor_id === null) {
throw new RuntimeException('Comment must have an actor_id before getting actor.'); throw new RuntimeException('Comment must have an actor_id before getting actor.');
} }
if ($this->actor === null) { if ($this->actor === null) {
// @phpstan-ignore-next-line
$this->actor = model(ActorModel::class, false) $this->actor = model(ActorModel::class, false)
->getActorById($this->actor_id); ->getActorById($this->actor_id);
} }
// @phpstan-ignore-next-line
return $this->actor; return $this->actor;
} }
...@@ -123,6 +127,9 @@ class EpisodeComment extends UuidEntity ...@@ -123,6 +127,9 @@ class EpisodeComment extends UuidEntity
return $this->getReplies() !== []; return $this->getReplies() !== [];
} }
/**
* @noRector ReturnTypeDeclarationRector
*/
public function getReplyToComment(): ?self public function getReplyToComment(): ?self
{ {
if ($this->in_reply_to_id === null) { if ($this->in_reply_to_id === null) {
......
...@@ -182,17 +182,22 @@ class Podcast extends Entity ...@@ -182,17 +182,22 @@ class Podcast extends Entity
'updated_by' => 'integer', 'updated_by' => 'integer',
]; ];
public function getActor(): Actor /**
* @noRector ReturnTypeDeclarationRector
*/
public function getActor(): ?Actor
{ {
if ($this->actor_id === 0) { if ($this->actor_id === 0) {
throw new RuntimeException('Podcast must have an actor_id before getting actor.'); throw new RuntimeException('Podcast must have an actor_id before getting actor.');
} }
if ($this->actor === null) { if ($this->actor === null) {
// @phpstan-ignore-next-line
$this->actor = model(ActorModel::class) $this->actor = model(ActorModel::class)
->getActorById($this->actor_id); ->getActorById($this->actor_id);
} }
// @phpstan-ignore-next-line
return $this->actor; return $this->actor;
} }
......
...@@ -106,12 +106,12 @@ ...@@ -106,12 +106,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/codeigniter4/CodeIgniter4.git", "url": "https://github.com/codeigniter4/CodeIgniter4.git",
"reference": "0755553a4259fbacc799395ca8a5546c5e979c45" "reference": "8449d13724d460a4e5573f49027cd9f862449a29"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/codeigniter4/CodeIgniter4/zipball/0755553a4259fbacc799395ca8a5546c5e979c45", "url": "https://api.github.com/repos/codeigniter4/CodeIgniter4/zipball/8449d13724d460a4e5573f49027cd9f862449a29",
"reference": "0755553a4259fbacc799395ca8a5546c5e979c45", "reference": "8449d13724d460a4e5573f49027cd9f862449a29",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
"phpstan/phpstan": "^1.0", "phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^9.1", "phpunit/phpunit": "^9.1",
"predis/predis": "^1.1", "predis/predis": "^1.1",
"rector/rector": "0.12.10" "rector/rector": "0.12.11"
}, },
"suggest": { "suggest": {
"ext-fileinfo": "Improves mime type detection for files" "ext-fileinfo": "Improves mime type detection for files"
...@@ -155,6 +155,7 @@ ...@@ -155,6 +155,7 @@
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
"CodeIgniter\\": "tests/system/", "CodeIgniter\\": "tests/system/",
"CodeIgniter\\AutoReview\\": "tests/AutoReview/",
"Utils\\": "utils/" "Utils\\": "utils/"
} }
}, },
...@@ -183,7 +184,7 @@ ...@@ -183,7 +184,7 @@
"slack": "https://codeigniterchat.slack.com", "slack": "https://codeigniterchat.slack.com",
"issues": "https://github.com/codeigniter4/CodeIgniter4/issues" "issues": "https://github.com/codeigniter4/CodeIgniter4/issues"
}, },
"time": "2022-01-04T07:11:09+00:00" "time": "2022-01-10T01:36:11+00:00"
}, },
{ {
"name": "codeigniter4/settings", "name": "codeigniter4/settings",
......
...@@ -30,7 +30,6 @@ parameters: ...@@ -30,7 +30,6 @@ parameters:
- '#Function "property_exists\(\)" cannot be used/left in the code#' - '#Function "property_exists\(\)" cannot be used/left in the code#'
- '#Instead of "instanceof/is_a\(\)" use ReflectionProvider service or "\(new ObjectType\(<desired_type\>\)\)\-\>isSuperTypeOf\(<element_type\>\)" for static reflection to work#' - '#Instead of "instanceof/is_a\(\)" use ReflectionProvider service or "\(new ObjectType\(<desired_type\>\)\)\-\>isSuperTypeOf\(<element_type\>\)" for static reflection to work#'
- '#^Access to an undefined property App\\Entities\\Media\\Image#' - '#^Access to an undefined property App\\Entities\\Media\\Image#'
- '#^Call to an undefined method CodeIgniter\\Model#'
- '#^Access to an undefined property CodeIgniter\\Database\\BaseBuilder#' - '#^Access to an undefined property CodeIgniter\\Database\\BaseBuilder#'
- -
message: '#Function "function_exists\(\)" cannot be used/left in the code#' message: '#Function "function_exists\(\)" cannot be used/left in the code#'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment