mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
522 lines
38 KiB
HTML
522 lines
38 KiB
HTML
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" >
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Upgrading from 4.1.4 to 4.1.5 — CodeIgniter 4.4.2 documentation</title>
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/css/citheme.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/css/citheme_dark.css" type="text/css" />
|
||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||
<!--[if lt IE 9]>
|
||
<script src="../_static/js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
|
||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||
<script src="../_static/jquery.js"></script>
|
||
<script src="../_static/underscore.js"></script>
|
||
<script src="../_static/doctools.js"></script>
|
||
<script src="../_static/js/citheme.js"></script>
|
||
<script src="../_static/js/carbon.js"></script>
|
||
<script src="../_static/js/theme.js"></script>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="Upgrading from 4.1.3 to 4.1.4" href="upgrade_414.html" />
|
||
<link rel="prev" title="Upgrading from 4.1.5 to 4.1.6" href="upgrade_416.html" />
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav">
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
|
||
|
||
|
||
<a href="../index.html">
|
||
|
||
<img src="../_static/ci-logo-text.svg" class="logo" alt="Logo"/>
|
||
</a>
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../intro/index.html">Welcome to CodeIgniter4</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../intro/index.html">Welcome to CodeIgniter4</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../intro/requirements.html">Server Requirements</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../intro/credits.html">Credits</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../intro/psr.html">PSR Compliance</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../license.html">License Agreement</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul class="current">
|
||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Installation</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="installing_composer.html">Composer Installation</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="installing_manual.html">Manual Installation</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="running.html">Running Your App</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../changelogs/index.html">Change Logs</a></li>
|
||
<li class="toctree-l2 current"><a class="reference internal" href="upgrading.html">Upgrading From a Previous Version</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="repositories.html">CodeIgniter Repositories</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../tutorial/index.html">Build Your First Application</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../tutorial/static_pages.html">Static Pages</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../tutorial/news_section.html">News Section</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../tutorial/create_news_items.html">Create News Items</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../tutorial/conclusion.html">Conclusion</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../concepts/index.html">CodeIgniter4 Overview</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../concepts/structure.html">Application Structure</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../concepts/mvc.html">Models, Views, and Controllers</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../concepts/autoloader.html">Autoloading Files</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../concepts/services.html">Services</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../concepts/factories.html">Factories</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../concepts/http.html">Working with HTTP Requests</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../concepts/security.html">Security Guidelines</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../general/index.html">General Topics</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/configuration.html">Configuration</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/urls.html">CodeIgniter URLs</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/helpers.html">Helper Functions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/common_functions.html">Global Functions and Constants</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/logging.html">Logging Information</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/errors.html">Error Handling</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/caching.html">Web Page Caching</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/ajax.html">AJAX Requests</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/modules.html">Code Modules</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/managing_apps.html">Managing your Applications</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../general/environments.html">Handling Multiple Environments</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../incoming/index.html">Controllers and Routing</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/routing.html">URI Routing</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/controllers.html">Controllers</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/filters.html">Controller Filters</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/message.html">HTTP Messages</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/request.html">Request Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/incomingrequest.html">IncomingRequest Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/content_negotiation.html">Content Negotiation</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/methodspoofing.html">HTTP Method Spoofing</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../incoming/restful.html">RESTful Resource Handling</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../outgoing/index.html">Building Responses</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/views.html">Views</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/view_cells.html">View Cells</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/view_renderer.html">View Renderer</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/view_layouts.html">View Layouts</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/view_parser.html">View Parser</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/view_decorators.html">View Decorators</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/table.html">HTML Table Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/response.html">HTTP Responses</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/api_responses.html">API Response Trait</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/localization.html">Localization</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../outgoing/alternative_php.html">Alternate PHP Syntax for View Files</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../database/index.html">Working with Databases</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/examples.html">Quick Start: Usage Examples</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/configuration.html">Database Configuration</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/connecting.html">Connecting to a Database</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/queries.html">Running Queries</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/results.html">Generating Query Results</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/helpers.html">Query Helper Functions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/query_builder.html">Query Builder Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/transactions.html">Transactions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/metadata.html">Getting MetaData</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/call_function.html">Custom Function Calls</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/events.html">Database Events</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../database/utilities.html">Database Utilities</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../models/index.html">Modeling Data</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../models/model.html">Using CodeIgniter's Model</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../models/entities.html">Using Entity Classes</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../dbmgmt/index.html">Managing Databases</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../dbmgmt/forge.html">Database Manipulation with Database Forge</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../dbmgmt/migration.html">Database Migrations</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../dbmgmt/seeds.html">Database Seeding</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../dbmgmt/db_commands.html">Database Commands</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../libraries/index.html">Library Reference</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/caching.html">Caching Driver</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/cookies.html">Cookies</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/curlrequest.html">CURLRequest Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/email.html">Email Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/encryption.html">Encryption Service</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/files.html">Working with Files</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/file_collections.html">File Collections</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/honeypot.html">Honeypot Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/images.html">Image Manipulation Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/pagination.html">Pagination</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/publisher.html">Publisher</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/security.html">Security</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/sessions.html">Session Library</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/throttler.html">Throttler</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/time.html">Times and Dates</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/typography.html">Typography</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/uploaded_files.html">Working with Uploaded Files</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/uri.html">Working with URIs</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/user_agent.html">User Agent Class</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../libraries/validation.html">Validation</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../helpers/index.html">Helpers</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/array_helper.html">Array Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/cookie_helper.html">Cookie Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/date_helper.html">Date Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/filesystem_helper.html">Filesystem Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/form_helper.html">Form Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/html_helper.html">HTML Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/inflector_helper.html">Inflector Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/number_helper.html">Number Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/security_helper.html">Security Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/test_helper.html">Test Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/text_helper.html">Text Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/url_helper.html">URL Helper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../helpers/xml_helper.html">XML Helper</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../testing/index.html">Testing</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/overview.html">Getting Started</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/database.html">Database</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/fabricator.html">Generating Data</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/controllers.html">Controller Testing</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/feature.html">HTTP Testing</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/response.html">Testing Responses</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/benchmark.html">Benchmarking</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/debugging.html">Debugging Your Application</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../testing/mocking.html">Mocking</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../cli/index.html">Command Line Usage</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../cli/cli_overview.html">CLI Overview</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../cli/cli_controllers.html">Running Controllers via CLI</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../cli/spark_commands.html">Spark Commands</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../cli/cli_commands.html">Creating Spark Commands</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../cli/cli_generators.html">CLI Generators</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../cli/cli_library.html">CLI Library</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../cli/cli_request.html">CLIRequest Class</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../extending/index.html">Extending CodeIgniter</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../extending/core_classes.html">Creating Core System Classes</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../extending/common.html">Replacing Common Functions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../extending/events.html">Events</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../extending/basecontroller.html">Extending the Controller</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../extending/authentication.html">Authentication</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../extending/composer_packages.html">Creating Composer Packages</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../extending/contributing.html">Contributing to CodeIgniter</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../libraries/official_packages.html">Official Packages</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="../index.html">CodeIgniter</a>
|
||
</nav>
|
||
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content">
|
||
<a class="btn btn-neutral float-right" href="https://github.com/codeigniter4/CodeIgniter4/edit/develop/user_guide_src/source/installation/upgrade_415.rst">Edit this page</a>
|
||
|
||
<div role="navigation" aria-label="Page navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||
<li class="breadcrumb-item"><a href="index.html">Installation</a></li>
|
||
<li class="breadcrumb-item"><a href="upgrading.html">Upgrading From a Previous Version</a></li>
|
||
<li class="breadcrumb-item active">Upgrading from 4.1.4 to 4.1.5</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<section id="upgrading-from-4-1-4-to-4-1-5">
|
||
<h1>Upgrading from 4.1.4 to 4.1.5<a class="headerlink" href="#upgrading-from-4-1-4-to-4-1-5" title="Permalink to this headline"></a></h1>
|
||
<p>Please refer to the upgrade instructions corresponding to your installation method.</p>
|
||
<ul class="simple">
|
||
<li><p><a class="reference internal" href="installing_composer.html#app-starter-upgrading"><span class="std std-ref">Composer Installation App Starter Upgrading</span></a></p></li>
|
||
<li><p><a class="reference internal" href="installing_composer.html#adding-codeigniter4-upgrading"><span class="std std-ref">Composer Installation Adding CodeIgniter4 to an Existing Project Upgrading</span></a></p></li>
|
||
<li><p><a class="reference internal" href="installing_manual.html#installing-manual-upgrading"><span class="std std-ref">Manual Installation Upgrading</span></a></p></li>
|
||
</ul>
|
||
<div class="contents local topic" id="contents">
|
||
<ul class="simple">
|
||
<li><p><a class="reference internal" href="#breaking-changes" id="id1">Breaking Changes</a></p>
|
||
<ul>
|
||
<li><p><a class="reference internal" href="#changes-for-set-method-in-basebuilder-and-model-class" id="id2">Changes for set() method in BaseBuilder and Model class</a></p></li>
|
||
<li><p><a class="reference internal" href="#session-databasehandler-s-database-table-change" id="id3">Session DatabaseHandler’s Database Table Change</a></p></li>
|
||
<li><p><a class="reference internal" href="#csrf-protection" id="id4">CSRF Protection</a></p></li>
|
||
<li><p><a class="reference internal" href="#curlrequest-header-change" id="id5">CURLRequest Header Change</a></p></li>
|
||
<li><p><a class="reference internal" href="#query-builder-changes" id="id6">Query Builder Changes</a></p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p><a class="reference internal" href="#breaking-enhancements" id="id7">Breaking Enhancements</a></p>
|
||
<ul>
|
||
<li><p><a class="reference internal" href="#multiple-filters-for-a-route" id="id8">Multiple Filters for a Route</a></p></li>
|
||
</ul>
|
||
</li>
|
||
<li><p><a class="reference internal" href="#project-files" id="id9">Project Files</a></p>
|
||
<ul>
|
||
<li><p><a class="reference internal" href="#content-changes" id="id10">Content Changes</a></p></li>
|
||
<li><p><a class="reference internal" href="#all-changes" id="id11">All Changes</a></p></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<section id="breaking-changes">
|
||
<h2><a class="toc-backref" href="#id1">Breaking Changes</a><a class="headerlink" href="#breaking-changes" title="Permalink to this headline"></a></h2>
|
||
<section id="changes-for-set-method-in-basebuilder-and-model-class">
|
||
<h3><a class="toc-backref" href="#id2">Changes for set() method in BaseBuilder and Model class</a><a class="headerlink" href="#changes-for-set-method-in-basebuilder-and-model-class" title="Permalink to this headline"></a></h3>
|
||
<p>The casting for the <code class="docutils literal notranslate"><span class="pre">$value</span></code> parameter has been removed to fix a bug where passing parameters as array and string
|
||
to the <code class="docutils literal notranslate"><span class="pre">set()</span></code> method were handled differently. If you extended the <code class="docutils literal notranslate"><span class="pre">BaseBuilder</span></code> class or <code class="docutils literal notranslate"><span class="pre">Model</span></code> class yourself
|
||
and modified the <code class="docutils literal notranslate"><span class="pre">set()</span></code> method, then you need to change its definition from
|
||
<code class="docutils literal notranslate"><span class="pre">public</span> <span class="pre">function</span> <span class="pre">set($key,</span> <span class="pre">?string</span> <span class="pre">$value</span> <span class="pre">=</span> <span class="pre">'',</span> <span class="pre">?bool</span> <span class="pre">$escape</span> <span class="pre">=</span> <span class="pre">null)</span></code> to
|
||
<code class="docutils literal notranslate"><span class="pre">public</span> <span class="pre">function</span> <span class="pre">set($key,</span> <span class="pre">$value</span> <span class="pre">=</span> <span class="pre">'',</span> <span class="pre">?bool</span> <span class="pre">$escape</span> <span class="pre">=</span> <span class="pre">null)</span></code>.</p>
|
||
</section>
|
||
<section id="session-databasehandler-s-database-table-change">
|
||
<h3><a class="toc-backref" href="#id3">Session DatabaseHandler’s Database Table Change</a><a class="headerlink" href="#session-databasehandler-s-database-table-change" title="Permalink to this headline"></a></h3>
|
||
<p>The types of the following columns in the session table have been changed for optimization.</p>
|
||
<ul class="simple">
|
||
<li><dl class="simple">
|
||
<dt>MySQL</dt><dd><ul>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">timestamp</span></code></p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
<li><dl class="simple">
|
||
<dt>PostgreSQL</dt><dd><ul>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">ip_address</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">timestamp</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">data</span></code></p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
</ul>
|
||
<p>Update the definition of the session table. See the <a class="reference internal" href="../libraries/sessions.html"><span class="doc">Session Library</span></a> for the new definition.</p>
|
||
<p>The change was introduced in v4.1.2. But due to <a class="reference external" href="https://github.com/codeigniter4/CodeIgniter4/issues/4807">a bug</a>,
|
||
the DatabaseHandler Driver did not work properly.</p>
|
||
</section>
|
||
<section id="csrf-protection">
|
||
<h3><a class="toc-backref" href="#id4">CSRF Protection</a><a class="headerlink" href="#csrf-protection" title="Permalink to this headline"></a></h3>
|
||
<p>Because of a bug fix,
|
||
now CSRF protection works on not only <strong>POST</strong> but also <strong>PUT/PATCH/DELETE</strong> requests when CSRF filter is applied.</p>
|
||
<p>When you use <strong>PUT/PATCH/DELETE</strong> requests, you need to send CSRF token. Or remove the CSRF filter
|
||
for such requests if you don’t need CSRF protection for them.</p>
|
||
<p>If you want the same behavior as the previous version, set the CSRF filter like the following in <strong>app/Config/Filters.php</strong>:</p>
|
||
<div class="highlight-html+php notranslate"><div class="highlight"><pre><span></span><span class="o"><?</span><span class="nx">php</span>
|
||
|
||
<span class="k">namespace</span> <span class="nx">Config</span><span class="p">;</span>
|
||
|
||
<span class="k">use</span> <span class="nx">CodeIgniter\Config\BaseConfig</span><span class="p">;</span>
|
||
|
||
<span class="k">class</span> <span class="nc">Filters</span> <span class="k">extends</span> <span class="nx">BaseConfig</span>
|
||
<span class="p">{</span>
|
||
<span class="c1">// ...</span>
|
||
|
||
<span class="k">public</span> <span class="nv">$methods</span> <span class="o">=</span> <span class="p">[</span>
|
||
<span class="s1">'get'</span> <span class="o">=></span> <span class="p">[</span><span class="s1">'csrf'</span><span class="p">],</span>
|
||
<span class="s1">'post'</span> <span class="o">=></span> <span class="p">[</span><span class="s1">'csrf'</span><span class="p">],</span>
|
||
<span class="p">];</span>
|
||
<span class="c1">// ...</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Protecting <strong>GET</strong> method needs only when you use <code class="docutils literal notranslate"><span class="pre">form_open()</span></code> auto-generation of CSRF field.</p>
|
||
<div class="admonition warning">
|
||
<p class="admonition-title">Warning</p>
|
||
<p>In general, if you use <code class="docutils literal notranslate"><span class="pre">$methods</span></code> filters, you should <a class="reference internal" href="../incoming/routing.html#use-defined-routes-only"><span class="std std-ref">disable Auto Routing (Legacy)</span></a>
|
||
because <a class="reference internal" href="../incoming/routing.html#auto-routing-legacy"><span class="std std-ref">Auto Routing (Legacy)</span></a> permits any HTTP method to access a controller.
|
||
Accessing the controller with a method you don’t expect could bypass the filter.</p>
|
||
</div>
|
||
</section>
|
||
<section id="curlrequest-header-change">
|
||
<h3><a class="toc-backref" href="#id5">CURLRequest Header Change</a><a class="headerlink" href="#curlrequest-header-change" title="Permalink to this headline"></a></h3>
|
||
<p>In the previous version, if you didn’t provide your own headers, <code class="docutils literal notranslate"><span class="pre">CURLRequest</span></code> would send the request-headers from the browser.
|
||
The bug was fixed. If your requests depend on the headers, your requests might fail after upgrading.
|
||
In this case, add the necessary headers manually.
|
||
See <a class="reference internal" href="../libraries/curlrequest.html#curlrequest-request-options-headers"><span class="std std-ref">CURLRequest Class</span></a> for how to add.</p>
|
||
</section>
|
||
<section id="query-builder-changes">
|
||
<h3><a class="toc-backref" href="#id6">Query Builder Changes</a><a class="headerlink" href="#query-builder-changes" title="Permalink to this headline"></a></h3>
|
||
<p>For optimization and a bug fix, the following behaviors, mostly used in testing, have been changed.</p>
|
||
<ul class="simple">
|
||
<li><p>When you use <code class="docutils literal notranslate"><span class="pre">insertBatch()</span></code> and <code class="docutils literal notranslate"><span class="pre">updateBatch()</span></code>, the return value of <code class="docutils literal notranslate"><span class="pre">$query->getOriginalQuery()</span></code> has changed. It no longer returns the query with the binded parameters, but the actual query that was run.</p></li>
|
||
<li><p>If <code class="docutils literal notranslate"><span class="pre">testMode</span></code> is <code class="docutils literal notranslate"><span class="pre">true</span></code>, <code class="docutils literal notranslate"><span class="pre">insertBatch()</span></code> will return an SQL string array instead of the number of affected rows. This change was made so that the returned data type is the same as the <code class="docutils literal notranslate"><span class="pre">updateBatch()</span></code> method.</p></li>
|
||
</ul>
|
||
</section>
|
||
</section>
|
||
<section id="breaking-enhancements">
|
||
<h2><a class="toc-backref" href="#id7">Breaking Enhancements</a><a class="headerlink" href="#breaking-enhancements" title="Permalink to this headline"></a></h2>
|
||
<section id="multiple-filters-for-a-route">
|
||
<span id="upgrade-415-multiple-filters-for-a-route"></span><h3><a class="toc-backref" href="#id8">Multiple Filters for a Route</a><a class="headerlink" href="#multiple-filters-for-a-route" title="Permalink to this headline"></a></h3>
|
||
<p>A new feature to set multiple filters for a route.</p>
|
||
<div class="admonition important">
|
||
<p class="admonition-title">Important</p>
|
||
<p>This feature is disabled by default. Because it breaks backward compatibility.</p>
|
||
</div>
|
||
<p>If you want to use this, you need to set the property <code class="docutils literal notranslate"><span class="pre">$multipleFilters</span></code> <code class="docutils literal notranslate"><span class="pre">true</span></code> in <code class="docutils literal notranslate"><span class="pre">app/Config/Feature.php</span></code>.
|
||
If you enable it:</p>
|
||
<ul class="simple">
|
||
<li><dl class="simple">
|
||
<dt><code class="docutils literal notranslate"><span class="pre">CodeIgniter\CodeIgniter::handleRequest()</span></code> uses</dt><dd><ul>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">CodeIgniter\Filters\Filters::enableFilters()</span></code>, instead of <code class="docutils literal notranslate"><span class="pre">enableFilter()</span></code></p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
<li><dl class="simple">
|
||
<dt><code class="docutils literal notranslate"><span class="pre">CodeIgniter\CodeIgniter::tryToRouteIt()</span></code> uses</dt><dd><ul>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">CodeIgniter\Router\Router::getFilters()</span></code>, instead of <code class="docutils literal notranslate"><span class="pre">getFilter()</span></code></p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
<li><dl class="simple">
|
||
<dt><code class="docutils literal notranslate"><span class="pre">CodeIgniter\Router\Router::handle()</span></code> uses</dt><dd><ul>
|
||
<li><p>the property <code class="docutils literal notranslate"><span class="pre">$filtersInfo</span></code>, instead of <code class="docutils literal notranslate"><span class="pre">$filterInfo</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">CodeIgniter\Router\RouteCollection::getFiltersForRoute()</span></code>, instead of <code class="docutils literal notranslate"><span class="pre">getFilterForRoute()</span></code></p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
</ul>
|
||
<p>If you extended the above classes, then you need to change them.</p>
|
||
<p>The following methods and a property have been deprecated:</p>
|
||
<ul class="simple">
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">CodeIgniter\Filters\Filters::enableFilter()</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">CodeIgniter\Router\Router::getFilter()</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">CodeIgniter\Router\RouteCollection::getFilterForRoute()</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">CodeIgniter\Router\RouteCollection</span></code>’s property <code class="docutils literal notranslate"><span class="pre">$filterInfo</span></code></p></li>
|
||
</ul>
|
||
<p>See <a class="reference internal" href="../incoming/routing.html#applying-filters"><span class="std std-ref">Applying Filters</span></a> for the functionality.</p>
|
||
</section>
|
||
</section>
|
||
<section id="project-files">
|
||
<h2><a class="toc-backref" href="#id9">Project Files</a><a class="headerlink" href="#project-files" title="Permalink to this headline"></a></h2>
|
||
<p>Numerous files in the project space (root, app, public, writable) received updates. Due to
|
||
these files being outside of the system scope they will not be changed without your intervention.
|
||
There are some third-party CodeIgniter modules available to assist with merging changes to
|
||
the project space: <a class="reference external" href="https://packagist.org/explore/?query=codeigniter4%20updates">Explore on Packagist</a>.</p>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>Except in very rare cases for bug fixes, no changes made to files for the project space
|
||
will break your application. All changes noted here are optional until the next major version,
|
||
and any mandatory changes will be covered in the sections above.</p>
|
||
</div>
|
||
<section id="content-changes">
|
||
<h3><a class="toc-backref" href="#id10">Content Changes</a><a class="headerlink" href="#content-changes" title="Permalink to this headline"></a></h3>
|
||
<p>The following files received significant changes (including deprecations or visual adjustments)
|
||
and it is recommended that you merge the updated versions with your application:</p>
|
||
<ul class="simple">
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/CURLRequest.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Cache.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Feature.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Generators.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Publisher.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Security.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Views/welcome_message.php</span></code></p></li>
|
||
</ul>
|
||
</section>
|
||
<section id="all-changes">
|
||
<h3><a class="toc-backref" href="#id11">All Changes</a><a class="headerlink" href="#all-changes" title="Permalink to this headline"></a></h3>
|
||
<p>This is a list of all files in the project space that received changes;
|
||
many will be simple comments or formatting that have no effect on the runtime:</p>
|
||
<ul class="simple">
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/CURLRequest.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Cache.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Feature.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Generators.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Kint.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Publisher.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Config/Security.php</span></code></p></li>
|
||
<li><p><code class="docutils literal notranslate"><span class="pre">app/Views/welcome_message.php</span></code></p></li>
|
||
</ul>
|
||
</section>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="upgrade_416.html" class="btn btn-neutral float-left" title="Upgrading from 4.1.5 to 4.1.6" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="upgrade_414.html" class="btn btn-neutral float-right" title="Upgrading from 4.1.3 to 4.1.4" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright 2019-2023 CodeIgniter Foundation.
|
||
<span class="lastupdated">Last updated on Oct 22, 2023.
|
||
</span></p>
|
||
</div>
|
||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||
|
||
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(false);
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html> |