Skip to content

Commit

Permalink
docs: add user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Aug 4, 2022
1 parent 681a9c7 commit b55b3e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions user_guide_src/source/changelogs/v4.2.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ BREAKING
- The method signature of ``CodeIgniter\Debug\Exceptions::__construct()`` has been changed. The ``IncomingRequest`` typehint on the ``$request`` parameter was removed. Extending classes should likewise remove the parameter so as not to break LSP.
- The method signature of ``BaseBuilder.php::insert()`` and ``BaseBuilder.php::update()`` have been changed. The ``?array`` typehint on the ``$set`` parameter was removed.
- A bug that caused pages to be cached before after filters were executed when using page caching has been fixed. Adding response headers or changing the response body in after filters now caches them correctly.
- Due to a bug fix, now :php:func:`random_string` with the first parameter ``'crypto'`` throws ``InvalidArgumentException`` if the second parameter ``$len`` is an odd number.

Enhancements
************
Expand Down
3 changes: 3 additions & 0 deletions user_guide_src/source/helpers/text_helper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ The following functions are available:
- **sha1**: An encrypted random number based on ``sha1()`` (fixed length of 40).
- **crypto**: A random string based on ``random_bytes()``.

.. note:: When you use **crypto**, you must set an even number to the second parameter.
Since v4.2.2, if you set an odd number, ``InvalidArgumentException`` will be thrown.

Usage example:

.. literalinclude:: text_helper/002.php
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/installation/upgrade_422.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Others

- The method ``Forge::createTable()`` no longer executes a ``CREATE TABLE IF NOT EXISTS``. If table is not found in ``$db->tableExists($table)`` then ``CREATE TABLE`` is executed.
- The second parameter ``$ifNotExists`` of ``Forge::_createTable()`` is deprecated. It is no longer used and will be removed in a future release.
- When you use :php:func:`random_string` with the first parameter ``'crypto'``, now if you set the second parameter ``$len`` to an odd number, ``InvalidArgumentException`` will be thrown. Change the parameter to an even number.

Breaking Enhancements
*********************
Expand Down

0 comments on commit b55b3e7

Please sign in to comment.