Skip to content

Commit 4961b39

Browse files
authored
Merge branch 'codeigniter4:develop' into develop
2 parents ce60e23 + c6ad1de commit 4961b39

46 files changed

Lines changed: 327 additions & 330 deletions

Some content is hidden

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

admin/RELEASE.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22

33
> Documentation guide based on the releases of `4.0.5` and `4.1.0` on January 31, 2021.
44
>
5-
> Updated for `4.2.10` on November 5, 2022.
5+
> Updated for `4.3.0` on January 10, 2023.
66
>
7-
> -MGatner
7+
> -MGatner, kenjis
8+
9+
## [Minor version only] Merge minor version branch into develop
10+
11+
If you release a new minor version.
12+
13+
* Create PR to merge `4.x` into `develop` and merge it
14+
* Delete the merged `4.x` branch (This closes all PRs to the branch)
15+
* Do the regular release process. Go to the next "Changelog" section
816

917
## Changelog
1018

@@ -17,7 +25,20 @@ When generating the changelog each Pull Request to be included must have one of
1725
PRs with breaking changes must have the following additional label:
1826
- **breaking change** ... PRs that may break existing functionalities
1927

20-
To auto-generate, start drafting a new Release and use the "Generate release notes" button.
28+
### Generate Changelog
29+
30+
To auto-generate, navigate to the [Releases](https://github.com/codeigniter4/CodeIgniter4/releases) page,
31+
click the "Draft a new release" button.
32+
33+
* Tag: "v4.x.x" (Create new tag)
34+
* Target: develop
35+
36+
Click the "Generate release notes" button.
37+
38+
Check the resulting content. If there are items in the *Others* section which
39+
should be included in the changelog, add a label to the PR and regenerate
40+
the changelog.
41+
2142
Copy the resulting content into **CHANGELOG.md** and adjust the format to match the existing content.
2243

2344
## Preparation
@@ -92,6 +113,13 @@ git merge origin/4.x
92113
git merge origin/develop
93114
git push origin HEAD
94115
```
116+
* [Minor version only] Create the next minor upgrade branch `4.x`:
117+
```console
118+
git fetch origin
119+
git switch develop
120+
git switch -c 4.x
121+
git push origin HEAD
122+
```
95123
* Publish any Security Advisories that were resolved from private forks
96124
* Announce the release on the forums and Slack channel (note: this forum is restricted to administrators):
97125
* Make a new topic in the "News & Discussion" forums: https://forum.codeigniter.com/forum-2.html

admin/next-changelog-minor.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,6 @@ Deprecations
7171
Bugs Fixed
7272
**********
7373

74-
See the repo's `CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_ for a complete list of bugs fixed.
74+
See the repo's
75+
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_
76+
for a complete list of bugs fixed.

admin/next-changelog-patch.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ Release Date: Unreleased
1212
BREAKING
1313
********
1414

15-
Enhancements
16-
************
17-
1815
Message Changes
1916
***************
2017

@@ -27,4 +24,6 @@ Deprecations
2724
Bugs Fixed
2825
**********
2926

30-
See the repo's `CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_ for a complete list of bugs fixed.
27+
See the repo's
28+
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_
29+
for a complete list of bugs fixed.

app/Config/Email.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
class Email extends BaseConfig
88
{
9-
public string $fromEmail;
10-
public string $fromName;
11-
public string $recipients;
9+
public string $fromEmail = '';
10+
public string $fromName = '';
11+
public string $recipients = '';
1212

1313
/**
1414
* The "user agent"
@@ -28,17 +28,17 @@ class Email extends BaseConfig
2828
/**
2929
* SMTP Server Address
3030
*/
31-
public string $SMTPHost;
31+
public string $SMTPHost = '';
3232

3333
/**
3434
* SMTP Username
3535
*/
36-
public string $SMTPUser;
36+
public string $SMTPUser = '';
3737

3838
/**
3939
* SMTP Password
4040
*/
41-
public string $SMTPPass;
41+
public string $SMTPPass = '';
4242

4343
/**
4444
* SMTP Port

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"phpunit/phpcov": "^8.2",
2626
"phpunit/phpunit": "^9.1",
2727
"predis/predis": "^1.1 || ^2.0",
28-
"rector/rector": "0.15.3",
28+
"rector/rector": "0.15.4",
2929
"vimeo/psalm": "^5.0"
3030
},
3131
"suggest": {

phpstan-baseline.neon.dist

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ parameters:
2525
count: 1
2626
path: system/Cache/Handlers/MemcachedHandler.php
2727

28-
-
29-
message: "#^Variable \\$data might not be defined\\.$#"
30-
count: 1
31-
path: system/Cache/Handlers/MemcachedHandler.php
32-
3328
-
3429
message: "#^Property CodeIgniter\\\\Cache\\\\Handlers\\\\RedisHandler\\:\\:\\$redis \\(Redis\\) in isset\\(\\) is not nullable\\.$#"
3530
count: 1
@@ -200,11 +195,6 @@ parameters:
200195
count: 1
201196
path: system/Helpers/number_helper.php
202197

203-
-
204-
message: "#^Variable \\$count might not be defined\\.$#"
205-
count: 1
206-
path: system/Helpers/url_helper.php
207-
208198
-
209199
message: "#^Property CodeIgniter\\\\Images\\\\Handlers\\\\BaseHandler\\:\\:\\$image \\(CodeIgniter\\\\Images\\\\Image\\) in empty\\(\\) is not falsy\\.$#"
210200
count: 1
@@ -230,21 +220,6 @@ parameters:
230220
count: 4
231221
path: system/Images/Handlers/ImageMagickHandler.php
232222

233-
-
234-
message: "#^Variable \\$gravity might not be defined\\.$#"
235-
count: 1
236-
path: system/Images/Handlers/ImageMagickHandler.php
237-
238-
-
239-
message: "#^Variable \\$xAxis might not be defined\\.$#"
240-
count: 1
241-
path: system/Images/Handlers/ImageMagickHandler.php
242-
243-
-
244-
message: "#^Variable \\$yAxis might not be defined\\.$#"
245-
count: 1
246-
path: system/Images/Handlers/ImageMagickHandler.php
247-
248223
-
249224
message: "#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:getDefaultNamespace\\(\\)\\.$#"
250225
count: 3

rector.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
3737
use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
3838
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
39-
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
4039
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
4140
use Rector\Php71\Rector\FuncCall\CountOnNullRector;
4241
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
@@ -106,9 +105,6 @@
106105
// sometime too detail
107106
CountOnNullRector::class,
108107

109-
// may not be unitialized on purpose
110-
AddDefaultValueForUndefinedVariableRector::class,
111-
112108
// use mt_rand instead of random_int on purpose on non-cryptographically random
113109
RandomFunctionRector::class,
114110

system/Cache/Handlers/MemcachedHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ public function initialize()
124124
*/
125125
public function get(string $key)
126126
{
127-
$key = static::validateKey($key, $this->prefix);
127+
$data = [];
128+
$key = static::validateKey($key, $this->prefix);
128129

129130
if ($this->memcached instanceof Memcached) {
130131
$data = $this->memcached->get($key);

system/Commands/Generators/MigrationGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function run(array $params)
9797
*/
9898
protected function prepare(string $class): string
9999
{
100+
$data = [];
100101
$data['session'] = false;
101102

102103
if ($this->getOption('session')) {

system/Commands/Generators/SessionMigrationGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public function run(array $params)
8989
*/
9090
protected function prepare(string $class): string
9191
{
92+
$data = [];
9293
$data['session'] = true;
9394
$data['table'] = $this->getOption('t');
9495
$data['DBGroup'] = $this->getOption('g');

0 commit comments

Comments
 (0)