Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Apr 6, 2023
2 parents fea41d8 + 848c598 commit c8be16b
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"phpunit/phpcov": "^8.2",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "0.15.23",
"rector/rector": "0.15.24",
"vimeo/psalm": "^5.0"
},
"suggest": {
Expand Down
44 changes: 35 additions & 9 deletions contributing/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@ Writing CodeIgniter Documentation
#################################

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

A local table of contents should always be included, like the one below.
It is created automatically by inserting the following::

.. contents::
:local:
:depth: 2
.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

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

You can read more about installing all tools in /user_guide_src/README.rst
You can read more about installing all tools in **user_guide_src/README.rst**

*****************
Table of Contents
*****************

A local table of contents should always be included, like the one below.
It is created automatically by inserting the following::

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

*****************************************
Page and Section Headings and Subheadings
Expand Down Expand Up @@ -119,15 +125,21 @@ You can reference a page like the following::
To a URL
========

::

`CodeIgniter 4 framework <https://github.com/codeigniter4/framework>`_

To a Function
=============

::

:php:func:`dot_array_search()`

To a Method
=============
===========

::

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

Expand All @@ -138,10 +150,24 @@ Other Directives
New Feature
===========

::

.. versionadded:: 4.3.0

Deprecated
==========

::

.. deprecated:: 4.3.0
Use :php:meth:`CodeIgniter\\Database\\BaseBuilder::setData()` instead.

***************
Text Decoration
***************

As a general rule, we use ``**`` for in-line file paths, and `````` for source code.

E.g.::

Open the **app/Config/Filters.php** file and update the ``$methods`` property like the following:
8 changes: 4 additions & 4 deletions user_guide_src/source/installation/upgrade_4xx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ Application Structure
Routing
=======

- 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`.
- The Auto Routing is disabled by default. You need to :ref:`define all routes
<defined-route-routing>` by default.
- If you want to use the Auto Routing in the same way as CI3, you need to enable
:ref:`auto-routing-legacy`.
- CI4 also has an optional new more secure :ref:`auto-routing-improved`.

Model, View and Controller
Expand Down Expand Up @@ -204,6 +207,3 @@ Upgrading Libraries
upgrade_sessions
upgrade_validations
upgrade_view_parser

.. note::
More upgrade guides coming soon
3 changes: 3 additions & 0 deletions user_guide_src/source/installation/upgrade_validations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ What has been changed
=====================
- If you want to change validation error display, you have to set CI4 :ref:`validation View templates <validation-customizing-error-display>`.
- CI4 validation has no Callbacks nor Callable in CI3.
Use :ref:`Rule Classes <validation-using-rule-classes>` or
:ref:`Closure Rule <validation-using-closure-rule>`
instead.
- CI4 validation format rules do not permit empty string.
- CI4 validation never changes your data.
- Since v4.3.0, :php:func:`validation_errors()` has been introduced, but the API is different from CI3's.
Expand Down
3 changes: 3 additions & 0 deletions user_guide_src/source/libraries/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ Redirection on Failure
Since v4.3.0, when a request fails the CSRF validation check,
it will throw a SecurityException by default,

.. note:: In production environment, when you use HTML forms, it is recommended
to enable this redirection for a better user experience.

If you want to make it redirect to the previous page,
change the following config parameter value in
**app/Config/Security.php**:
Expand Down
2 changes: 2 additions & 0 deletions user_guide_src/source/libraries/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ right after the name of the field the error should belong to::
Creating Custom Rules
*********************

.. _validation-using-rule-classes:

Using Rule Classes
==================

Expand Down

0 comments on commit c8be16b

Please sign in to comment.