Skip to content

Commit b55b3e7

Browse files
committed
docs: add user guide
1 parent 681a9c7 commit b55b3e7

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

user_guide_src/source/changelogs/v4.2.2.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ BREAKING
1616
- 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.
1717
- The method signature of ``BaseBuilder.php::insert()`` and ``BaseBuilder.php::update()`` have been changed. The ``?array`` typehint on the ``$set`` parameter was removed.
1818
- 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.
19+
- 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.
1920

2021
Enhancements
2122
************

user_guide_src/source/helpers/text_helper.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ The following functions are available:
4242
- **sha1**: An encrypted random number based on ``sha1()`` (fixed length of 40).
4343
- **crypto**: A random string based on ``random_bytes()``.
4444

45+
.. note:: When you use **crypto**, you must set an even number to the second parameter.
46+
Since v4.2.2, if you set an odd number, ``InvalidArgumentException`` will be thrown.
47+
4548
Usage example:
4649

4750
.. literalinclude:: text_helper/002.php

user_guide_src/source/installation/upgrade_422.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Others
3232

3333
- 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.
3434
- The second parameter ``$ifNotExists`` of ``Forge::_createTable()`` is deprecated. It is no longer used and will be removed in a future release.
35+
- 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.
3536

3637
Breaking Enhancements
3738
*********************

0 commit comments

Comments
 (0)