|
2 | 2 | Upgrading from 4.1.1 to 4.1.2 |
3 | 3 | ############################# |
4 | 4 |
|
| 5 | +**current_url() and indexPage** |
| 6 | + |
| 7 | +Due to `a bug <https://github.com/codeigniter4/CodeIgniter4/issues/4116>`_ in ``current_url()``, |
| 8 | +the resulting URIs could be incorrect for a project's configuration, most importantly: ``indexPage`` |
| 9 | +would *not* be included. Projects using ``App::$indexPage`` should expect altered values from |
| 10 | +``current_url()`` and all its dependencies (including Response Testing, Pager, Form Helper, Pager, |
| 11 | +and View Parser). Update your projects accordingly. |
| 12 | + |
| 13 | +**Cache Keys** |
| 14 | + |
| 15 | +Cache handlers had wildly different compatibility for keys. The updated cache drivers now pass |
| 16 | +all keys through validation, roughly matching PSR-6's recommendations: |
| 17 | + |
| 18 | + A string of at least one character that uniquely identifies a cached item. Implementing libraries |
| 19 | + MUST support keys consisting of the characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding |
| 20 | + and a length of up to 64 characters. Implementing libraries MAY support additional characters and |
| 21 | + encodings or longer lengths, but must support at least that minimum. Libraries are responsible for |
| 22 | + their own escaping of key strings as appropriate, but MUST be able to return the original unmodified |
| 23 | + key string. The following characters are reserved for future extensions and MUST NOT be supported by |
| 24 | + implementing libraries: ``{}()/\@:`` |
| 25 | + |
| 26 | +Update your projects to remove any invalid cache keys. |
| 27 | + |
5 | 28 | **BaseConnection::query() return values** |
6 | 29 |
|
7 | 30 | ``BaseConnection::query()`` method in prior versions was incorrectly returning BaseResult objects |
@@ -58,3 +81,62 @@ changes to be aware of: |
58 | 81 |
|
59 | 82 | * ``TestResponse``'s ``$request`` and ``$response`` properties are protected and should only be access through their getter methods, ``request()`` and ``response()`` |
60 | 83 | * ``TestResponse`` does not have ``getBody()`` and ``setBody()`` methods, but rather uses the Response methods directly, e.g.: ``$body = $result->response()->getBody();`` |
| 84 | + |
| 85 | +Project Files |
| 86 | +============= |
| 87 | + |
| 88 | +Numerous files in the project space (root, app, public, writable) received updates. Due to |
| 89 | +these files being outside of the system scope they will not be changed without your intervention. |
| 90 | +There are some third-party CodeIgniter modules available to assist with merging changes to |
| 91 | +the project space: `Explore on Packagist <https://packagist.org/explore/?query=codeigniter4%20updates>`_. |
| 92 | + |
| 93 | +.. note:: Except in very rare cases for bug fixes, no changes made to files for the project space |
| 94 | + will break your application. All changes noted here are optional until the next major version, |
| 95 | + and any mandatory changes will be covered in the sections above. |
| 96 | + |
| 97 | +Content Changes |
| 98 | +--------------- |
| 99 | + |
| 100 | +The following files received significant changes (including deprecations or visual adjustments) |
| 101 | +and it is recommended that you merge the updated versions with your application: |
| 102 | + |
| 103 | +* ``app/Config/App.php`` |
| 104 | +* ``app/Config/Autoload.php`` |
| 105 | +* ``app/Config/Cookie.php`` |
| 106 | +* ``app/Config/Events.php`` |
| 107 | +* ``app/Config/Exceptions.php`` |
| 108 | +* ``app/Config/Security.php`` |
| 109 | +* ``app/Views/errors/html/*`` |
| 110 | +* ``env`` |
| 111 | +* ``spark`` |
| 112 | + |
| 113 | +All Changes |
| 114 | +----------- |
| 115 | + |
| 116 | +This is a list of all files in the project space that received changes; |
| 117 | +many will be simple comments or formatting that have no affect on the runtime: |
| 118 | + |
| 119 | +* ``app/Config/App.php`` |
| 120 | +* ``app/Config/Autoload.php`` |
| 121 | +* ``app/Config/ContentSecurityPolicy.php`` |
| 122 | +* ``app/Config/Cookie.php`` |
| 123 | +* ``app/Config/Events.php`` |
| 124 | +* ``app/Config/Exceptions.php`` |
| 125 | +* ``app/Config/Logger.php`` |
| 126 | +* ``app/Config/Mimes.php`` |
| 127 | +* ``app/Config/Modules.php`` |
| 128 | +* ``app/Config/Security.php`` |
| 129 | +* ``app/Controllers/BaseController.php`` |
| 130 | +* ``app/Views/errors/html/debug.css`` |
| 131 | +* ``app/Views/errors/html/error_404.php`` |
| 132 | +* ``app/Views/errors/html/error_exception.php`` |
| 133 | +* ``app/Views/welcome_message.php`` |
| 134 | +* ``composer.json`` |
| 135 | +* ``contributing/guidelines.rst`` |
| 136 | +* ``env`` |
| 137 | +* ``phpstan.neon.dist`` |
| 138 | +* ``phpunit.xml.dist`` |
| 139 | +* ``public/.htaccess`` |
| 140 | +* ``public/index.php`` |
| 141 | +* ``rector.php`` |
| 142 | +* ``spark`` |
0 commit comments