Skip to content

Commit d005c44

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.6
Conflicts: user_guide_src/source/changelogs/index.rst user_guide_src/source/installation/upgrading.rst
2 parents d9902df + 092d85b commit d005c44

File tree

11 files changed

+156
-49
lines changed

11 files changed

+156
-49
lines changed

admin/RELEASE.md

+26-22
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
- `4.y`: The next minor version. (e.g., `4.6`)
1313
- `4.z`: The next next minor version. (e.g., `4.7`)
1414

15+
> [!NOTE]
16+
> Copy this file, and replace the versions above with the actual versions.
17+
1518
## Merge `develop` branch into next minor version branch `4.y`
1619

1720
Before starting release process, if there are commits in `develop` branch that
@@ -35,6 +38,26 @@ If you release a new minor version.
3538
"Branch protection rules" to the next minor version. E.g. `4.5``4.6`
3639
* [ ] Delete the merged `4.y` branch (This closes all PRs to the branch)
3740

41+
## Preparation
42+
43+
Work off direct clones of the repos so the release branches persist for a time.
44+
45+
* [ ] Clone both **codeigniter4/CodeIgniter4** and **codeigniter4/userguide** and
46+
resolve any necessary PRs
47+
```console
48+
rm -rf CodeIgniter4.bk userguide.bk
49+
mv CodeIgniter4 CodeIgniter4.bk
50+
mv userguide userguide.bk
51+
git clone [email protected]:codeigniter4/CodeIgniter4.git
52+
git clone [email protected]:codeigniter4/userguide.git
53+
```
54+
* [ ] Vet the **admin/** folders for any removed hidden files (Action deploy scripts
55+
*do not remove these*)
56+
```console
57+
cd CodeIgniter4
58+
git diff --name-status origin/master admin/
59+
```
60+
3861
## Changelog
3962

4063
When generating the changelog each Pull Request to be included must have one of
@@ -65,33 +88,14 @@ the changelog.
6588
Copy the resulting content into **CHANGELOG.md** and adjust the format to match
6689
the existing content.
6790

68-
## Preparation
69-
70-
Work off direct clones of the repos so the release branches persist for a time.
71-
72-
* [ ] Clone both **codeigniter4/CodeIgniter4** and **codeigniter4/userguide** and
73-
resolve any necessary PRs
74-
```console
75-
rm -rf CodeIgniter4.bk userguide.bk
76-
mv CodeIgniter4 CodeIgniter4.bk
77-
mv userguide userguide.bk
78-
git clone [email protected]:codeigniter4/CodeIgniter4.git
79-
git clone [email protected]:codeigniter4/userguide.git
80-
```
81-
* [ ] Vet the **admin/** folders for any removed hidden files (Action deploy scripts
82-
*do not remove these*)
83-
```console
84-
cd CodeIgniter4
85-
git diff --name-status origin/master admin/
86-
```
87-
* [ ] Merge any Security Advisory PRs in private forks
88-
8991
## Process
9092

91-
> **Note** Most changes that need noting in the User Guide and docs should have
93+
> [!NOTE]
94+
> Most changes that need noting in the User Guide and docs should have
9295
> been included with their PR, so this process assumes you will not be
9396
> generating much new content.
9497
98+
* [ ] Merge any Security Advisory PRs in private forks
9599
* [ ] Replace **CHANGELOG.md** with the new version generated above
96100
* [ ] Update **user_guide_src/source/changelogs/v4.x.x.rst**
97101
* Remove the section titles that have no items

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"phpunit/phpcov": "^9.0.2 || ^10.0",
2929
"phpunit/phpunit": "^10.5.16 || ^11.2",
3030
"predis/predis": "^1.1 || ^2.0",
31-
"rector/rector": "1.2.4"
31+
"rector/rector": "1.2.5"
3232
},
3333
"replace": {
3434
"codeigniter4/framework": "self.version"

rector.php

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
5656
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
5757
use Rector\TypeDeclaration\Rector\Function_\AddFunctionVoidReturnTypeWhereNoReturnRector;
58+
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
5859
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
5960
use Utils\Rector\PassStrictParameterToFunctionParameterRector;
6061
use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector;
@@ -215,6 +216,7 @@
215216
AddClosureVoidReturnTypeWhereNoReturnRector::class,
216217
AddFunctionVoidReturnTypeWhereNoReturnRector::class,
217218
AddMethodCallBasedStrictParamTypeRector::class,
219+
TypedPropertyFromAssignsRector::class,
218220
])
219221
->withConfiguredRule(StringClassNameToClassConstantRector::class, [
220222
// keep '\\' prefix string on string '\Foo\Bar'

system/Cache/Handlers/RedisHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function initialize()
108108
public function get(string $key)
109109
{
110110
$key = static::validateKey($key, $this->prefix);
111-
$data = $this->redis->hMGet($key, ['__ci_type', '__ci_value']);
111+
$data = $this->redis->hMget($key, ['__ci_type', '__ci_value']);
112112

113113
if (! isset($data['__ci_type'], $data['__ci_value']) || $data['__ci_value'] === false) {
114114
return null;
@@ -147,7 +147,7 @@ public function save(string $key, $value, int $ttl = 60)
147147
return false;
148148
}
149149

150-
if (! $this->redis->hMSet($key, ['__ci_type' => $dataType, '__ci_value' => $value])) {
150+
if (! $this->redis->hMset($key, ['__ci_type' => $dataType, '__ci_value' => $value])) {
151151
return false;
152152
}
153153

system/Config/Factories.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class Factories
3737
*
3838
* @var array<string, array<string, bool|string|null>>
3939
*/
40-
private static $options = [];
40+
private static array $options = [];
4141

