Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into 4.6
Browse files Browse the repository at this point in the history
 Conflicts:
	user_guide_src/source/changelogs/index.rst
	user_guide_src/source/installation/upgrading.rst
  • Loading branch information
kenjis committed Sep 10, 2024
2 parents d9902df + 092d85b commit d005c44
Show file tree
Hide file tree
Showing 11 changed files with 156 additions and 49 deletions.
48 changes: 26 additions & 22 deletions admin/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
- `4.y`: The next minor version. (e.g., `4.6`)
- `4.z`: The next next minor version. (e.g., `4.7`)

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

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

## Preparation

Work off direct clones of the repos so the release branches persist for a time.

* [ ] Clone both **codeigniter4/CodeIgniter4** and **codeigniter4/userguide** and
resolve any necessary PRs
```console
rm -rf CodeIgniter4.bk userguide.bk
mv CodeIgniter4 CodeIgniter4.bk
mv userguide userguide.bk
git clone git@github.com:codeigniter4/CodeIgniter4.git
git clone git@github.com:codeigniter4/userguide.git
```
* [ ] Vet the **admin/** folders for any removed hidden files (Action deploy scripts
*do not remove these*)
```console
cd CodeIgniter4
git diff --name-status origin/master admin/
```

## Changelog

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

## Preparation

Work off direct clones of the repos so the release branches persist for a time.

* [ ] Clone both **codeigniter4/CodeIgniter4** and **codeigniter4/userguide** and
resolve any necessary PRs
```console
rm -rf CodeIgniter4.bk userguide.bk
mv CodeIgniter4 CodeIgniter4.bk
mv userguide userguide.bk
git clone git@github.com:codeigniter4/CodeIgniter4.git
git clone git@github.com:codeigniter4/userguide.git
```
* [ ] Vet the **admin/** folders for any removed hidden files (Action deploy scripts
*do not remove these*)
```console
cd CodeIgniter4
git diff --name-status origin/master admin/
```
* [ ] Merge any Security Advisory PRs in private forks

## Process

> **Note** Most changes that need noting in the User Guide and docs should have
> [!NOTE]
> Most changes that need noting in the User Guide and docs should have
> been included with their PR, so this process assumes you will not be
> generating much new content.

* [ ] Merge any Security Advisory PRs in private forks
* [ ] Replace **CHANGELOG.md** with the new version generated above
* [ ] Update **user_guide_src/source/changelogs/v4.x.x.rst**
* Remove the section titles that have no items
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "1.2.4"
"rector/rector": "1.2.5"
},
"replace": {
"codeigniter4/framework": "self.version"
Expand Down
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
use Rector\TypeDeclaration\Rector\Function_\AddFunctionVoidReturnTypeWhereNoReturnRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use Utils\Rector\PassStrictParameterToFunctionParameterRector;
use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector;
Expand Down Expand Up @@ -215,6 +216,7 @@
AddClosureVoidReturnTypeWhereNoReturnRector::class,
AddFunctionVoidReturnTypeWhereNoReturnRector::class,
AddMethodCallBasedStrictParamTypeRector::class,
TypedPropertyFromAssignsRector::class,
])
->withConfiguredRule(StringClassNameToClassConstantRector::class, [
// keep '\\' prefix string on string '\Foo\Bar'
Expand Down
4 changes: 2 additions & 2 deletions system/Cache/Handlers/RedisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function initialize()
public function get(string $key)
{
$key = static::validateKey($key, $this->prefix);
$data = $this->redis->hMGet($key, ['__ci_type', '__ci_value']);
$data = $this->redis->hMget($key, ['__ci_type', '__ci_value']);

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

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

Expand Down
8 changes: 4 additions & 4 deletions system/Config/Factories.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class Factories
*
* @var array<string, array<string, bool|string|null>>
*/
private static $options = [];
private static array $options = [];

