Skip to content

Commit 8119039

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.7
# Conflicts: # user_guide_src/source/changelogs/index.rst # user_guide_src/source/installation/upgrading.rst
2 parents 6cddc29 + 10d3915 commit 8119039

File tree

8 files changed

+159
-41
lines changed

8 files changed

+159
-41
lines changed

admin/framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"mikey179/vfsstream": "^1.6.12",
2525
"nexusphp/cs-config": "^3.6",
2626
"phpunit/phpunit": "^10.5.16 || ^11.2",
27-
"predis/predis": "^1.1 || ^2.3"
27+
"predis/predis": "^3.0"
2828
},
2929
"suggest": {
3030
"ext-curl": "If you use CURLRequest class",

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"phpstan/phpstan-strict-rules": "^2.0",
2828
"phpunit/phpcov": "^9.0.2 || ^10.0",
2929
"phpunit/phpunit": "^10.5.16 || ^11.2",
30-
"predis/predis": "^1.1 || ^2.3",
31-
"rector/rector": "2.0.14",
30+
"predis/predis": "^3.0",
31+
"rector/rector": "2.0.15",
3232
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
3333
},
3434
"replace": {

system/ThirdParty/Escaper/Escaper.php

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* @final
3232
*/
33-
class Escaper
33+
class Escaper implements EscaperInterface
3434
{
3535
/**
3636
* Entity Map mapping Unicode codepoints to any available named HTML entities.
@@ -183,24 +183,13 @@ public function getEncoding()
183183
return $this->encoding;
184184
}
185185

186-
/**
187-
* Escape a string for the HTML Body context where there are very few characters
188-
* of special meaning. Internally this will use htmlspecialchars().
189-
*
190-
* @return ($string is non-empty-string ? non-empty-string : string)
191-
*/
186+
/** @inheritDoc */
192187
public function escapeHtml(string $string)
193188
{
194189
return htmlspecialchars($string, $this->htmlSpecialCharsFlags, $this->encoding);
195190
}
196191

197-
/**
198-
* Escape a string for the HTML Attribute context. We use an extended set of characters
199-
* to escape that are not covered by htmlspecialchars() to cover cases where an attribute
200-
* might be unquoted or quoted illegally (e.g. backticks are valid quotes for IE).
201-
*
202-
* @return ($string is non-empty-string ? non-empty-string : string)
203-
*/
192+
/** @inheritDoc */
204193
public function escapeHtmlAttr(string $string)
205194
{
206195
$string = $this->toUtf8($string);
@@ -214,17 +203,7 @@ public function escapeHtmlAttr(string $string)
214203
return $this->fromUtf8($result);
215204
}
216205

217-
/**
218-
* Escape a string for the Javascript context. This does not use json_encode(). An extended
219-
* set of characters are escaped beyond ECMAScript's rules for Javascript literal string
220-
* escaping in order to prevent misinterpretation of Javascript as HTML leading to the
221-
* injection of special characters and entities. The escaping used should be tolerant
222-
* of cases where HTML escaping was not applied on top of Javascript escaping correctly.
223-
* Backslash escaping is not used as it still leaves the escaped character as-is and so
224-
* is not useful in a HTML context.
225-
*
226-
* @return ($string is non-empty-string ? non-empty-string : string)
227-
*/
206+
/** @inheritDoc */
228207
public function escapeJs(string $string)
229208
{
230209
$string = $this->toUtf8($string);
@@ -238,24 +217,13 @@ public function escapeJs(string $string)
238217
return $this->fromUtf8($result);
239218
}
240219

241-
/**
242-
* Escape a string for the URI or Parameter contexts. This should not be used to escape
243-
* an entire URI - only a subcomponent being inserted. The function is a simple proxy
244-
* to rawurlencode() which now implements RFC 3986 since PHP 5.3 completely.
245-
*
246-
* @return ($string is non-empty-string ? non-empty-string : string)
247-
*/
220+
/** @inheritDoc */
248221
public function escapeUrl(string $string)
249222
{
250223
return rawurlencode($string);
251224
}
252225

253-
/**
254-
* Escape a string for the CSS context. CSS escaping can be applied to any string being
255-
* inserted into CSS and escapes everything except alphanumerics.
256-
*
257-
* @return ($string is non-empty-string ? non-empty-string : string)
258-
*/
226+
/** @inheritDoc */
259227
public function escapeCss(string $string)
260228
{
261229
$string = $this->toUtf8($string);
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Laminas\Escaper;
6+
7+
/**
8+
* Interface for context specific methods for use in secure output escaping
9+
*/
10+
interface EscaperInterface
11+
{
12+
/**
13+
* Escape a string for the HTML Body context where there are very few characters
14+
* of special meaning. Internally this will use htmlspecialchars().
15+
*
16+
* @return ($string is non-empty-string ? non-empty-string : string)
17+
*/
18+
public function escapeHtml(string $string);
19+
20+
/**
21+
* Escape a string for the HTML Attribute context. We use an extended set of characters
22+
* to escape that are not covered by htmlspecialchars() to cover cases where an attribute
23+
* might be unquoted or quoted illegally (e.g. backticks are valid quotes for IE).
24+
*
25+
* @return ($string is non-empty-string ? non-empty-string : string)
26+
*/
27+
public function escapeHtmlAttr(string $string);
28+
29+
/**
30+
* Escape a string for the Javascript context. This does not use json_encode(). An extended
31+
* set of characters are escaped beyond ECMAScript's rules for Javascript literal string
32+
* escaping in order to prevent misinterpretation of Javascript as HTML leading to the
33+
* injection of special characters and entities. The escaping used should be tolerant
34+
* of cases where HTML escaping was not applied on top of Javascript escaping correctly.
35+
* Backslash escaping is not used as it still leaves the escaped character as-is and so
36+
* is not useful in a HTML context.
37+
*
38+
* @return ($string is non-empty-string ? non-empty-string : string)
39+
*/
40+
public function escapeJs(string $string);
41+
42+
/**
43+
* Escape a string for the URI or Parameter contexts. This should not be used to escape
44+
* an entire URI - only a subcomponent being inserted. The function is a simple proxy
45+
* to rawurlencode() which now implements RFC 3986 since PHP 5.3 completely.
46+
*
47+
* @return ($string is non-empty-string ? non-empty-string : string)
48+
*/
49+
public function escapeUrl(string $string);
50+
51+
/**
52+
* Escape a string for the CSS context. CSS escaping can be applied to any string being
53+
* inserted into CSS and escapes everything except alphanumerics.
54+
*
55+
* @return ($string is non-empty-string ? non-empty-string : string)
56+
*/
57+
public function escapeCss(string $string);
58+
}

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.7.0
16+
v4.6.2
1617
v4.6.1
1718
v4.6.0
1819
v4.5.8
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#############
2+
Version 4.6.2
3+
#############
4+
5+
Release Date: Unreleased
6+
7+
**4.6.2 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.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#############################
2+
Upgrading from 4.6.1 to 4.6.2
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

Lines changed: 1 addition & 0 deletions
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_470
20+
upgrade_462
2021
upgrade_461
2122
upgrade_460
2223
upgrade_458

0 commit comments

Comments
 (0)