Skip to content

Commit c9999cf

Browse files
authored
Merge branch '4.3' into BatchUpdateSQL
2 parents b69980b + f9da5ad commit c9999cf

27 files changed

+254
-130
lines changed

admin/RELEASE.md

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,7 @@ git clone [email protected]:codeigniter4/userguide.git
5151
* Create a new PR from `develop` to `master`:
5252
* Title: "4.x.x Ready code"
5353
* Description: blank
54-
* Merge the PR then fast-forward `develop` to catch the merge commit
55-
* Update the next minor upgrade branch `4.x`
56-
```console
57-
git fetch origin
58-
git checkout 4.x
59-
git merge origin/4.x
60-
git merge origin/develop
61-
git push origin HEAD
62-
```
63-
* Create a new Release:
54+
* Merge the PR then create a new Release:
6455
* Version: "v4.x.x"
6556
* Title: "CodeIgniter 4.x.x"
6657
* Description:
@@ -76,25 +67,23 @@ composer create-project codeigniter4/appstarter release-test
7667
cd release-test
7768
composer test && composer info codeigniter4/framework
7869
```
79-
* publish any Security Advisories that were resolved from private forks
80-
81-
## User Guide
82-
83-
**This is now handled by GitHub Actions!**
84-
85-
Verify that the Actions succeeded:
86-
* "Deploy User Guide", this repo
87-
* "Deploy Production", UG repo
88-
* "pages-build-deployment", both repos
89-
90-
See the legacy notes in Appendix for reference or to help manually recover from workflow failures.
91-
92-
## Announcement
93-
94-
> Note: This forum is restricted to administrators.
95-
96-
* Make a new topic in the "News & Discussion" forums: https://forum.codeigniter.com/forum-2.html
97-
* The content is somewhat organic, but should include any major features and changes as well as a link to the User Guide's changelog
70+
* Verify that the User Guide Actions succeeded:
71+
* "Deploy User Guide", framework repo
72+
* "Deploy Production", UG repo
73+
* "pages-build-deployment", both repos
74+
* Fast-forward `develop` branch to catch the merge commit from `master`
75+
* Update the next minor upgrade branch `4.x`:
76+
```console
77+
git fetch origin
78+
git checkout 4.x
79+
git merge origin/4.x
80+
git merge origin/develop
81+
git push origin HEAD
82+
```
83+
* Publish any Security Advisories that were resolved from private forks
84+
* Announce the release on the forums and Slack channel (note: this forum is restricted to administrators):
85+
* Make a new topic in the "News & Discussion" forums: https://forum.codeigniter.com/forum-2.html
86+
* The content is somewhat organic, but should include any major features and changes as well as a link to the User Guide's changelog
9887

9988
## After Publishing Security Advisory
10089

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"phpstan/phpstan": "^1.7.1",
2525
"phpunit/phpunit": "^9.1",
2626
"predis/predis": "^1.1 || ^2.0",
27-
"rector/rector": "0.14.1",
27+
"rector/rector": "0.14.2",
2828
"vimeo/psalm": "^4.26"
2929
},
3030
"suggest": {

contributing/workflow.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,29 @@ For instance, to commit your work from a debugging session:
179179

180180
Just make sure that your commits in a feature branch are all related.
181181

182+
### GPG-Signing Old Commits
183+
184+
Any developer can forget GPG-signing their commits with the option `-S`, like `git commit -S -m 'Signed GPG'`. In such a case, all you need to do is the following:
185+
186+
Latest commit only:
187+
```console
188+
> git switch your-branch
189+
> git commit --amend --no-edit --no-verify -S
190+
> git push --force-with-lease origin your-branch
191+
```
192+
193+
All commits:
194+
```console
195+
> git switch your-branch
196+
> git rebase -i --root --exec 'git commit --amend --no-edit --no-verify -S'
197+
> git push --force-with-lease origin your-branch
198+
```
199+
200+
As a faster alternative, you can still securely sign commits without the `-S` option in `git commit` by setting `git config --global commit.gpgsign true` and `git config --global user.signingkey 3AC5C34371567BD2` to all local repositories. Without the `--global` option, the change is applied to one local repository only.
201+
202+
> **Note**
203+
> `3AC5C34371567BD2` is your GPG Key ID
204+
182205
### Changing a Commit Message
183206

184207
See <https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message>.

phpstan-baseline.neon.dist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -635,11 +635,6 @@ parameters:
635635
count: 1
636636
path: system/Throttle/Throttler.php
637637

638-
-
639-
message: "#^Variable \\$error on left side of \\?\\? always exists and is always null\\.$#"
640-
count: 1
641-
path: system/Validation/Validation.php
642-
643638
-
644639
message: "#^Property CodeIgniter\\\\View\\\\Cell\\:\\:\\$cache \\(CodeIgniter\\\\Cache\\\\CacheInterface\\) in empty\\(\\) is not falsy\\.$#"
645640
count: 2

rector.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@
110110
__DIR__ . '/app/Config/Validation.php',
111111
__DIR__ . '/tests/system/Validation/StrictRules/ValidationTest.php',
112112
__DIR__ . '/tests/system/Validation/ValidationTest.php',
113-
114-
// expected Qualified name
115-
__DIR__ . '/tests/system/Autoloader/FileLocatorTest.php',
116-
__DIR__ . '/tests/system/Router/RouteCollectionTest.php',
117113
],
118114

119115
// sometime too detail

system/BaseModel.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use CodeIgniter\Exceptions\ModelException;
2020
use CodeIgniter\I18n\Time;
2121
use CodeIgniter\Pager\Pager;
22-
use CodeIgniter\Validation\Validation;
2322
use CodeIgniter\Validation\ValidationInterface;
2423
use Config\Services;
2524
use InvalidArgumentException;
@@ -198,7 +197,7 @@ abstract class BaseModel
198197
/**
199198
* Our validator instance.
200199
*
201-
* @var Validation
200+
* @var ValidationInterface
202201
*/
203202
protected $validation;
204203

@@ -326,7 +325,7 @@ public function __construct(?ValidationInterface $validation = null)
326325
$this->tempAllowCallbacks = $this->allowCallbacks;
327326

328327
/**
329-
* @var Validation|null $validation
328+
* @var ValidationInterface|null $validation
330329
*/
331330
$validation ??= Services::validation(null, false);
332331
$this->validation = $validation;

system/CodeIgniter.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -718,18 +718,13 @@ protected function generateCacheName(Cache $config): string
718718
return md5($this->request->getPath());
719719
}
720720

721-
$uri = $this->request->getUri();
722-
if ($config->cacheQueryString) {
723-
if (is_array($config->cacheQueryString)) {
724-
$name = URI::createURIString($uri->getScheme(), $uri->getAuthority(), $uri->getPath(), $uri->getQuery(['only' => $config->cacheQueryString]));
725-
} else {
726-
$name = URI::createURIString($uri->getScheme(), $uri->getAuthority(), $uri->getPath(), $uri->getQuery());
727-
}
728-
} else {
729-
$name = URI::createURIString($uri->getScheme(), $uri->getAuthority(), $uri->getPath());
730-
}
721+
$uri = clone $this->request->getUri();
722+
723+
$query = $config->cacheQueryString
724+
? $uri->getQuery(is_array($config->cacheQueryString) ? ['only' => $config->cacheQueryString] : [])
725+
: '';
731726

732-
return md5($name);
727+
return md5($uri->setFragment('')->setQuery($query));
733728
}
734729

735730
/**

system/Config/BaseService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
use CodeIgniter\Session\Session;
5050
use CodeIgniter\Throttle\Throttler;
5151
use CodeIgniter\Typography\Typography;
52-
use CodeIgniter\Validation\Validation;
52+
use CodeIgniter\Validation\ValidationInterface;
5353
use CodeIgniter\View\Cell;
5454
use CodeIgniter\View\Parser;
5555
use CodeIgniter\View\RendererInterface;
@@ -127,7 +127,7 @@
127127
* @method static Toolbar toolbar(ConfigToolbar $config = null, $getShared = true)
128128
* @method static Typography typography($getShared = true)
129129
* @method static URI uri($uri = null, $getShared = true)
130-
* @method static Validation validation(ConfigValidation $config = null, $getShared = true)
130+
* @method static ValidationInterface validation(ConfigValidation $config = null, $getShared = true)
131131
* @method static Cell viewcell($getShared = true)
132132
*/
133133
class BaseService

system/Config/Services.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
use CodeIgniter\Throttle\Throttler;
5555
use CodeIgniter\Typography\Typography;
5656
use CodeIgniter\Validation\Validation;
57+
use CodeIgniter\Validation\ValidationInterface;
5758
use CodeIgniter\View\Cell;
5859
use CodeIgniter\View\Parser;
5960
use CodeIgniter\View\RendererInterface;
@@ -733,7 +734,7 @@ public static function uri(?string $uri = null, bool $getShared = true)
733734
/**
734735
* The Validation class provides tools for validating input data.
735736
*
736-
* @return Validation
737+
* @return ValidationInterface
737738
*/
738739
public static function validation(?ValidationConfig $config = null, bool $getShared = true)
739740
{

system/Controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use CodeIgniter\HTTP\RequestInterface;
1616
use CodeIgniter\HTTP\ResponseInterface;
1717
use CodeIgniter\Validation\Exceptions\ValidationException;
18-
use CodeIgniter\Validation\Validation;
18+
use CodeIgniter\Validation\ValidationInterface;
1919
use Config\Services;
2020
use Psr\Log\LoggerInterface;
2121

@@ -62,7 +62,7 @@ class Controller
6262
/**
6363
* Once validation has been run, will hold the Validation instance.
6464
*
65-
* @var Validation
65+
* @var ValidationInterface
6666
*/
6767
protected $validator;
6868

0 commit comments

Comments
 (0)