4242
/**
4343
* Explicit options for the Config
@@ -65,7 +65,7 @@ final class Factories
6565
*
6666
* @var array<string, array<string, class-string>>
6767
*/
68-
private static $aliases = [];
68+
private static array $aliases = [];
6969

7070
/**
7171
* Store for instances of any component that
@@ -78,7 +78,7 @@ final class Factories
7878
*
7979
* @var array<string, array<class-string, object>>
8080
*/
81-
private static $instances = [];
81+
private static array $instances = [];
8282

8383
/**
8484
* Whether the component instances are updated?
@@ -87,7 +87,7 @@ final class Factories
8787
*
8888
* @internal For caching only
8989
*/
90-
private static $updated = [];
90+
private static array $updated = [];
9191

9292
/**
9393
* Define the class to load. You can *override* the concrete class.

user_guide_src/source/changelogs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ See all the changes.
1313
:titlesonly:
1414

1515
v4.6.0
16+
v4.5.6
1617
v4.5.5
1718
v4.5.4
1819
v4.5.3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#############
2+
Version 4.5.6
3+
#############
4+
5+
Release Date: Unreleased
6+
7+
**4.5.6 release of CodeIgniter4**
8+
9+
.. contents::
10+
:local:
11+
:depth: 3
12+
13+
********
14+
BREAKING
15+
********
16+
17+
***************
18+
Message Changes
19+
***************
20+
21+
*******
22+
Changes
23+
*******
24+
25+
************
26+
Deprecations
27+
************
28+
29+
**********
30+
Bugs Fixed
31+
**********
32+
33+
See the repo's
34+
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_
35+
for a complete list of bugs fixed.

user_guide_src/source/dbmgmt/migration.rst

+17-8
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,28 @@ include migrations from all namespaces.
2222
Migration File Names
2323
********************
2424

25-
Each Migration is run in numeric order forward or backwards depending on the
26-
method taken. Each migration is numbered using the timestamp when the migration
27-
was created, in **YYYY-MM-DD-HHIISS** format (e.g., **2012-10-31-100537**). This
28-
helps prevent numbering conflicts when working in a team environment.
25+
A migration file name is made up of a timestamp prefix, an underscore (``_``),
26+
and a descriptive name (classname).
27+
28+
* 2024-09-08-013653_AddBlogTable.php
29+
30+
Each migration is numbered using the timestamp (**2024-09-08-013653**) when the
31+
migration was created, in **YYYY-MM-DD-HHIISS** format.
2932

30-
Prefix your migration files with the migration number followed by an underscore
31-
and a descriptive name for the migration. The year, month, and date can be separated
32-
from each other by dashes, underscores, or not at all. For example:
33+
The descriptive name (**AddBlogTable**) for the migration is a classname in PHP.
34+
So you must name a valid classname.
35+
36+
The year, month, day, and time in a prefix can be separated from each other by
37+
dashes (``-``), underscores (``_``), or not at all. For example:
3338

3439
* 2012-10-31-100538_AlterBlogTrackViews.php
3540
* 2012_10_31_100539_AlterBlogAddTranslations.php
3641
* 20121031100537_AddBlog.php
3742

43+
Each Migration is run in numeric order forward or backwards depending on the
44+
method taken. This helps prevent numbering conflicts when working in a team
45+
environment.
46+
3847
******************
3948
Create a Migration
4049
******************
@@ -49,7 +58,7 @@ The database connection and the database Forge class are both available to you t
4958
``$this->db`` and ``$this->forge``, respectively.
5059

5160
Alternatively, you can use a command-line call to generate a skeleton migration file.
52-
See **make:migration** in :ref:`command-line-tools` for more details.
61+
See `make:migration`_ in :ref:`command-line-tools` for more details.
5362

5463
.. note:: Since the migration class is a PHP class, the classname must be unique in every migration file.
5564

user_guide_src/source/helpers/url_helper.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The following functions are available:
2121
.. php:function:: site_url([$uri = ''[, $protocol = null[, $altConfig = null]]])
2222
2323
:param array|string $uri: URI string or array of URI segments.
24-
:param string $protocol: Protocol, e.g., 'http' or 'https'. If empty string '' is set, a protocol-relative link is returned.
24+
:param string $protocol: Protocol, e.g., ``'http'`` or ``'https'``. If empty string ``''`` is set, a protocol-relative link is returned.
2525
:param \\Config\\App $altConfig: Alternate configuration to use.
2626
:returns: Site URL
2727
:rtype: string
@@ -57,7 +57,7 @@ The following functions are available:
5757
.. php:function:: base_url([$uri = ''[, $protocol = null]])
5858
5959
:param array|string $uri: URI string or array of URI segments.
60-
:param string $protocol: Protocol, e.g., 'http' or 'https'. If empty string '' is set, a protocol-relative link is returned.
60+
:param string $protocol: Protocol, e.g., ``'http'`` or ``'https'``. If empty string ``''`` is set, a protocol-relative link is returned.
6161
:returns: Base URL
6262
:rtype: string
6363

@@ -124,7 +124,7 @@ The following functions are available:
124124
125125
:param boolean $returnObject: True if you would like a URI instance returned instead of a string.
126126
:returns: The URL the user was previously on
127-
:rtype: string|mixed|\\CodeIgniter\\HTTP\\URI
127+
:rtype: string|\\CodeIgniter\\HTTP\\URI
128128

129129
Returns the full URL (including segments) of the page the user was previously on.
130130

@@ -182,10 +182,10 @@ The following functions are available:
182182

183183
.. php:function:: anchor([$uri = ''[, $title = ''[, $attributes = ''[, $altConfig = null]]]])
184184
185-
:param mixed $uri: URI string or array of URI segments
186-
:param string $title: Anchor title
187-
:param mixed $attributes: HTML attributes
188-
:param \\Config\\App $altConfig: Alternate configuration to use
185+
:param array|string $uri: URI string or array of URI segments
186+
:param string $title: Anchor title
187+
:param array|object|string $attributes: HTML attributes
188+
:param \\Config\\App|null $altConfig: Alternate configuration to use
189189
:returns: HTML hyperlink (anchor tag)
190190
:rtype: string
191191

@@ -222,7 +222,7 @@ The following functions are available:
222222
223223
:param string $uri: URI string
224224
:param string $title: Anchor title
225-
:param mixed $attributes: HTML attributes
225+
:param array|false|object|string $attributes: HTML attributes
226226
:param \\Config\\App $altConfig: Alternate configuration to use
227227
:returns: Pop-up hyperlink
228228
:rtype: string
@@ -262,7 +262,7 @@ The following functions are available:
262262
263263
:param string $email: E-mail address
264264
:param string $title: Anchor title
265-
:param mixed $attributes: HTML attributes
265+
:param array|object|string $attributes: HTML attributes
266266
:returns: A "mail to" hyperlink
267267
:rtype: string
268268

@@ -281,7 +281,7 @@ The following functions are available:
281281
282282
:param string $email: E-mail address
283283
:param string $title: Anchor title
284-
:param mixed $attributes: HTML attributes
284+
:param array|object|string $attributes: HTML attributes
285285
:returns: A spam-safe "mail to" hyperlink
286286
:rtype: string
287287

@@ -292,7 +292,7 @@ The following functions are available:
292292
.. php:function:: auto_link($str[, $type = 'both'[, $popup = false]])
293293
294294
:param string $str: Input string
295-
:param string $type: Link type ('email', 'url' or 'both')
295+
:param string $type: Link type (``'email'``, ``'url'`` or ``'both'``)
296296
:param bool $popup: Whether to create popup links
297297
:returns: Linkified string
298298
:rtype: string
@@ -378,7 +378,7 @@ The following functions are available:
378378
.. php:function:: url_to($controller[, ...$args])
379379
380380
:param string $controller: Route name or Controller::method
381-
:param mixed ...$args: One or more parameters to be passed to the route. The last parameter allows you to set the locale.
381+
:param int|string ...$args: One or more parameters to be passed to the route. The last parameter allows you to set the locale.
382382
:returns: Absolute URL
383383
:rtype: string
384384

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#############################
2+
Upgrading from 4.5.5 to 4.5.6
3+
#############################
4+
5+
Please refer to the upgrade instructions corresponding to your installation method.
6+
7+
- :ref:`Composer Installation App Starter Upgrading <app-starter-upgrading>`
8+
- :ref:`Composer Installation Adding CodeIgniter4 to an Existing Project Upgrading <adding-codeigniter4-upgrading>`
9+
- :ref:`Manual Installation Upgrading <installing-manual-upgrading>`
10+
11+
.. contents::
12+
:local:
13+
:depth: 2
14+
15+
**********************
16+
Mandatory File Changes
17+
**********************
18+
19+
****************
20+
Breaking Changes
21+
****************
22+
23+
*********************
24+
Breaking Enhancements
25+
*********************
26+
27+
*************
28+
Project Files
29+
*************
30+
31+
Some files in the **project space** (root, app, public, writable) received updates. Due to
32+
these files being outside of the **system** scope they will not be changed without your intervention.
33+
34+
.. note:: There are some third-party CodeIgniter modules available to assist
35+
with merging changes to the project space:
36+
`Explore on Packagist <https://packagist.org/explore/?query=codeigniter4%20updates>`_.
37+
38+
Content Changes
39+
===============
40+
41+
The following files received significant changes (including deprecations or visual adjustments)
42+
and it is recommended that you merge the updated versions with your application:
43+
44+
Config
45+
------
46+
47+
- @TODO
48+
49+
All Changes
50+
===========
51+
52+
This is a list of all files in the **project space** that received changes;
53+
many will be simple comments or formatting that have no effect on the runtime:
54+
55+
- @TODO

user_guide_src/source/installation/upgrading.rst

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ See also :doc:`./backward_compatibility_notes`.
1717
backward_compatibility_notes
1818

1919
upgrade_460
20+
upgrade_456
2021
upgrade_455
2122
upgrade_454
2223
upgrade_453

0 commit comments

Comments
 (0)