Skip to content

Commit ecc77fc

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.3
Conflicts: user_guide_src/source/changelogs/index.rst
2 parents c02dd44 + 32a5ccc commit ecc77fc

File tree

10 files changed

+56
-36
lines changed

10 files changed

+56
-36
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
33
Each pull request should address a single issue and have a meaningful title.
44
5+
- Pull requests must be in English.
6+
- If a pull request fixes an issue, reference the issue with a suitable keyword (e.g., Fixes <issue number>).
57
- All bug fixes should be sent to the __"develop"__ branch, this is where the next bug fix version will be developed.
68
- PRs with any enhancement should be sent to the next minor version branch, e.g. __"4.3"__
79
@@ -15,15 +17,3 @@ Explain what you have changed, and why.
1517
- [ ] Unit testing, with >80% coverage
1618
- [ ] User guide updated
1719
- [ ] Conforms to style guide
18-
19-
<!--
20-
21-
**Notes**
22-
- Pull requests must be in English
23-
- If the PR solves an issue, reference it with a suitable verb and the issue number
24-
(e.g. fixes <hash>12345)
25-
- Unsolicited pull requests will be considered, but there is no guarantee of acceptance
26-
- Pull requests should be from a feature branch in the contributor's fork of the repository
27-
to the develop branch of the project repository
28-
29-
-->

.github/workflows/test-deptrac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Setup PHP
4040
uses: shivammathur/setup-php@v2
4141
with:
42-
php-version: '8.0'
42+
php-version: '8.1'
4343
tools: composer, phive
4444
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3
4545

.github/workflows/test-phpunit.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ jobs:
4747
strategy:
4848
fail-fast: false
4949
matrix:
50-
php-versions: ['7.4', '8.0', '8.1']
50+
php-versions: ['7.4', '8.0', '8.1', '8.2']
5151
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV', 'OCI8']
5252
mysql-versions: ['5.7']
5353
include:
5454
- php-versions: '7.4'
5555
db-platforms: MySQLi
5656
mysql-versions: '8.0'
57+
- php-versions: '8.2'
58+
composer-option: '--ignore-platform-req=php'
5759

5860
services:
5961
mysql:
@@ -148,8 +150,8 @@ jobs:
148150

149151
- name: Install dependencies
150152
run: |
151-
composer update --ansi --no-interaction
152-
composer remove --ansi --dev --unused -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
153+
composer update --ansi --no-interaction ${{ matrix.composer-option }}
154+
composer remove --ansi --dev --unused ${{ matrix.composer-option }} -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
153155
154156
- name: Profile slow tests in PHP ${{ env.COVERAGE_PHP_VERSION }}
155157
if: matrix.php-versions == env.COVERAGE_PHP_VERSION

CHANGELOG.md

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

3+
## [v4.2.9](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.9) (2022-10-30)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.8...v4.2.9)
5+
6+
**Hotfix release to fix PHPUnit errors (see https://github.com/codeigniter4/CodeIgniter4/pull/6794)**
7+
38
## [v4.2.8](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.8) (2022-10-30)
49
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.7...v4.2.8)
510

system/Config/Factories.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class Factories
3131
* Store of component-specific options, usually
3232
* from CodeIgniter\Config\Factory.
3333
*
34-
* @var array<string, array>
34+
* @var array<string, array<string, bool|string|null>>
3535
*/
3636
protected static $options = [];
3737

