Skip to content

Commit 3d4e20d

Browse files
authored
Merge pull request #8575 from codeigniter4/develop
4.4.6 Ready code
2 parents 81c835d + 0613449 commit 3d4e20d

File tree

154 files changed

+2950
-1145
lines changed

Some content is hidden

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

154 files changed

+2950
-1145
lines changed

.php-cs-fixer.dist.php

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

46-
$overrides = [];
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+
];
4775

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

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## [v4.4.6](https://github.com/codeigniter4/CodeIgniter4/tree/v4.4.6) (2024-02-24)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.4.5...v4.4.6)
5+
6+
### Breaking Changes
7+
8+
* fix: Time::createFromTimestamp() returns Time with UTC by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8544
9+
10+
### Fixed Bugs
11+
12+
* fix: [OCI8] getFieldData() returns incorrect `default` value by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8459
13+
* fix: [SQLite3] getFieldData() returns incorrect `primary_key` values by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8460
14+
* fix: [OCI8][Postgre][SQLSRV][SQLite3] change order of properties returned by getFieldData() by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8481
15+
* docs: fix supported SQL Server version by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8489
16+
* fix: [SQLite3] Forge::modifyColumn() messes up table by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8457
17+
* docs: fix incorrect @return type in `ResultInterface-getCustomRowObject()` by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8503
18+
* fix: [Postgre] updateBatch() breaks `char` type data by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8524
19+
* fix: DebugBar block by CSP by @YapsBridging in https://github.com/codeigniter4/CodeIgniter4/pull/8411
20+
* docs: fix `@phpstan-type` in Model by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8543
21+
* fix: [CURLRequest] Multiple HTTP 100 return by API. by @ping-yee in https://github.com/codeigniter4/CodeIgniter4/pull/8466
22+
* fix: PHPDoc types in controller.tpl.php by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8561
23+
* fix: [Session] Redis session race condition by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8323
24+
25+
### Refactoring
26+
27+
* test: refactor ImageMagickHandlerTest by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/8461
28+
* test: refactor GetFieldDataTest by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8480
29+
* refactor: use ternary operators in Helpers by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/8529
30+
* refactor: use official site URLs by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8541
31+
* refactor: remove redundant URL helper loading by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8556
32+
* refactor: small improvement in `loadInNamespace` Autoloader by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/8553
33+
334
## [v4.4.5](https://github.com/codeigniter4/CodeIgniter4/tree/v4.4.5) (2024-01-27)
435
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.4.4...v4.4.5)
536

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ More information about the plans for version 4 can be found in [CodeIgniter 4](h
2424

2525
### Documentation
2626

27-
The [User Guide](https://codeigniter4.github.io/userguide/) is the primary documentation for CodeIgniter 4.
27+
The [User Guide](https://codeigniter.com/user_guide/) is the primary documentation for CodeIgniter 4.
2828

29-
The current **in-progress** User Guide can be found [here](https://codeigniter4.github.io/CodeIgniter4/).
29+
You will also find the [current **in-progress** User Guide](https://codeigniter4.github.io/CodeIgniter4/).
3030
As with the rest of the framework, it is a work in progress, and will see changes over time to structure, explanations, etc.
3131

3232
You might also be interested in the [API documentation](https://codeigniter4.github.io/api/) for the framework components.
3333

3434
## Important Change with index.php
3535

36-
index.php is no longer in the root of the project! It has been moved inside the *public* folder,
36+
`index.php` is no longer in the root of the project! It has been moved inside the *public* folder,
3737
for better security and separation of components.
3838

3939
This means that you should configure your web server to "point" to your project's *public* folder, and
@@ -48,9 +48,10 @@ CodeIgniter is developed completely on a volunteer basis. As such, please give u
4848
for your issues to be reviewed. If you haven't heard from one of the team in that time period,
4949
feel free to leave a comment on the issue so that it gets brought back to our attention.
5050

51-
We use GitHub issues to track **BUGS** and to track approved **DEVELOPMENT** work packages.
52-
We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss
53-
FEATURE REQUESTS.
51+
> [!IMPORTANT]
52+
> We use GitHub issues to track **BUGS** and to track approved **DEVELOPMENT** work packages.
53+
> We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss
54+
> FEATURE REQUESTS.
5455
5556
If you raise an issue here that pertains to support or a feature request, it will
5657
be closed! If you are not sure if you have found a bug, raise a thread on the forum first -
@@ -91,10 +92,11 @@ PHP version 7.4 or higher is required, with the following extensions installed:
9192
- [intl](http://php.net/manual/en/intl.requirements.php)
9293
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
9394

94-
> **Warning**
95-
> The end of life date for PHP 7.4 was November 28, 2022. If you are
96-
> still using PHP 7.4, you should upgrade immediately. The end of life date
97-
> for PHP 8.0 will be November 26, 2023.
95+
> [!WARNING]
96+
> The end of life date for PHP 7.4 was November 28, 2022.
97+
> The end of life date for PHP 8.0 was November 26, 2023.
98+
> If you are still using PHP 7.4 or 8.0, you should upgrade immediately.
99+
> The end of life date for PHP 8.1 will be November 25, 2024.
98100
99101
Additionally, make sure that the following extensions are enabled in your PHP:
100102

admin/css/debug-toolbar/toolbar.scss

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@
398398
text-align: right;
399399
}
400400
}
401+
402+
// show tab
403+
&>.debug-bar-dblock {
404+
display: block;
405+
}
401406
}
402407

403408

@@ -467,7 +472,6 @@
467472
@import '_theme-light';
468473
}
469474

470-
471475
// LAYOUT HELPERS
472476
// ========================================================================== */
473477

@@ -510,3 +514,47 @@
510514
.debug-bar-noverflow {
511515
overflow: hidden;
512516
}
517+
518+
.debug-bar-dtableRow {
519+
display: table-row;
520+
}
521+
522+
.debug-bar-dinlineBlock {
523+
display: inline-block;
524+
}
525+
526+
.debug-bar-pointer {
527+
cursor: pointer;
528+
}
529+
530+
.debug-bar-mleft4 {
531+
margin-left: 4px;
532+
}
533+
534+
.debug-bar-level-0 {
535+
--level: 0;
536+
}
537+
538+
.debug-bar-level-1 {
539+
--level: 1;
540+
}
541+
542+
.debug-bar-level-2 {
543+
--level: 2;
544+
}
545+
546+
.debug-bar-level-3 {
547+
--level: 3;
548+
}
549+
550+
.debug-bar-level-4 {
551+
--level: 4;
552+
}
553+
554+
.debug-bar-level-5 {
555+
--level: 5;
556+
}
557+
558+
.debug-bar-level-6 {
559+
--level: 6;
560+
}

admin/framework/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ It has been built from the
1111

1212
More information about the plans for version 4 can be found in [CodeIgniter 4](https://forum.codeigniter.com/forumdisplay.php?fid=28) on the forums.
1313

14-
The user guide corresponding to the latest version of the framework can be found
15-
[here](https://codeigniter4.github.io/userguide/).
14+
You can read the [user guide](https://codeigniter.com/user_guide/)
15+
corresponding to the latest version of the framework.
1616

1717
## Important Change with index.php
1818

@@ -47,10 +47,11 @@ PHP version 7.4 or higher is required, with the following extensions installed:
4747
- [intl](http://php.net/manual/en/intl.requirements.php)
4848
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
4949

50-
> **Warning**
51-
> The end of life date for PHP 7.4 was November 28, 2022. If you are
52-
> still using PHP 7.4, you should upgrade immediately. The end of life date
53-
> for PHP 8.0 will be November 26, 2023.
50+
> [!WARNING]
51+
> The end of life date for PHP 7.4 was November 28, 2022.
52+
> The end of life date for PHP 8.0 was November 26, 2023.
53+
> If you are still using PHP 7.4 or 8.0, you should upgrade immediately.
54+
> The end of life date for PHP 8.1 will be November 25, 2024.
5455
5556
Additionally, make sure that the following extensions are enabled in your PHP:
5657

admin/starter/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ It has been built from the
1111

1212
More information about the plans for version 4 can be found in [CodeIgniter 4](https://forum.codeigniter.com/forumdisplay.php?fid=28) on the forums.
1313

14-
The user guide corresponding to the latest version of the framework can be found
15-
[here](https://codeigniter4.github.io/userguide/).
14+
You can read the [user guide](https://codeigniter.com/user_guide/)
15+
corresponding to the latest version of the framework.
1616

1717
## Installation & updates
1818

@@ -55,10 +55,11 @@ PHP version 7.4 or higher is required, with the following extensions installed:
5555
- [intl](http://php.net/manual/en/intl.requirements.php)
5656
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
5757

58-
> **Warning**
59-
> The end of life date for PHP 7.4 was November 28, 2022. If you are
60-
> still using PHP 7.4, you should upgrade immediately. The end of life date
61-
> for PHP 8.0 will be November 26, 2023.
58+
> [!WARNING]
59+
> The end of life date for PHP 7.4 was November 28, 2022.
60+
> The end of life date for PHP 8.0 was November 26, 2023.
61+
> If you are still using PHP 7.4 or 8.0, you should upgrade immediately.
62+
> The end of life date for PHP 8.1 will be November 25, 2024.
6263
6364
Additionally, make sure that the following extensions are enabled in your PHP:
6465

admin/starter/tests/README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ use to test your application. Those details can be found in the documentation.
77

88
## Resources
99

10-
* [CodeIgniter 4 User Guide on Testing](https://codeigniter4.github.io/userguide/testing/index.html)
10+
* [CodeIgniter 4 User Guide on Testing](https://codeigniter.com/user_guide/testing/index.html)
1111
* [PHPUnit docs](https://phpunit.de/documentation.html)
1212
* [Any tutorials on Unit testing in CI4?](https://forum.codeigniter.com/showthread.php?tid=81830)
1313

1414
## Requirements
1515

1616
It is recommended to use the latest version of PHPUnit. At the time of this
17-
writing we are running version 9.x. Support for this has been built into the
17+
writing, we are running version 9.x. Support for this has been built into the
1818
**composer.json** file that ships with CodeIgniter and can easily be installed
1919
via [Composer](https://getcomposer.org/) if you don't already have it installed globally.
2020

@@ -35,10 +35,10 @@ for code coverage to be calculated successfully. After installing `XDebug`, you
3535

3636
A number of the tests use a running database.
3737
In order to set up the database edit the details for the `tests` group in
38-
**app/Config/Database.php** or **phpunit.xml**.
38+
**app/Config/Database.php** or **.env**.
3939
Make sure that you provide a database engine that is currently running on your machine.
4040
More details on a test database setup are in the
41-
[Testing Your Database](https://codeigniter4.github.io/userguide/testing/database.html) section of the documentation.
41+
[Testing Your Database](https://codeigniter.com/user_guide/testing/database.html) section of the documentation.
4242

4343
## Running the tests
4444

@@ -92,12 +92,11 @@ HTML code coverage reports.
9292
## Test Cases
9393

9494
Every test needs a *test case*, or class that your tests extend. CodeIgniter 4
95-
provides a few that you may use directly:
96-
* `CodeIgniter\Test\CIUnitTestCase` - for basic tests with no other service needs
97-
* `CodeIgniter\Test\DatabaseTestTrait` - for tests that need database access
95+
provides one class that you may use directly:
96+
* `CodeIgniter\Test\CIUnitTestCase`
9897

99-
Most of the time you will want to write your own test cases to hold functions and services
100-
common to your test suites.
98+
Most of the time you will want to write your own test cases that extend `CIUnitTestCase`
99+
to hold functions and services common to your test suites.
101100

102101
## Creating Tests
103102

@@ -112,11 +111,8 @@ Review the links above and always pay attention to your code coverage.
112111

113112
### Database Tests
114113

115-
Tests can include migrating, seeding, and testing against a mock or live<sup>1</sup> database.
114+
Tests can include migrating, seeding, and testing against a mock or live database.
116115
Be sure to modify the test case (or create your own) to point to your seed and migrations
117116
and include any additional steps to be run before tests in the `setUp()` method.
118-
119-
<sup>1</sup> Note: If you are using database tests that require a live database connection
120-
you will need to rename **phpunit.xml.dist** to **phpunit.xml**, uncomment the database
121-
configuration lines and add your connection details. Prevent **phpunit.xml** from being
122-
tracked in your repo by adding it to **.gitignore**.
117+
See [Testing Your Database](https://codeigniter.com/user_guide/testing/database.html)
118+
for details.

app/Config/App.php

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ class App extends BaseConfig
1414
* URL to your CodeIgniter root. Typically, this will be your base URL,
1515
* WITH a trailing slash:
1616
*
17-
* http://example.com/
17+
* E.g., http://example.com/
1818
*/
1919
public string $baseURL = 'http://localhost:8080/';
2020

2121
/**
2222
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
2323
* If you want to accept multiple Hostnames, set this.
2424
*
25-
* E.g. When your site URL ($baseURL) is 'http://example.com/', and your site
26-
* also accepts 'http://media.example.com/' and
27-
* 'http://accounts.example.com/':
28-
* ['media.example.com', 'accounts.example.com']
25+
* E.g.,
26+
* When your site URL ($baseURL) is 'http://example.com/', and your site
27+
* also accepts 'http://media.example.com/' and 'http://accounts.example.com/':
28+
* ['media.example.com', 'accounts.example.com']
2929
*
3030
* @var list<string>
3131
*/
@@ -36,9 +36,9 @@ class App extends BaseConfig
3636
* Index File
3737
* --------------------------------------------------------------------------
3838
*
39-
* Typically this will be your index.php file, unless you've renamed it to
40-
* something else. If you are using mod_rewrite to remove the page set this
41-
* variable so that it is blank.
39+
* Typically, this will be your `index.php` file, unless you've renamed it to
40+
* something else. If you have configured your web server to remove this file
41+
* from your site URIs, set this variable to an empty string.
4242
*/
4343
public string $indexPage = 'index.php';
4444

@@ -48,12 +48,12 @@ class App extends BaseConfig
4848
* --------------------------------------------------------------------------
4949
*
5050
* This item determines which server global should be used to retrieve the
51-
* URI string. The default setting of 'REQUEST_URI' works for most servers.
51+
* URI string. The default setting of 'REQUEST_URI' works for most servers.
5252
* If your links do not seem to work, try one of the other delicious flavors:
5353
*
54-
* 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
55-
* 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
56-
* 'PATH_INFO' Uses $_SERVER['PATH_INFO']
54+
* 'REQUEST_URI': Uses $_SERVER['REQUEST_URI']
55+
* 'QUERY_STRING': Uses $_SERVER['QUERY_STRING']
56+
* 'PATH_INFO': Uses $_SERVER['PATH_INFO']
5757
*
5858
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
5959
*/
@@ -94,7 +94,7 @@ class App extends BaseConfig
9494
*
9595
* IncomingRequest::setLocale() also uses this list.
9696
*
97-
* @var string[]
97+
* @var list<string>
9898
*/
9999
public array $supportedLocales = ['en'];
100100

@@ -106,7 +106,8 @@ class App extends BaseConfig
106106
* The default timezone that will be used in your application to display
107107
* dates with the date helper, and can be retrieved through app_timezone()
108108
*
109-
* @see https://www.php.net/manual/en/timezones.php for list of timezones supported by PHP.
109+
* @see https://www.php.net/manual/en/timezones.php for list of timezones
110+
* supported by PHP.
110111
*/
111112
public string $appTimezone = 'UTC';
112113

@@ -130,7 +131,7 @@ class App extends BaseConfig
130131
* If true, this will force every request made to this application to be
131132
* made via a secure connection (HTTPS). If the incoming request is not
132133
* secure, the user will be redirected to a secure version of the page
133-
* and the HTTP Strict Transport Security header will be set.
134+
* and the HTTP Strict Transport Security (HSTS) header will be set.
134135
*/
135136
public bool $forceGlobalSecureRequests = false;
136137

0 commit comments

Comments
 (0)