CodeIgniter 4 Development v4.0.5 Release Notes
Release Date: 2021-01-31 // about 3 years ago-
๐ Deprecations:
- ๐
CodeIgniter\Database\ModelFactory
is now deprecated in favor ofCodeIgniter\Config\Factories::models()
- ๐
CodeIgniter\Config\Config
is now deprecated in favor ofCodeIgniter\Config\Factories::config()
- HTTP Layer Refactor: Numerous deprecations have been made towards a transition to a PSR-compliant HTTP layer. [See the User Guide](user_guide_src/source/installation/upgrade_405.rst)
Mime Type Detection
Config\Mimes::guessExtensionFromType
now only reverse searches the$mimes
array if no extension is proposed (i.e., usually not for uploaded files).- The fallback values of
UploadedFile->getExtension()
andUploadedFile->guessExtension()
have been changed.UploadedFile->getExtension()
now returns$this->getClientExtension()
instead of''
;UploadedFile->guessExtension()
now returns''
instead of$this->getClientExtension()
. ๐ These changes increase security when handling uploaded files as the client can no longer force a wrong mime type on the application. However, these might affect how file extensions are detected in your application.
Implemented enhancements:
- ๐ Bug: controller routing on modules not working #3927
- CLI: method prompt should accept array validation rules #3766
- Validation: permit_empty, optional arguments #3670
- ๐ php 8 support #3498
- getRoutesOptions should return the controller and method if available #3445
- before function in FilterInterface is missing response param #2085
- ๐ Feature Request: Centralized loggedInUser before RC #2055
๐ Fixed bugs:
- ๐ Bug: UploadedFile::store() can't return null #4183
- ๐ Bug: BaseBuilder::getCompiledDelete() runs real query #4180
- ๐ Bug: Deprecated: Required parameter $userAgent follows optional parameter $body in /opt/lampp/htdocs/framework-4.0.4/system/HTTP/IncomingRequest.php on line 161 #4172
- ๐ Bug: table template closes tbody after tfoot #4155
- ๐ Bug: delete_cookie() helper not working #4149
- ๐ Bug: Required parameter $userAgent follows optional parameter $body in #4148
- ๐ Bug: spark issue #4144
- ๐ Bug: PostgreSQL driver issues #4142
- ๐ Bug: phpunit coverage report causes
Cannot declare class Config\App, because the name is already in use
#4114 - ๐ Bug: Wrong file/line in exceptions created by "factory" methods #4110
- ๐ Bug: Request::withMethod() uses deprecated code #4109
- ๐ Bug: View rendering, extracted variables overwrites existed variables(arguments and etc.) #4108
- ๐ Bug: Loss of escape value and data in the model #4087
- ๐ Bug: classes overwrites parameter defaults, phpDoc's defined in interfaces #4086
- ๐ Bug: getRandomName Return file extension .csv when upload docx or xlsx becouse mimetype application/octet-stream are set #4084
- ๐ Bug: Required parameter $from follows optional parameter $verbs #4076
- ๐ Bug: username input form shows root as a default value #4062
- ๐ Bug: Issue with pagination #4045
- ๐ Bug: Model calls builder before initializing #4036
- ๐ Bug: can't run migrations when CI_ENVIRONMENT = testing #4033
- ๐ Bug: can't get environment variable with dot #4026
- ๐ Bug: CodeIgniter model not recognizing custom deletedField in find queries #3999
- ๐ Bug: assertSee() can not assert title tag. #3984
- ๐ Bug: RAR file detected as CSV #3979
- ๐ Bug: Session Initialization via DatabaseHandler #3978
- ๐ Bug: required_with validation rule does not work with arrays #3965
- ๐ Bug: helper cookie not working #3939
- ๐ Bug: Uploaded SRT files are saved as CSV #3921
- ๐ Bug: Pre-commit hook for Phpstan and sniffer stop working after e111f04d74569e413c5aede3ed9bd9fa1ce7dca2 #3920
- ๐ Bug: Documentation Example Leads to Bug #3914
- ๐ Bug: Route filter runs twice #3902
- ๐ Bug: Premature empty check in Model->update function. #3896
- ๐ Bug: Sqldrv problems to insert when change DBPrefix #3881
- ๐ Bug: CI4 won't recognise current namespace for language files #3867
- Unexpected validation bug #3859
- ๐ Bug: single_service does not set service's arguments correctly #3854
- ๐ Bug: debugbar should not insert code in code tag #3847
- ๐ Parser won't properly parse tags that have a similar name #3841
- ๐ Bug: insertBatch not generating createdField #3838
- ๐ Bug: Parser - Replacements happening even if key does not fully matches { value } #3825
- Bug: Parser preg_replace_callback exception if template has # #3824
- ๐ Translation function 'lang' does not work as described #3822
- ๐ Bug: File rewrite.php is always lost in large-request unhandled error #3818
- ๐ Bug: Model::builder() ignores parameter #3793
- ๐ Bug: Warning no tests found in CodeIgiter\Tests... #3788
- ๐ Bug: Class '\CodeIgniter\Database\pdo\Connection' not found #3785
- ๐ Bug: Composer php spark migrate error #3771
- ๐ Bug: ORDER BY RANDOM ON SQLite3 #3768
- ๐ Bug: CLI: generateDimensions fails with a uncaught exception when exec is disabled #3762
- ๐ Bug: createTable if not exists not working #3757
- ๐ Bug: SQLite drop column corrupts table cache #3752
- ๐ Bug: route filters don't apply for different methods #3733
- /system/Images/Image.php image()->copy() mkdir #3732
- ๐ Bug: route bug #3731
- page not redirecting. when i redirecting by calling function #3729
- ๐ Bug: \Config\Services::image()->flatten() #3728
- ๐ Bug: Parser will overwrite the value if the initial variable is same #3726
- ๐ Bug: Validating Json Requests #3719
- ๐ Bug: view caching not work on windows #3711
- ๐ Bug: getRoutesOptions return wrong when I have >2 routes has same name, but different method (HTTPVerb) #3700
- ๐ Bug: Validation with request raw body. #3694
- Image format webp is not preserve transparent #3690
- problem: #3686
- ๐ Documentation Error #3668
- ๐ Bug: BaseBuilder's query is wrong #3659
- ๐ Bug: The lifetime of the CSRF check cookie cannot be set to 0 (Session). #3655
- ๐ Bug: isRedirect does not respond depending on how redirects are set up. #3654
- ๐ Bug: SQL Error when countAllResults, groupBy and DBPrefix used together #3651
- ๐ Bug: helper current_url() return wrong protocol #3648
- ๐ Bug: IncomingRequest::setLocale() #3640
- ๐ CodeIgniter\Database\Exceptions\DatabaseException #8 Unable to connect to the database. #3639
- ๐ Bug: Cannot use view filter on array values #3630
- ๐ Bug: Changelog navigation is not working properly #3625
- ๐ Bug: Routing 404 Override confusion under route group #3623
- ๐ Bug: Target batch not found when running
php spark migrate:rollback
#3620 - ๐ Bug: getHeaders returns Array with no values #3616
- Ignore this, was a false report #3611
- ๐ Bug: Incorrect type that fails strict_types=1 #3610
- The isAJAX method does not exist in filters #3604
- ๐ Bug:
current\_url\(\)
helper returns wrong url with slash between host and port #3603 - ๐ Bug: Connection ID unknown immediately after connection #3601
- ๐ Bug: Join Query is not working in Library #3600
- ๐ Bug: Database cache not working #3597
- ๐ Bug: Issue in the route, redirect to parent domain, if you put / at the end of url #3595
- ๐ Bug: Segments Also Include The Segments In BASE_URL #3594
- ๐ Bug: Route Filters doesn't restart in FeatureTestCase. #3591
- ๐ Bug: CURL call returns always code 200 in case de server uses HTTP/2 #3586
- ๐ Bug: Language folders inside locale folders NOT Working ! #3582
- ๐ Bug: Uninitialized string offset: 1 CI 4 #3573
- ๐ Deprecated assertArraySubset in PHPUnit8 used in FeatureResponse::assertJSONFragment #3562
- Wrong HTTP status code #3558
- ๐ Bug: Invalid serialization data for DateTime object #3553
- ๐ Bug: Setting session expires parameter via $this->sessionExpiration #3543
- ๐ Bug: Upload file validation, $model->validate return true if failed #3532
- ๐ Bug: Inconsistent behavior of view renderer on Windows and Linux #3529
- ๐ Bug: Add dash to parser plugin regex #3523
- ๐ Bug: When Cronjob run the ip address of the request is 0.0.0.0 #3512
- ๐ Bug: Inconsistency in replace() method #3510
- ๐ Bug: setPath function in UploadedFile.php is writing the index.html wrong #3506
- ๐ Bug: Cannot get session data after server redirecting #3503
- ๐ Bug: Database group defined in .env doesn't work #3497
- ๐ Bug: I cant upload mp4 files #3494
- ๐ Bug: Error message for matches rule doesn't support nested params #3492
- ๐ CI_VERSION = '4.0.0-beta.4'; session ๆไปถfile็ผๅญ้ฎ้ขๅคฑๆ้ฎ้ข๏ผsession_start(): Failed to decode session object. Session has been destroyed #3485
- ๐ Bug: onlyDeleted() conflicts to paginate() #3482
- ๐ Bug: Unable to connect to the database #3477
- ๐ Bug: Argument 1 passed to CodeIgniter\Config\Services::request() must be an instance of Config\App or null, instance of BackEnd\Config\App #3475
- ๐ Bug: Fatal error running #3473
- ๐ Bug: set() doesn't work on DateTime database field types #3471
- before() Filters that are executed are missing from codeigniter debug toolbar. #3470
- ๐ Bug: Model insert method always insert with current datetime on updatedField #3469
- ๐ Bug: The search function in the documentation is not working #3458
- ๐ Bug: env variable database.default.dsn not working for mysqli #3456
- ๐ Bug: #3453
- Bug: form_textarea in form_helper does not create specified 'rows' #3452
- ๐ Bug: afterUpdate event return array instead of key value #3450
- ๐ท Using Cronjob with php line argument while using Crontab redirects the script and never executes #3444
- ๐ Bug: Support for SameSite cookie setting missing #3442
- ๐ Bug: Validation mime_in SVG files not working correctly #3439
- ๐ Bug: Cannot declare class Config\Paths, because the name is already in use #3434
- ๐ Bug: delete_cookie() helper function not working #3433
- ๐ Bug: insertBatch not working correctly #3432
- ๐ Feature request : CodeIgniter\File with SplFileInfo does not have a method to rewrite parts of the file only to append an CSV style row #3431
- ๐ Bug: SMTP to port 465 should use TLS from the start #3429
- ๐ Bug: Form data and file is not receiving well formed with PUT Method #3417
- ๐ Bug: form_textarea helper row and col defaults not overwriting when defined as $extra #3412
- Encryption Class does not allow to change digest parameter from SHA512 to SHA256 or others #3404
- ๐ Bug: table.Array in first() ... - and complex primary keys! ;-) #3394
- ๐ง Error: Email SMTP configured wrong gives error #3390
- ๐ Bug: CodeIgniter\Router\Router hasLocale returns true even if {locale} is absent #3386
- ๐ Bug: Logs Collector isn't collecting logs for Debug Toolbar #3376
- ๐ Bug: Entity's original is not set #3370
- ๐ Bug: warning in Routes.php #3369
- ๐ Bug: Model can not insert Entity #3368
- ๐ Bug: stringify_attributes() looks unfinished. #3363
- ๐ Bug: php spark migrate throws wrongful CodeIgniter\Database\Exceptions\DatabaseException Unable to connect to the database #3359
- ๐ Bug: Image watermark after save.. text not align in center middle when resolution lower and higher. #3356
- ๐ Bug: SQL Lite driver with Builder -> InsertBatch has intermittend lastError reporting issues #3350
- ๐ Bug: isCLI error when calling a controller from a Command Line #3342
- ๐ Bug: missing clear upgrade instructions #3332
- ๐ Bug: API requests with a trailing forward slash #3330
- ๐ Bug: Pager pagination ( page value in url ) #3328
- ๐ Bug: View layout name hierarchy is not displaying correctly on Debugbar Views #3327
- ๐ Bug: php spark migrate on testing environment doesn't work #3309
- ๐ Bug: Empty Entity date attributes receive current timestamp when accessed #3251
- ๐ Bug: no Filter arguments passed #3216
- ๐ Bug: Url Helper have a bug #3180
- $pager->links() not working inside view layouts #3164
- ๐ Bug: AH01075: Error dispatching request on Basic CI4 #3110
- ๐ Bug: Using assertJSONFragment with respond() in ResponseTrait #3079
- ๐ Bug: Filters 'except' option not removing DebugToolbar comment for view #3002
- ๐ Bug: useSoftDeletes with like function #2380
Closed issues:
- ๐ Seed Command in document Not found #4154
- โก๏ธ I18n/L10n: auto update translations #4151
- โก๏ธ Calling update() with an Entity throws an error #4143
- BaseConfig property issue #4140
- ๐ Bug: #4126
- ๐ Bug: a new installation of codeignitor 4.0.4 show 404 error Sorry! Cannot seem to find the page you were looking for. #4111
- ๐ Bug PHP SPARK MIGRATE #4101
- Pagination work in local, but error in server #4096
- updated_at field is filled with the current timestamp when inserting new data along with created_at #4038
- Config for pager #4030
- โก๏ธ setUpdateBatch #4025
- ๐ Empty html-file created when moving uploaded files with $img->move() #4020
- php spark serve error on php 8 #3980
- ๐ Bug: PHP8 session flush data is not deleted #3974
- ๐ PHP8: Deprecate required param after optional #3957
- Undefined function #3954
- Missing function locale_set_default(...) in Codeigniter 4 #3953
- โ Language\en\Language.php is only used in testing #3948
- Bug: locale_set_default causing "Whoops" failure in MacOS PHP 7.3.9 on develop branch #3933
- Pdo driver not found #3922
- Mysqli Backup utility? #3906
- Relationships - Many to many #3885
- ๐ Bug: How can remove Codeinatore default icon #3883
- ๐ How Can remove CodeIgniter4 icon #3882
- Codeigniter review 2021 #3880
- url_title doesn't work with decimal number in title #3878
- ๐ IncomingRequest Class "hasFile" function does not exist as described in the documentation. #3852
- ๐ Dynamically changing supported languages #3844
- ๐ CodeIgniter\Database\Exceptions\DatabaseException #8 #3826
- Blank page show #3812
- ๐ Bug: folder tests not found #3807
- Typo in the doc: cache_info() #3800
- only_full_group_by - mysqli_sql_exception #1055 - MySql 5.7.24 #3795
- โ Dev: Split ModelTest #3792
- The formatMessage function of the Language class works intermittently #3784
- .htaccess problem with syntax #3778
- The page does not open correctly:( #3770
- โช Restore method for CodeIgniter Model. #3767
- ๐ Bug: Model update() only set first array value #3764
- ๐ Bug: CLI: Exception view shows full path #3763
- ๐ Bug: Maximum execution time exceeds while handling IPv6 Reverse Proxy IPs #3760
- ๐ Fabricators documentation error #3743
is\_unique
is not considering the db prefix in checking for unique values in db #3741- Grouping routes should let me pass additional variables within the closure function #3691
- cannot find Ftp library. #3679
- ๐ Make sessions never expire with $config['sess_expiration'] = -1 #3677
- Migration trouble #3624
- Files as optional in validation rules #3619
- $_SERVER should not have .env file info #3615
- ๐ Bug pars xml #3588
- ๐ Bug: When have multi filter class, and "before" function return true๏ผother filters after this filter not working #3579
- ๐ง can not install on linux os #3572
- ๐ Incorrect grouping function names in documentation #3551
- ๐ New Edge Browser missing from user agents config #3513
- Form validation does not have a rule to validate if field value differs from a string #3462
- โก๏ธ updateBatch does not accept entities #3451
- ๐ Support PSR4 #3405
- CodeIgniter4 is ready to work with PHP 7.4? #3389
- Using CodeIgniter4 with Oracle Database #3388
- Can't get Controllers subfolder working #3347
- Why redirect()->to() doesn't work inside events Model? #3346
- ๐ Bug: requests PUT type without segment redirects to index method instead update method #3343
- Migrations not working #3317
- CURL Error htts SSL #3314
- codeigniter composer global installer #3266
- ๐ Bug: Migrations Deprecated #3195
- Managed to reproduce this issue. Was uploading an image with jquery.dm-uploader.min.js, and trying to do some image manipulation, but when I got this error: #3174
- ๐ Make the Model work without auto_increment primary key #3134
- Call to undefined function CodeIgniter\Debug\current_url() #3106
- ๐ Bug: select() & selectSum() not consistent / aligned with docs #3019
- โ Remove /public in URL not working if using localhost #2930
- The problem is in getting the file sharing by Mime #2732
- Migration on PostgreSQL failes for tables with foreign keys #2575
- ๐ Automatic Entity cast for Parser #2317
- ๐ Feature: Cache Driver - Serialize/Unserialize Objects #2111
- Model set $escape problem #1929
- \I18n\Time setTimezone does not work as expected #1807
- ๐ TODO Database utility backup builder #1257
- Port FTP library from CI3 #506
- Port MSSql Database driver from CI3 #503
๐ Merged pull requests:
- ๐จ Finishing touches to generator refactor #4197 (paulbalandan)
- โ Add additional empty checks after field protection for update/insert. #4195 (sfadschm)
- ๐ Minor fixes in Common.php #4192 (kenjis)
- ๐ Fix Parser file path in ViewException message is empty #4191 (kenjis)
- ๐ docs: Fix double "the" #4190 (kenjis)
- ๐ Fix typo in IncomingRequestTest #4189 (kenjis)
- feat: add methods to get page numbers in PagerRenderer #4188 (kenjis)
- ๐ fix: UploadedFile::store() return type inconsistancy #4187 (kenjis)
- โ Add STL mime support #4186 (MGatner)
- โก๏ธ [Rector] Run Rector when composer.json updated #4185 (samsonasik)
- new array helper: array_flatten_with_dots #4184 (paulbalandan)
- ๐ fix: BaseBuilder::getCompiledDelete() runs real query #4181 (kenjis)
- ๐ fix the missing / hidden userguide #4175 (totoprayogo1916)
- โก๏ธ Revert "Update phpstan/phpstan requirement from 0.12.69 to 0.12.70" #4173 (samsonasik)
- โ Add missing escaping in error_exception.php #4171 (kenjis)
- โก๏ธ Update phpstan/phpstan requirement from 0.12.69 to 0.12.70 #4170 (dependabot[bot])
- โ add phpunit.xml.dist to .gitattributes for admin/framework #4163 (samsonasik)
- ๐ Fix strict checking for SQLite3 memory filename #4161 (paulbalandan)
- Discuss dbcreate in userguide #4160 (paulbalandan)
- ๐ Fix misplaced closing tbody #4159 (paulbalandan)
- ๐ [Develop] Fixes #4114 Cannot declare class Config\App error on running PHPUnit #4157 (samsonasik)
- Specifically exclude migrations from class mapping #4156 (paulbalandan)
- config: add logger.threshold in env as comment #4153 (kenjis)
- โก๏ธ Update phpstan/phpstan requirement from 0.12.68 to 0.12.69 #4152 (dependabot[bot])
- โก๏ธ convert indentation from tabs to spaces & update code-block [changelogs, database] #4150 (totoprayogo1916)
- ๐ Fix for retrieving migration history #4147 (michalsn)
- ๐ Fix phpstan notice #4146 (samsonasik)
- โก๏ธ Update docs for Entity #4145 (michalsn)
- โก๏ธ update faker #4139 (totoprayogo1916)
- ๐ docs: add table of contents in 2 libs #4138 (kenjis)
- ๐ PHPStan Fixes #4136 (MGatner)
- prep_url() with https:// #4135 (totoprayogo1916)
- โก๏ธ Update phpstan/phpstan requirement from 0.12.65 to 0.12.68 #4134 (dependabot[bot])
- set uppercase #4132 (totoprayogo1916)
- โ remove useless "raw html" #4131 (totoprayogo1916)
- ๐ Fix errors/html/error_exception.php #4128 (kenjis)
- set note-block for some notes #4127 (totoprayogo1916)
- ๐ Fix
@var
in SessionTestCase. #4124 (kenjis) - ๐ Fix Session phpdoc #4123 (kenjis)
- ๐จ Refactor Generators #4121 (mostafakhudair)
- ๐ Fix few typos. #4119 (npwsamarasinghe)
- ๐ป Precise exception trace #4118 (paulbalandan)
- Wrap extract calls in IIFEs in View #4113 (paulbalandan)
- ๐ Fix Request::withMethod() #4112 (paulbalandan)
- Cache remember #4107 (agungsugiarto)
- ๐ docs: change sample code of redirect() to be more common #4106 (kenjis)
- โ Add Cache File mode #4103 (MGatner)
- Clarify Renderer discrepancy #4102 (MGatner)
- Catch DateTime failure #4097 (MGatner)
- ๐ Fix URL type. #4095 (npwsamarasinghe)
- ๐ Fixed a bug where a newline was treated as a valid value even if it was included at the end. #4094 (ytetsuro)
- โก๏ธ BaseModel/Model - Removed $escape from doUpdate #4090 (najdanovicivan)
- BaseConnection - Added automatic handling of query class for 3rd party drivers #4089 (najdanovicivan)
- ๐ Fix loss of escape value and data in the model #4088 (michalsn)
- ๐ Use getMimeType instead of getClientMimeType. #4085 (sfadschm)
- ๐ fix codeblock in installing_composer.rst #4083 (totoprayogo1916)
- ๐ Fixing a bug in Message::isJSON #4081 (caswell-wc)
- Get JSON Variable #4080 (caswell-wc)
- ๐ Fix userguide indent #4078 (totoprayogo1916)
- DebugToolbar - Handle Query display in Query class #4077 (najdanovicivan)
- โก๏ธ Update userguide indentation #4075 (totoprayogo1916)
- ๐ docs: fix models indentation #4073 (kenjis)
- BaseModel/Model - Attempt to rework escape parameter #4072 (najdanovicivan)
- ๐ Model/BaseModel - Fix primary key and add @throws for builder method #4071 (najdanovicivan)
- ๐ Fix DOMParser rules to search also outside the body tag #4070 (michalsn)
- Warn users on system messages being for internal use #4068 (paulbalandan)
- โ Remove discussion on LoggerAwareTrait #4067 (paulbalandan)
- PHPStan Ignore File #4065 (MGatner)
- โ site_url tests #4063 (MGatner)
- ๐ Use full table name with schema for SQLSRV #4058 (michalsn)
- ๐ fix userguide config path #4057 (totoprayogo1916)
- Solidate mime type guessing. #4056 (sfadschm)
- โ Add mime type for rar files #4054 (michalsn)
- ๐ Fix for deleting session flash data in php8 #4053 (michalsn)
- โ Added omitted function parameter description. #4052 (francis94c)
- ๐ New Year 2021 #4051 (totoprayogo1916)
- ๐ Fix countAll() docs #4050 (kenjis)
- โ adds BaseResult::getNumRows(). adds getNumRows to various DBMS Result classes #4049 (sneakyimp)
- [UG] a comma after use: i.e., and e.g., #4042 (totoprayogo1916)
- ๐ Fix database test case test #4041 (kenjis)
- โ Add initDriver Method #4040 (mostafakhudair)
- ๐ docs: fix general indentation #4039 (kenjis)
- ๐ fix codeblock #4037 (totoprayogo1916)
- โ Remove 'tests' #4034 (totoprayogo1916)
- Alias Forge with use operator #4032 (mostafakhudair)
- ๐ New line for License copyright #4029 (totoprayogo1916)
- ๐ Rename Sqlsrv driver #4023 (mostafakhudair)
- PHP 8 Actions #4012 (MGatner)
- ๐ feat: make migration/seed settings flexible on database testing #3993 (kenjis)
- ๐ Deprecate redundant HTTP keys #3973 (paulbalandan)
- Replace Core Services #3943 (MGatner)
- Handling requests sent back from filters #3900 (caswell-wc)
- โ DX: Split Model testing into several subunits #3891 (paulbalandan)
- ๐