Skip to content

Commit c8be16b

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.4
2 parents fea41d8 + 848c598 commit c8be16b

File tree

6 files changed

+48
-14
lines changed

6 files changed

+48
-14
lines changed

composer.json

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

contributing/documentation.rst

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@ Writing CodeIgniter Documentation
33
#################################
44

55
CodeIgniter uses Sphinx to generate its documentation in a variety of formats,
6-
using reStructuredText to handle the formatting. If you are familiar with
6+
using `reStructuredText`_ to handle the formatting. If you are familiar with
77
Markdown or Textile, you will quickly grasp reStructuredText. The focus is
88
on readability and user friendliness.
99
While they can be quite technical, we always write for humans!
1010

11-
A local table of contents should always be included, like the one below.
12-
It is created automatically by inserting the following::
13-
14-
.. contents::
15-
:local:
16-
:depth: 2
11+
.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
1712

1813
.. contents::
1914
:local:
@@ -26,7 +21,18 @@ To see the rendered HTML, ePub, PDF, etc., you will need to install Sphinx
2621
along with the PHP domain extension for Sphinx. The underlying requirement
2722
is to have Python installed.
2823

29-
You can read more about installing all tools in /user_guide_src/README.rst
24+
You can read more about installing all tools in **user_guide_src/README.rst**
25+
26+
*****************
27+
Table of Contents
28+
*****************
29+
30+
A local table of contents should always be included, like the one below.
31+
It is created automatically by inserting the following::
32+
33+
.. contents::
34+
:local:
35+
:depth: 2
3036

3137
*****************************************
3238
Page and Section Headings and Subheadings
@@ -119,15 +125,21 @@ You can reference a page like the following::
119125
To a URL
120126
========
121127

128+
::
129+
122130
`CodeIgniter 4 framework <https://github.com/codeigniter4/framework>`_
123131

124132
To a Function
125133
=============
126134

135+
::
136+
127137
:php:func:`dot_array_search()`
128138

129139
To a Method
130-
=============
140+
===========
141+
142+
::
131143

132144
:php:meth:`CodeIgniter\\HTTP\\Response::setCookie()`
133145

@@ -138,10 +150,24 @@ Other Directives
138150
New Feature
139151
===========
140152

153+
::
154+
141155
.. versionadded:: 4.3.0
142156

143157
Deprecated
144158
==========
145159

160+
::
161+
146162
.. deprecated:: 4.3.0
147163
Use :php:meth:`CodeIgniter\\Database\\BaseBuilder::setData()` instead.
164+
165+
***************
166+
Text Decoration
167+
***************
168+
169+
As a general rule, we use ``**`` for in-line file paths, and `````` for source code.
170+
171+
E.g.::
172+
173+
Open the **app/Config/Filters.php** file and update the ``$methods`` property like the following:

user_guide_src/source/installation/upgrade_4xx.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ Application Structure
6262
Routing
6363
=======
6464

65-
- The Auto Routing is disabled by default. If you want to use the Auto Routing in the same way as CI3, you need to enable :ref:`auto-routing-legacy`.
65+
- The Auto Routing is disabled by default. You need to :ref:`define all routes
66+
<defined-route-routing>` by default.
67+
- If you want to use the Auto Routing in the same way as CI3, you need to enable
68+
:ref:`auto-routing-legacy`.
6669
- CI4 also has an optional new more secure :ref:`auto-routing-improved`.
6770

6871
Model, View and Controller
@@ -204,6 +207,3 @@ Upgrading Libraries
204207
upgrade_sessions
205208
upgrade_validations
206209
upgrade_view_parser
207-
208-
.. note::
209-
More upgrade guides coming soon

user_guide_src/source/installation/upgrade_validations.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ What has been changed
1515
=====================
1616
- If you want to change validation error display, you have to set CI4 :ref:`validation View templates <validation-customizing-error-display>`.
1717
- CI4 validation has no Callbacks nor Callable in CI3.
18+
Use :ref:`Rule Classes <validation-using-rule-classes>` or
19+
:ref:`Closure Rule <validation-using-closure-rule>`
20+
instead.
1821
- CI4 validation format rules do not permit empty string.
1922
- CI4 validation never changes your data.
2023
- Since v4.3.0, :php:func:`validation_errors()` has been introduced, but the API is different from CI3's.

user_guide_src/source/libraries/security.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ Redirection on Failure
121121
Since v4.3.0, when a request fails the CSRF validation check,
122122
it will throw a SecurityException by default,
123123

124+
.. note:: In production environment, when you use HTML forms, it is recommended
125+
to enable this redirection for a better user experience.
126+
124127
If you want to make it redirect to the previous page,
125128
change the following config parameter value in
126129
**app/Config/Security.php**:

user_guide_src/source/libraries/validation.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,8 @@ right after the name of the field the error should belong to::
612612
Creating Custom Rules
613613
*********************
614614

615+
.. _validation-using-rule-classes:
616+
615617
Using Rule Classes
616618
==================
617619

0 commit comments

Comments
 (0)