Skip to content
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

Deploy #476

Merged
merged 33 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b053b85
Patch framework (v4.5.1 => v4.5.2)
kenjis Jun 14, 2024
a319bff
chore: composer update
kenjis Jun 14, 2024
762b7b5
Merge pull request #453 from kenjis/update-ci-452
kenjis Jun 17, 2024
713d455
chore(deps): bump codeigniter4/framework from 4.5.2 to 4.5.3
dependabot[bot] Jun 25, 2024
63fd99f
Merge pull request #454 from codeigniter4projects/dependabot/composer…
kenjis Jul 2, 2024
36624a5
chore: update composer.json
kenjis Jul 2, 2024
5218f33
chore: composer update
kenjis Jul 2, 2024
b0e6329
test: remove unneeded assertSame()
kenjis Jul 2, 2024
640ba64
chore: fix coding-standard version
kenjis Jul 2, 2024
47ed8b3
Merge pull request #455 from kenjis/update-composer.json
kenjis Jul 7, 2024
2be6725
chore(deps): bump guzzlehttp/guzzle from 7.8.1 to 7.8.2
dependabot[bot] Jul 18, 2024
9e8632c
Merge pull request #458 from codeigniter4projects/dependabot/composer…
kenjis Jul 19, 2024
c63cf43
chore(deps): bump guzzlehttp/guzzle from 7.8.2 to 7.9.1
dependabot[bot] Jul 22, 2024
c293c10
Merge pull request #460 from codeigniter4projects/dependabot/composer…
kenjis Jul 23, 2024
c9d9f60
chore(deps): bump league/commonmark from 2.4.2 to 2.5.0
dependabot[bot] Jul 23, 2024
5b01b5e
Merge pull request #461 from codeigniter4projects/dependabot/composer…
kenjis Jul 24, 2024
fd114da
chore(deps): bump guzzlehttp/guzzle from 7.9.1 to 7.9.2
dependabot[bot] Jul 24, 2024
cef85ed
chore(deps): bump league/commonmark from 2.5.0 to 2.5.1
dependabot[bot] Jul 25, 2024
1abf04e
Merge pull request #463 from codeigniter4projects/dependabot/composer…
kenjis Jul 27, 2024
a97241f
Merge pull request #462 from codeigniter4projects/dependabot/composer…
kenjis Jul 27, 2024
c1f21dc
chore(deps): bump league/commonmark from 2.5.1 to 2.5.3
dependabot[bot] Aug 19, 2024
c06ff06
Merge pull request #467 from codeigniter4projects/dependabot/composer…
kenjis Aug 29, 2024
d5c6b1f
chore(deps): bump codeigniter4/framework from 4.5.3 to 4.5.5
dependabot[bot] Sep 9, 2024
b8b623c
Merge pull request #468 from codeigniter4projects/dependabot/composer…
samsonasik Sep 9, 2024
4d55475
Patch framework (v4.5.5 => v4.6.0)
michalsn Jan 23, 2025
a2e4799
composer update
michalsn Jan 23, 2025
4a79f7b
cs fix
michalsn Jan 23, 2025
4f7b7ec
phpstan fix
michalsn Jan 23, 2025
6187eef
rector fix
michalsn Jan 23, 2025
f695fa7
infection workflow fix
michalsn Jan 23, 2025
e37499e
apply code suggestions
michalsn Jan 23, 2025
8e76d72
update PHP version on the download page
michalsn Jan 23, 2025
37dd49c
Merge pull request #475 from michalsn/update-460
michalsn Jan 23, 2025
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: 1 addition & 1 deletion .github/workflows/infection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: infection, phpunit
extensions: intl, json, mbstring, gd, xml, sqlite3
coverage: xdebug
Expand Down
1 change: 1 addition & 0 deletions app/Config/Boot/development.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
|--------------------------------------------------------------------------
| ERROR DISPLAY
Expand Down
14 changes: 2 additions & 12 deletions app/Config/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ class Cache extends BaseConfig
*/
public string $backupHandler = 'dummy';

/**
* --------------------------------------------------------------------------
* Cache Directory Path
* --------------------------------------------------------------------------
*
* The path to where cache files should be stored, if using a file-based
* system.
*
* @deprecated Use the driver-specific variant under $file
*/
public string $storePath = WRITEPATH . 'cache/';

/**
* --------------------------------------------------------------------------
* Key Prefix
Expand Down Expand Up @@ -85,6 +73,7 @@ class Cache extends BaseConfig
* --------------------------------------------------------------------------
* File settings
* --------------------------------------------------------------------------
*
* Your file storage preferences can be specified below, if you are using
* the File driver.
*
Expand All @@ -99,6 +88,7 @@ class Cache extends BaseConfig
* -------------------------------------------------------------------------
* Memcached settings
* -------------------------------------------------------------------------
*
* Your Memcached servers can be specified below, if you are using
* the Memcached drivers.
*
Expand Down
33 changes: 9 additions & 24 deletions app/Config/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,13 @@
| https://tldp.org/LDP/abs/html/exitcodes.html
|
*/
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code

