Skip to content

Patch framework (v4.6.0 => v4.6.1) #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/Config/Autoload.php
Original file line number Diff line number Diff line change
@@ -17,8 +17,6 @@
*
* NOTE: This class is required prior to Autoloader instantiation,
* and does not extend BaseConfig.
*
* @immutable
*/
class Autoload extends AutoloadConfig
{
1 change: 1 addition & 0 deletions app/Config/Cache.php
Original file line number Diff line number Diff line change
@@ -107,6 +107,7 @@ class Cache extends BaseConfig
* -------------------------------------------------------------------------
* Redis settings
* -------------------------------------------------------------------------
*
* Your Redis server can be specified below, if you are using
* the Redis or Predis drivers.
*
3 changes: 0 additions & 3 deletions app/Config/DocTypes.php
Original file line number Diff line number Diff line change
@@ -2,9 +2,6 @@

namespace Config;

/**
* @immutable
*/
class DocTypes
{
/**
6 changes: 2 additions & 4 deletions app/Config/Mimes.php
Original file line number Diff line number Diff line change
@@ -3,8 +3,6 @@
namespace Config;

/**
* Mimes
*
* This file contains an array of mime types. It is used by the
* Upload class to help identify allowed file types.
*
@@ -15,8 +13,6 @@
*
* When working with mime types, please make sure you have the ´fileinfo´
* extension enabled to reliably detect the media types.
*
* @immutable
*/
class Mimes
{
@@ -482,6 +478,8 @@ class Mimes
'application/sla',
'application/vnd.ms-pki.stl',
'application/x-navistyle',
'model/stl',
'application/octet-stream',
],
];

2 changes: 0 additions & 2 deletions app/Config/Modules.php
Original file line number Diff line number Diff line change
@@ -9,8 +9,6 @@
*
* NOTE: This class is required prior to Autoloader instantiation,
* and does not extend BaseConfig.
*
* @immutable
*/
class Modules extends BaseModules
{
2 changes: 0 additions & 2 deletions app/Config/Optimize.php
Original file line number Diff line number Diff line change
@@ -7,8 +7,6 @@
*
* NOTE: This class does not extend BaseConfig for performance reasons.
* So you cannot replace the property values with Environment Variables.
*
* @immutable
*/
class Optimize
{
3 changes: 3 additions & 0 deletions app/Config/Paths.php
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@
* share a system folder between multiple applications, and more.
*
* All paths are relative to the project's root folder.
*
* NOTE: This class is required prior to Autoloader instantiation,
* and does not extend BaseConfig.
*/
class Paths
{
2 changes: 1 addition & 1 deletion app/Libraries/Blog.php
Original file line number Diff line number Diff line change
@@ -116,7 +116,7 @@ public function getPopularPosts(int $limit = 5)
foreach ($files as $file) {
foreach ($slugs as $slug => $count) {
try {
if (stripos($file, $slug) !== false) {
if (str_contains(strtolower($file), strtolower($slug))) {
$posts[$count] = $this->getPost($slug);
}
}
4 changes: 2 additions & 2 deletions app/Views/errors/html/debug.css
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
--main-text-color: #555;
--dark-text-color: #222;
--light-text-color: #c7c7c7;
--brand-primary-color: #E06E3F;
--brand-primary-color: #DC4814;
--light-bg-color: #ededee;
--dark-bg-color: #404040;
}
@@ -71,7 +71,7 @@ p.lead {
text-align: center;
padding: calc(4px + 0.2083vw);
width: 100%;
margin-top: -2.14rem;
top: 0;
position: fixed;
}

526 changes: 294 additions & 232 deletions composer.lock

Large diffs are not rendered by default.

83 changes: 42 additions & 41 deletions deptrac.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:
deptrac:
paths:
- ./app/
- ./vendor/codeigniter4/framework/system/
@@ -9,90 +9,90 @@ parameters:
collectors:
- type: bool
must:
- type: className
regex: .*[A-Za-z]+Model$
- type: class
value: .*[A-Za-z]+Model$
must_not:
- type: directory
regex: vendor/.*
- type: directory
value: vendor/.*
- name: Vendor Model
collectors:
- type: bool
must:
- type: className
regex: .*[A-Za-z]+Model$
- type: directory
regex: vendor/.*
- type: class
value: .*[A-Za-z]+Model$
- type: directory
value: vendor/.*
- name: Controller
collectors:
- type: bool
must:
- type: className
regex: .*\/Controllers\/.*
- type: class
value: .*\/Controllers\/.*
must_not:
- type: directory
regex: vendor/.*
- type: directory
value: vendor/.*
- name: Vendor Controller
collectors:
- type: bool
must:
- type: className
regex: .*\/Controllers\/.*
- type: directory
regex: vendor/.*
- type: class
value: .*\/Controllers\/.*
- type: directory
value: vendor/.*
- name: Config
collectors:
- type: bool
must:
- type: directory
regex: app/Config/.*
- type: directory
value: src/Config/.*
must_not:
- type: className
regex: .*Services
- type: directory
regex: vendor/.*
- type: class
value: .*Services
- type: directory
value: vendor/.*
- name: Vendor Config
collectors:
- type: bool
must:
- type: directory
regex: vendor/.*/Config/.*
- type: directory
value: vendor/.*/Config/.*
must_not:
- type: className
regex: .*Services
- type: class
value: .*Services
- name: Entity
collectors:
- type: bool
must:
- type: directory
regex: app/Entities/.*
- type: directory
value: src/Entities/.*
must_not:
- type: directory
regex: vendor/.*
- type: directory
value: vendor/.*
- name: Vendor Entity
collectors:
- type: bool
must:
- type: directory
regex: vendor/.*/Entities/.*
- type: directory
value: vendor/.*/Entities/.*
- name: View
collectors:
- type: bool
must:
- type: directory
regex: app/Views/.*
- type: directory
value: src/Views/.*
must_not:
- type: directory
regex: vendor/.*
- type: directory
value: vendor/.*
- name: Vendor View
collectors:
- type: bool
must:
- type: directory
regex: vendor/.*/Views/.*
- type: directory
value: vendor/.*/Views/.*
- name: Service
collectors:
- type: className
regex: .*Services.*
- type: class
value: .*Services.*
ruleset:
Entity:
- Config
@@ -102,6 +102,7 @@ parameters:
- Vendor Entity
- Vendor Model
Config:
- Model
- Service
- Vendor Config
Model:
7 changes: 5 additions & 2 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

use CodeIgniter\Boot;
use Config\Paths;

/*
*---------------------------------------------------------------
* CHECK PHP VERSION
@@ -48,9 +51,9 @@
require FCPATH . '../app/Config/Paths.php';
// ^^^ Change this line if you move your application folder

$paths = new Config\Paths();
$paths = new Paths();

// LOAD THE FRAMEWORK BOOTSTRAP FILE
require $paths->systemDirectory . '/Boot.php';

exit(CodeIgniter\Boot::bootWeb($paths));
exit(Boot::bootWeb($paths));
2 changes: 0 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
@@ -80,7 +79,6 @@
$rectorConfig->skip([
__DIR__ . '/app/Views',

JsonThrowOnErrorRector::class,
StringifyStrNeedlesRector::class,
YieldDataProviderRector::class,

7 changes: 5 additions & 2 deletions spark
Original file line number Diff line number Diff line change
@@ -10,6 +10,9 @@
* the LICENSE file that was distributed with this source code.
*/

use CodeIgniter\Boot;
use Config\Paths;

/*
* --------------------------------------------------------------------
* CODEIGNITER COMMAND-LINE TOOLS
@@ -76,9 +79,9 @@ chdir(FCPATH);
require FCPATH . '../app/Config/Paths.php';
// ^^^ Change this line if you move your application folder

$paths = new Config\Paths();
$paths = new Paths();

// LOAD THE FRAMEWORK BOOTSTRAP FILE
require $paths->systemDirectory . '/Boot.php';

exit(CodeIgniter\Boot::bootSpark($paths));
exit(Boot::bootSpark($paths));