/**
* Explicit options for the Config
Expand Down Expand Up @@ -65,7 +65,7 @@ final class Factories
*
* @var array<string, array<string, class-string>>
*/
private static $aliases = [];
private static array $aliases = [];

/**
* Store for instances of any component that
Expand All @@ -78,7 +78,7 @@ final class Factories
*
* @var array<string, array<class-string, object>>
*/
private static $instances = [];
private static array $instances = [];

/**
* Whether the component instances are updated?
Expand All @@ -87,7 +87,7 @@ final class Factories
*
* @internal For caching only
*/
private static $updated = [];
private static array $updated = [];

/**
* Define the class to load. You can *override* the concrete class.
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/changelogs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See all the changes.
:titlesonly:

v4.6.0
v4.5.6
v4.5.5
v4.5.4
v4.5.3
Expand Down
35 changes: 35 additions & 0 deletions user_guide_src/source/changelogs/v4.5.6.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#############
Version 4.5.6
#############

Release Date: Unreleased

**4.5.6 release of CodeIgniter4**

.. contents::
:local:
:depth: 3

********
BREAKING
********

***************
Message Changes
***************

*******
Changes
*******

************
Deprecations
************

**********
Bugs Fixed
**********

See the repo's
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_
for a complete list of bugs fixed.
25 changes: 17 additions & 8 deletions user_guide_src/source/dbmgmt/migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,28 @@ include migrations from all namespaces.
Migration File Names
********************

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

* 2024-09-08-013653_AddBlogTable.php

Each migration is numbered using the timestamp (**2024-09-08-013653**) when the
migration was created, in **YYYY-MM-DD-HHIISS** format.

Prefix your migration files with the migration number followed by an underscore
and a descriptive name for the migration. The year, month, and date can be separated
from each other by dashes, underscores, or not at all. For example:
The descriptive name (**AddBlogTable**) for the migration is a classname in PHP.
So you must name a valid classname.

The year, month, day, and time in a prefix can be separated from each other by
dashes (``-``), underscores (``_``), or not at all. For example:

* 2012-10-31-100538_AlterBlogTrackViews.php
* 2012_10_31_100539_AlterBlogAddTranslations.php
* 20121031100537_AddBlog.php

Each Migration is run in numeric order forward or backwards depending on the
method taken. This helps prevent numbering conflicts when working in a team
environment.

******************
Create a Migration
******************
Expand All @@ -49,7 +58,7 @@ The database connection and the database Forge class are both available to you t
``$this->db`` and ``$this->forge``, respectively.

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

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

Expand Down
24 changes: 12 additions & 12 deletions user_guide_src/source/helpers/url_helper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The following functions are available:
.. php:function:: site_url([$uri = ''[, $protocol = null[, $altConfig = null]]])
:param array|string $uri: URI string or array of URI segments.
:param string $protocol: Protocol, e.g., 'http' or 'https'. If empty string '' is set, a protocol-relative link is returned.
:param string $protocol: Protocol, e.g., ``'http'`` or ``'https'``. If empty string ``''`` is set, a protocol-relative link is returned.
:param \\Config\\App $altConfig: Alternate configuration to use.
:returns: Site URL
:rtype: string
Expand Down Expand Up @@ -57,7 +57,7 @@ The following functions are available:
.. php:function:: base_url([$uri = ''[, $protocol = null]])
:param array|string $uri: URI string or array of URI segments.
:param string $protocol: Protocol, e.g., 'http' or 'https'. If empty string '' is set, a protocol-relative link is returned.
:param string $protocol: Protocol, e.g., ``'http'`` or ``'https'``. If empty string ``''`` is set, a protocol-relative link is returned.
:returns: Base URL
:rtype: string

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

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

Expand Down Expand Up @@ -182,10 +182,10 @@ The following functions are available:

.. php:function:: anchor([$uri = ''[, $title = ''[, $attributes = ''[, $altConfig = null]]]])
:param mixed $uri: URI string or array of URI segments
:param string $title: Anchor title
:param mixed $attributes: HTML attributes
:param \\Config\\App $altConfig: Alternate configuration to use
:param array|string $uri: URI string or array of URI segments
:param string $title: Anchor title
:param array|object|string $attributes: HTML attributes
:param \\Config\\App|null $altConfig: Alternate configuration to use
:returns: HTML hyperlink (anchor tag)
:rtype: string

Expand Down Expand Up @@ -222,7 +222,7 @@ The following functions are available:
:param string $uri: URI string
:param string $title: Anchor title
:param mixed $attributes: HTML attributes
:param array|false|object|string $attributes: HTML attributes
:param \\Config\\App $altConfig: Alternate configuration to use
:returns: Pop-up hyperlink
:rtype: string
Expand Down Expand Up @@ -262,7 +262,7 @@ The following functions are available:
:param string $email: E-mail address
:param string $title: Anchor title
:param mixed $attributes: HTML attributes
:param array|object|string $attributes: HTML attributes
:returns: A "mail to" hyperlink
:rtype: string

Expand All @@ -281,7 +281,7 @@ The following functions are available:
:param string $email: E-mail address
:param string $title: Anchor title
:param mixed $attributes: HTML attributes
:param array|object|string $attributes: HTML attributes
:returns: A spam-safe "mail to" hyperlink
:rtype: string

Expand All @@ -292,7 +292,7 @@ The following functions are available:
.. php:function:: auto_link($str[, $type = 'both'[, $popup = false]])
:param string $str: Input string
:param string $type: Link type ('email', 'url' or 'both')
:param string $type: Link type (``'email'``, ``'url'`` or ``'both'``)
:param bool $popup: Whether to create popup links
:returns: Linkified string
:rtype: string
Expand Down Expand Up @@ -378,7 +378,7 @@ The following functions are available:
.. php:function:: url_to($controller[, ...$args])
:param string $controller: Route name or Controller::method
:param mixed ...$args: One or more parameters to be passed to the route. The last parameter allows you to set the locale.
:param int|string ...$args: One or more parameters to be passed to the route. The last parameter allows you to set the locale.
:returns: Absolute URL
:rtype: string

Expand Down
55 changes: 55 additions & 0 deletions user_guide_src/source/installation/upgrade_456.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#############################
Upgrading from 4.5.5 to 4.5.6
#############################

Please refer to the upgrade instructions corresponding to your installation method.

- :ref:`Composer Installation App Starter Upgrading <app-starter-upgrading>`
- :ref:`Composer Installation Adding CodeIgniter4 to an Existing Project Upgrading <adding-codeigniter4-upgrading>`
- :ref:`Manual Installation Upgrading <installing-manual-upgrading>`

.. contents::
:local:
:depth: 2

**********************
Mandatory File Changes
**********************

****************
Breaking Changes
****************

*********************
Breaking Enhancements
*********************

*************
Project Files
*************

Some files in the **project space** (root, app, public, writable) received updates. Due to
these files being outside of the **system** scope they will not be changed without your intervention.

.. note:: There are some third-party CodeIgniter modules available to assist
with merging changes to the project space:
`Explore on Packagist <https://packagist.org/explore/?query=codeigniter4%20updates>`_.

Content Changes
===============

The following files received significant changes (including deprecations or visual adjustments)
and it is recommended that you merge the updated versions with your application:

Config
------

- @TODO

All Changes
===========

This is a list of all files in the **project space** that received changes;
many will be simple comments or formatting that have no effect on the runtime:

- @TODO
1 change: 1 addition & 0 deletions user_guide_src/source/installation/upgrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ See also :doc:`./backward_compatibility_notes`.
backward_compatibility_notes

upgrade_460
upgrade_456
upgrade_455
upgrade_454
upgrade_453
Expand Down

0 comments on commit d005c44

Please sign in to comment.