/**
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_LOW instead.
*/
define('EVENT_PRIORITY_LOW', 200);

/**
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_NORMAL instead.
*/
define('EVENT_PRIORITY_NORMAL', 100);

/**
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_HIGH instead.
*/
define('EVENT_PRIORITY_HIGH', 10);
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
2 changes: 2 additions & 0 deletions app/Config/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Database extends Config
'failover' => [],
'port' => 3306,
'numberNative' => false,
'foundRows' => false,
'dateFormat' => [
'date' => 'Y-m-d',
'datetime' => 'Y-m-d H:i:s',
Expand All @@ -64,6 +65,7 @@ class Database extends Config
// 'failover' => [],
// 'foreignKeys' => true,
// 'busyTimeout' => 1000,
// 'synchronous' => null,
// 'dateFormat' => [
// 'date' => 'Y-m-d',
// 'datetime' => 'Y-m-d H:i:s',
Expand Down
4 changes: 2 additions & 2 deletions app/Config/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
*/
if (CI_DEBUG && ! is_cli()) {
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
Services::toolbar()->respond();
service('toolbar')->respond();
// Hot Reload route - for framework use on the hot reloader.
if (ENVIRONMENT === 'development') {
Services::routes()->get('__hot-reload', static function () {
service('routes')->get('__hot-reload', static function (): void {
(new HotReloader())->run();
});
}
Expand Down
8 changes: 3 additions & 5 deletions app/Config/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ class Exceptions extends BaseConfig

/**
* --------------------------------------------------------------------------
* LOG DEPRECATIONS INSTEAD OF THROWING?
* WHETHER TO THROW AN EXCEPTION ON DEPRECATED ERRORS
* --------------------------------------------------------------------------
* By default, CodeIgniter converts deprecations into exceptions. Also,
* starting in PHP 8.1 will cause a lot of deprecated usage warnings.
* Use this option to temporarily cease the warnings and instead log those.
* This option also works for user deprecations.
* If set to `true`, DEPRECATED errors are only logged and no exceptions are
* thrown. This option also works for user deprecations.
*/
public bool $logDeprecations = true;

Expand Down
12 changes: 10 additions & 2 deletions app/Config/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
class Feature extends BaseConfig
{
/**
* Use improved new auto routing instead of the default legacy version.
* Use improved new auto routing instead of the legacy version.
*/
public bool $autoRoutesImproved = false;
public bool $autoRoutesImproved = true;

/**
* Use filter execution order in 4.4 or before.
Expand All @@ -26,4 +26,12 @@ class Feature extends BaseConfig
* If false, `limit(0)` returns no records. (the behavior of 3.1.9 or later in version 3.x.)
*/
public bool $limitZeroAsAll = true;

/**
* Use strict location negotiation.
*
* By default, the locale is selected based on a loose comparison of the language code (ISO 639-1)
* Enabling strict comparison will also consider the region code (ISO 3166-1 alpha-2).
*/
public bool $strictLocaleNegotiation = false;
}
13 changes: 0 additions & 13 deletions app/Config/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Config;

use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Format\FormatterInterface;
use CodeIgniter\Format\JSONFormatter;
use CodeIgniter\Format\XMLFormatter;

Expand Down Expand Up @@ -62,16 +61,4 @@ class Format extends BaseConfig
'application/xml' => 0,
'text/xml' => 0,
];

/**
* A Factory method to return the appropriate formatter for the given mime type.
*
* @return FormatterInterface
*
* @deprecated This is an alias of `\CodeIgniter\Format\Format::getFormatter`. Use that instead.
*/
public function getFormatter(string $mime)
{
return Services::format()->getFormatter($mime);
}
}
2 changes: 0 additions & 2 deletions app/Config/Kint.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Config;

use Kint\Parser\ConstructablePluginInterface;
use Kint\Renderer\AbstractRenderer;
use Kint\Renderer\Rich\TabPluginInterface;
use Kint\Renderer\Rich\ValuePluginInterface;

Expand Down Expand Up @@ -41,7 +40,6 @@ class Kint
*/
public string $richTheme = 'aante-light.css';
public bool $richFolder = false;
public int $richSort = AbstractRenderer::SORT_FULL;

/**
* @var array<string, class-string<ValuePluginInterface>>|null
Expand Down
2 changes: 1 addition & 1 deletion app/Config/Routing.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@ class Routing extends BaseRouting
*
* Default: false
*/
public bool $translateUriToCamelCase = false;
public bool $translateUriToCamelCase = true;
}
17 changes: 0 additions & 17 deletions app/Config/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,4 @@ class Security extends BaseConfig
* @see https://codeigniter4.github.io/userguide/libraries/security.html#redirection-on-failure
*/
public bool $redirect = (ENVIRONMENT === 'production');

/**
* --------------------------------------------------------------------------
* CSRF SameSite
* --------------------------------------------------------------------------
*
* Setting for CSRF SameSite cookie token.
*
* Allowed values are: None - Lax - Strict - ''.
*
* Defaults to `Lax` as recommended in this link:
*
* @see https://portswigger.net/web-security/csrf/samesite-cookies
*
* @deprecated `Config\Cookie` $samesite property is used.
*/
public string $samesite = 'Lax';
}
3 changes: 2 additions & 1 deletion app/Helpers/video_helper.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* embedVideo ()
* -----------------------------------------------------------------------
Expand Down Expand Up @@ -36,7 +37,7 @@ function embedVideo(string $code, string $width = '640', string $height = '385')
$code = $result['v'] ?? null;
}

