Skip to content

Commit fd3da67

Browse files
authored
Merge pull request #8675 from codeigniter4/develop
4.4.7 Ready code
2 parents 3d4e20d + e73db00 commit fd3da67

File tree

163 files changed

+17950
-2223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+17950
-2223
lines changed

.github/prlint.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"title": [
33
{
4-
"pattern": "^(\\[\\d+\\.\\d+\\]\\s{1})?(feat|fix|chore|docs|perf|refactor|style|test)(\\([\\-.@:`a-zA-Z0-9]+\\))?!?:\\s{1}\\S.+\\S|Prep for \\d\\.\\d\\.\\d release|\\d\\.\\d\\.\\d Ready code$",
5-
"message": "PR title must include the type (feat, fix, chore, docs, perf, refactor, style, test) of the commit per Conventional Commits specification. See https://www.conventionalcommits.org/en/v1.0.0/ for the discussion."
4+
"pattern": "^(\\[\\d+\\.\\d+\\]\\s{1})?(feat|fix|chore|docs|perf|refactor|style|test|config|revert)(\\([\\-.@:`a-zA-Z0-9]+\\))?!?:\\s{1}\\S.+\\S|Prep for \\d\\.\\d\\.\\d release|\\d\\.\\d\\.\\d Ready code$",
5+
"message": "PR title must include the type (feat, fix, chore, docs, perf, refactor, style, test, config, revert) of the commit per Conventional Commits specification. See https://www.conventionalcommits.org/en/v1.0.0/ for the discussion."
66
}
77
]
88
}

.github/workflows/test-deptrac.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: shivammathur/setup-php@v2
4444
with:
4545
php-version: '8.1'
46-
tools: composer, phive
46+
tools: composer
4747
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3
4848

4949
- name: Validate composer.json
@@ -74,7 +74,7 @@ jobs:
7474

7575
- name: Run architectural inspection
7676
run: |
77-
sudo phive --no-progress install --global qossmic/deptrac --trust-gpg-keys B8F640134AB1782E
78-
deptrac analyze --cache-file=build/deptrac.cache
77+
composer require --dev qossmic/deptrac-shim
78+
vendor/bin/deptrac analyze --cache-file=build/deptrac.cache
7979
env:
8080
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-rector.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,12 @@ permissions:
4040

4141
jobs:
4242
build:
43-
name: PHP ${{ matrix.php-versions }} Analyze code (Rector) on ${{ matrix.paths }}
43+
name: PHP ${{ matrix.php-versions }} Analyze code (Rector)
4444
runs-on: ubuntu-22.04
4545
strategy:
4646
fail-fast: false
4747
matrix:
4848
php-versions: ['7.4', '8.0']
49-
paths:
50-
- app
51-
- system
52-
- tests
53-
- utils
5449
steps:
5550
- name: Checkout
5651
uses: actions/checkout@v4
@@ -80,5 +75,14 @@ jobs:
8075
- name: Install dependencies
8176
run: composer update --ansi --no-interaction
8277

78+
- name: Rector Cache
79+
uses: actions/cache@v4
80+
with:
81+
path: /tmp/rector
82+
key: ${{ runner.os }}-rector-${{ github.run_id }}
83+
restore-keys: ${{ runner.os }}-rector-
84+
85+
- run: mkdir -p /tmp/rector
86+
8387
- name: Run static analysis
84-
run: vendor/bin/rector process ${{ matrix.paths }} --dry-run --no-progress-bar
88+
run: vendor/bin/rector process --dry-run --no-progress-bar

.php-cs-fixer.dist.php

+1-29
Original file line numberDiff line numberDiff line change
@@ -43,35 +43,7 @@
4343
__DIR__ . '/spark',
4444
]);
4545

46-
$overrides = [
47-
'phpdoc_no_alias_tag' => [
48-
'replacements' => [
49-
'type' => 'var',
50-
'link' => 'see',
51-
],
52-
],
53-
'phpdoc_align' => [
54-
'align' => 'vertical',
55-
'spacing' => 1,
56-
'tags' => [
57-
'method',
58-
'param',
59-
'phpstan-assert',
60-
'phpstan-assert-if-true',
61-
'phpstan-assert-if-false',
62-
'phpstan-param',
63-
'phpstan-property',
64-
'phpstan-return',
65-
'property',
66-
'property-read',
67-
'property-write',
68-
'return',
69-
'throws',
70-
'type',
71-
'var',
72-
],
73-
],
74-
];
46+
$overrides = [];
7547