3838
/**
3939
* Explicit options for the Config
4040
* component to prevent logic loops.
4141
*
42-
* @var array<string, mixed>
42+
* @var array<string, bool|string|null>
4343
*/
4444
private static array $configOptions = [
4545
'component' => 'config',
@@ -53,7 +53,8 @@ class Factories
5353
* Mapping of class basenames (no namespace) to
5454
* their instances.
5555
*
56-
* @var array<string, string[]>
56+
* @var array<string, array<string, string>>
57+
* @phpstan-var array<string, array<string, class-string>>
5758
*/
5859
protected static $basenames = [];
5960

@@ -63,7 +64,8 @@ class Factories
6364
* A multi-dimensional array with components as
6465
* keys to the array of name-indexed instances.
6566
*
66-
* @var array<string, array>
67+
* @var array<string, array<string, object>>
68+
* @phpstan-var array<string, array<class-string, object>>
6769
*/
6870
protected static $instances = [];
6971

@@ -74,9 +76,10 @@ class Factories
7476
*
7577
* @template T of Model
7678
*
77-
* @param class-string<T> $name
79+
* @phpstan-param class-string<T> $name
7880
*
79-
* @return T
81+
* @return Model
82+
* @phpstan-return T
8083
*/
8184
public static function models(string $name, array $options = [], ?ConnectionInterface &$conn = null)
8285
{
@@ -228,7 +231,7 @@ protected static function verifyInstanceOf(array $options, string $name): bool
228231
*
229232
* @param string $component Lowercase, plural component name
230233
*
231-
* @return array<string, mixed>
234+
* @return array<string, bool|string|null>
232235
*/
233236
public static function getOptions(string $component): array
234237
{
@@ -253,7 +256,7 @@ public static function getOptions(string $component): array
253256
*
254257
* @param string $component Lowercase, plural component name
255258
*
256-
* @return array<string, mixed> The result after applying defaults and normalization
259+
* @return array<string, bool|string|null> The result after applying defaults and normalization
257260
*/
258261
public static function setOptions(string $component, array $values): array
259262
{

system/Session/Session.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function __construct(SessionHandlerInterface $driver, App $config)
196196
/**
197197
* Initialize the session container and starts up the session.
198198
*
199-
* @return mixed
199+
* @return $this|void
200200
*/
201201
public function start()
202202
{
@@ -449,8 +449,8 @@ public function destroy()
449449
* If $data is an array, it is expected to be an array of key/value pairs
450450
* to be set as session properties.
451451
*
452-
* @param array|string $data Property name or associative array of properties
453-
* @param mixed $value Property value if single key provided
452+
* @param array|string $data Property name or associative array of properties
453+
* @param array|bool|float|int|object|string|null $value Property value if single key provided
454454
*/
455455
public function set($data, $value = null)
456456
{
@@ -611,8 +611,8 @@ public function __isset(string $key): bool
611611
* Otherwise, it is interpreted as the identifier of a specific
612612
* flashdata property, with $value containing the property value.
613613
*
614-
* @param array|string $data Property identifier or associative array of properties
615-
* @param array|string $value Property value if $data is a scalar
614+
* @param array|string $data Property identifier or associative array of properties
615+
* @param array|bool|float|int|object|string|null $value Property value if $data is a scalar
616616
*/
617617
public function setFlashdata($data, $value = null)
618618
{
@@ -694,7 +694,7 @@ public function markAsFlashdata($key): bool
694694
/**
695695
* Unmark data in the session as flashdata.
696696
*
697-
* @param mixed $key Property identifier or array of them
697+
* @param array|string $key Property identifier or array of them
698698
*/
699699
public function unmarkFlashdata($key)
700700
{
@@ -743,9 +743,9 @@ public function getFlashKeys(): array
743743
* Sets new data into the session, and marks it as temporary data
744744
* with a set lifespan.
745745
*
746-
* @param array|string $data Session data key or associative array of items
747-
* @param null $value Value to store
748-
* @param int $ttl Time-to-live in seconds
746+
* @param array|string $data Session data key or associative array of items
747+
* @param array|bool|float|int|object|string|null $value Value to store
748+
* @param int $ttl Time-to-live in seconds
749749
*/
750750
public function setTempdata($data, $value = null, int $ttl = 300)
751751
{
@@ -759,7 +759,7 @@ public function setTempdata($data, $value = null, int $ttl = 300)
759759
*
760760
* @param string $key Session data key
761761
*
762-
* @return mixed Session data value or null if not found.
762+
* @return array|bool|float|int|object|string|null Session data value or null if not found.
763763
*/
764764
public function getTempdata(?string $key = null)
765765
{

user_guide_src/source/changelogs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ See all the changes.
1313
:titlesonly:
1414

1515
v4.3.0
16+
v4.2.9
1617
v4.2.8
1718
v4.2.7
1819
v4.2.6
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Version 4.2.9
2+
#############
3+
4+
Release Date: October 30, 2022
5+
6+
**4.2.9 release of CodeIgniter4**
7+
8+
.. contents::
9+
:local:
10+
:depth: 2
11+
12+
**Hotfix release to fix PHPUnit errors in 4.2.8; no other content changes.**
13+
14+
Bugs Fixed
15+
**********
16+
17+
- Fixed a bug that causes `PHP Fatal error: Trait "Nexus\PHPUnit\Extension\Expeditable" not found` when running PHPUnit.
18+
19+
See the repo's `CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_ for a complete list of bugs fixed.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
$image = Config\Services::image('imagick');
3+
$image = \Config\Services::image('imagick');

user_guide_src/source/testing/controllers/005.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
$config = new Config\App();
3+
$config = new \Config\App();
44
$config->appTimezone = 'America/Chicago';
55

66
$results = $this->withConfig($config)

0 commit comments

Comments
 (0)