if (isset($code) && ! empty($code)) {
if (! in_array($code, ['', null, '0', []], true)) {
return '
<iframe width="' . $width . '" height="' . $height . '"
src="https://www.youtube.com/embed/' . $code . '" frameborder="0"
Expand Down
4 changes: 2 additions & 2 deletions app/Libraries/Blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ protected function parseVideoTags(?string $html = null)
// Since the plugin doesn't support video embeds, yet,
// wire our own up. The syntax for video embeds is
// ![[ https://youtube.com/watch?v=xlkjsdfhlk ]]
preg_match_all('|!video\[([\s\w:/.?=&;]*)\]|i', $html, $matches);
$result = preg_match_all('|!video\[([\s\w:/.?=&;]*)\]|i', $html, $matches);

if ($matches === []) {
if ($result < 1) {
return $html;
}

Expand Down
4 changes: 2 additions & 2 deletions app/Views/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</div>
</div><!--cv-boxes-version end-->
<div class="cv-boxes-content">
<p>CodeIgniter 4 is the latest version of the framework, intended for use with PHP 7.4+ (including 8.2).</p>
<p>The initial release was February 24, 2020. The current version is <?= $v4name ?>. </p>
<p>CodeIgniter 4 is the latest version of the framework, intended for use with PHP 8.1+ (including 8.4).</p>
<p>The initial release was February 24, 2020. The current version is <?= esc($v4name) ?>. </p>
<p>
You *could* download this version of the framework using the button below, but we encourage you to check the
<a href="https://codeigniter.com/user_guide/installation/index.html" class="link-primary" target="_blank">Installation section</a>
Expand Down
4 changes: 2 additions & 2 deletions app/Views/errors/cli/error_exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
$function .= $padClass . $error['function'];
}

$args = implode(', ', array_map(static fn ($value) => match (true) {
$args = implode(', ', array_map(static fn ($value): string => match (true) {
is_object($value) => 'Object(' . $value::class . ')',
is_array($value) => count($value) ? '[...]' : '[]',
is_array($value) => $value !== [] ? '[...]' : '[]',
$value === null => 'null', // return the lowercased version
default => var_export($value, true),
}, array_values($error['args'] ?? [])));
Expand Down
10 changes: 7 additions & 3 deletions app/Views/errors/html/debug.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ p.lead {
.header {
background: var(--light-bg-color);
color: var(--dark-text-color);
margin-top: 2.17rem;
}
.header .container {
padding: 1rem;
Expand All @@ -65,10 +66,13 @@ p.lead {
}

.environment {
background: var(--dark-bg-color);
color: var(--light-text-color);
background: var(--brand-primary-color);
color: var(--main-bg-color);
text-align: center;
padding: 0.2rem;
padding: calc(4px + 0.2083vw);
width: 100%;
margin-top: -2.14rem;
position: fixed;
}

.source {
Expand Down
84 changes: 84 additions & 0 deletions app/Views/errors/html/error_400.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?= lang('Errors.badRequest') ?></title>

<style>
div.logo {
height: 200px;
width: 155px;
display: inline-block;
opacity: 0.08;
position: absolute;
top: 2rem;
left: 50%;
margin-left: -73px;
}
body {
height: 100%;
background: #fafafa;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #777;
font-weight: 300;
}
h1 {
font-weight: lighter;
letter-spacing: normal;
font-size: 3rem;
margin-top: 0;
margin-bottom: 0;
color: #222;
}
.wrap {
max-width: 1024px;
margin: 5rem auto;
padding: 2rem;
background: #fff;
text-align: center;
border: 1px solid #efefef;
border-radius: 0.5rem;
position: relative;
}
pre {
white-space: normal;
margin-top: 1.5rem;
}
code {
background: #fafafa;
border: 1px solid #efefef;
padding: 0.5rem 1rem;
border-radius: 5px;
display: block;
}
p {
margin-top: 1.5rem;
}
.footer {
margin-top: 2rem;
border-top: 1px solid #efefef;
padding: 1em 2em 0 2em;
font-size: 85%;
color: #999;
}
a:active,
a:link,
a:visited {
color: #dd4814;
}
</style>
</head>
<body>
<div class="wrap">
<h1>400</h1>

<p>
<?php if (ENVIRONMENT !== 'production') : ?>
<?= nl2br(esc($message)) ?>
<?php else : ?>
<?= lang('Errors.sorryBadRequest') ?>
<?php endif; ?>
</p>
</div>
</body>
</html>
Loading
Loading