7648
$options = [
7749
'cacheFile' => 'build/.php-cs-fixer.cache',

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## [v4.4.7](https://github.com/codeigniter4/CodeIgniter4/tree/v4.4.7) (2024-03-29)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.4.6...v4.4.7)
5+
6+
### Breaking Changes
7+
* fix: Time::difference() DST bug by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8661
8+
9+
### Fixed Bugs
10+
* fix: [Validation] FileRules cause error if getimagesize() returns false by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8592
11+
* fix: isWriteType() to recognize CTE; always excluding RETURNING by @markconnellypro in https://github.com/codeigniter4/CodeIgniter4/pull/8599
12+
* fix: duplicate Cache-Control header with Session by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8601
13+
* fix: [DebugBar] scroll to top by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/8595
14+
* fix: Model::shouldUpdate() logic by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8614
15+
* fix: esc() for 'raw' context by @Cleric-K in https://github.com/codeigniter4/CodeIgniter4/pull/8633
16+
* docs: fix incorrect CURLRequest allow_redirects description by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8653
17+
* fix: Model::set() does not accept object by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8670
18+
19+
### Refactoring
20+
* refactor: replace PHP_VERSION by PHP_VERSION_ID by @justbyitself in https://github.com/codeigniter4/CodeIgniter4/pull/8618
21+
* refactor: apply early return pattern by @justbyitself in https://github.com/codeigniter4/CodeIgniter4/pull/8621
22+
* refactor: move footer info to top in error_exception.php by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8626
23+
324
## [v4.4.6](https://github.com/codeigniter4/CodeIgniter4/tree/v4.4.6) (2024-02-24)
425
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.4.5...v4.4.6)
526

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2014-2019 British Columbia Institute of Technology
4-
Copyright (c) 2019-2023 CodeIgniter Foundation
4+
Copyright (c) 2019-2024 CodeIgniter Foundation
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

admin/css/debug-toolbar/toolbar.scss

+23-18
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
@import '_mixins';
1414
@import '_settings';
1515

16-
1716
// DEBUG ICON
1817
// ========================================================================== */
1918

@@ -36,6 +35,8 @@
3635
clear: both;
3736
text-align: center;
3837

38+
cursor: pointer;
39+
3940
a svg {
4041
margin: 8px;
4142
max-width: 20px;
@@ -56,6 +57,10 @@
5657
// DEBUG BAR
5758
// ========================================================================== */
5859

60+
.debug-bar-vars {
61+
cursor: pointer;
62+
}
63+
5964
#debug-bar {
6065
// Position
6166
bottom: 0;
@@ -227,21 +232,21 @@
227232
// The toolbar preferences
228233
#toolbar-position,
229234
#toolbar-theme {
230-
a {
231-
padding: 0 6px;
232-
display: inline-flex;
233-
vertical-align: top;
235+
padding: 0 6px;
236+
display: inline-flex;
237+
vertical-align: top;
238+
cursor: pointer;
234239

235-
&:hover {
236-
text-decoration: none;
237-
}
240+
&:hover {
241+
text-decoration: none;
238242
}
239243
}
240244

241245
// The "Open/Close" toggle
242246
#debug-bar-link {
243247
display: flex;
244248
padding: 6px;
249+
cursor: pointer;
245250
}
246251

247252
// The toolbar menus
@@ -518,43 +523,43 @@
518523
.debug-bar-dtableRow {
519524
display: table-row;
520525
}
521-
526+
522527
.debug-bar-dinlineBlock {
523528
display: inline-block;
524529
}
525-
530+
526531
.debug-bar-pointer {
527532
cursor: pointer;
528533
}
529-
534+
530535
.debug-bar-mleft4 {
531536
margin-left: 4px;
532537
}
533-
538+
534539
.debug-bar-level-0 {
535540
--level: 0;
536541
}
537-
542+
538543
.debug-bar-level-1 {
539544
--level: 1;
540545
}
541-
546+
542547
.debug-bar-level-2 {
543548
--level: 2;
544549
}
545-
550+
546551
.debug-bar-level-3 {
547552
--level: 3;
548553
}
549-
554+
550555
.debug-bar-level-4 {
551556
--level: 4;
552557
}
553-
558+
554559
.debug-bar-level-5 {
555560
--level: 5;
556561
}
557-
562+
558563
.debug-bar-level-6 {
559564
--level: 6;
560565
}

admin/prepare-release.php

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function replace_file_content(string $path, string $pattern, string $replace): v
2727
// Creates a branch for release.
2828
system('git switch develop');
2929
system('git switch -c release-' . $version);
30-
system('git switch docs-changelog-' . $version);
3130

3231
// Updates version number in "CodeIgniter.php".
3332
replace_file_content(

admin/starter/tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ExampleMigration extends Migration
88
{
99
protected $DBGroup = 'tests';
1010

11-
public function up()
11+
public function up(): void
1212
{
1313
$this->forge->addField('id');
1414
$this->forge->addField([
@@ -30,7 +30,7 @@ public function up()
3030
$this->forge->createTable('factories');
3131
}
3232

33-
public function down()
33+
public function down(): void
3434
{
3535
$this->forge->dropTable('factories');
3636
}

admin/starter/tests/_support/Database/Seeds/ExampleSeeder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class ExampleSeeder extends Seeder
88
{
9-
public function run()
9+
public function run(): void
1010
{
1111
$factories = [
1212
[

admin/starter/tests/database/ExampleDatabaseTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class ExampleDatabaseTest extends CIUnitTestCase
1414

1515
protected $seed = ExampleSeeder::class;
1616

17-
public function testModelFindAll()
17+
public function testModelFindAll(): void
1818
{
1919
$model = new ExampleModel();
2020

@@ -25,7 +25,7 @@ public function testModelFindAll()
2525
$this->assertCount(3, $objects);
2626
}
2727

28-
public function testSoftDeleteLeavesRow()
28+
public function testSoftDeleteLeavesRow(): void
2929
{
3030
$model = new ExampleModel();
3131
$this->setPrivateProperty($model, 'useSoftDeletes', true);

admin/starter/tests/session/ExampleSessionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
final class ExampleSessionTest extends CIUnitTestCase
1010
{
11-
public function testSessionSimple()
11+
public function testSessionSimple(): void
1212
{
1313
$session = Services::session();
1414

admin/starter/tests/unit/HealthTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
*/
1111
final class HealthTest extends CIUnitTestCase
1212
{
13-
public function testIsDefinedAppPath()
13+
public function testIsDefinedAppPath(): void
1414
{
1515
$this->assertTrue(defined('APPPATH'));
1616
}
1717

18-
public function testBaseUrlHasBeenSet()
18+
public function testBaseUrlHasBeenSet(): void
1919
{
2020
$validation = Services::validation();
2121

app/Config/App.php

+24
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,30 @@ class App extends BaseConfig
5959
*/
6060
public string $uriProtocol = 'REQUEST_URI';
6161

62+
/*
63+
|--------------------------------------------------------------------------
64+
| Allowed URL Characters
65+
|--------------------------------------------------------------------------
66+
|
67+
| This lets you specify which characters are permitted within your URLs.
68+
| When someone tries to submit a URL with disallowed characters they will
69+
| get a warning message.
70+
|
71+
| As a security measure you are STRONGLY encouraged to restrict URLs to
72+
| as few characters as possible.
73+
|
74+
| By default, only these are allowed: `a-z 0-9~%.:_-`
75+
|
76+
| Set an empty string to allow all characters -- but only if you are insane.
77+
|
78+
| The configured value is actually a regular expression character group
79+
| and it will be used as: '/\A[<permittedURIChars>]+\z/iu'
80+
|
81+
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
82+
|
83+
*/
84+
public string $permittedURIChars = 'a-z 0-9~%.:_\-';
85+
6286
/**
6387
* --------------------------------------------------------------------------
6488
* Default Locale

app/Config/Cache.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Cache extends BaseConfig
6161
* ['q'] = Enabled, but only take into account the specified list
6262
* of query parameters.
6363
*
64-
* @var bool|string[]
64+
* @var bool|list<string>
6565
*/
6666
public $cacheQueryString = false;
6767

0 commit comments

Comments
 (0)