CodeIgniter 4 Development v4.0.5 Release Notes

Release Date: 2021-01-31 // about 3 years ago
  • Full Changelog

    ๐Ÿ—„ Deprecations:

    • ๐Ÿ—„ CodeIgniter\Database\ModelFactory is now deprecated in favor of CodeIgniter\Config\Factories::models()
    • ๐Ÿ—„ CodeIgniter\Config\Config is now deprecated in favor of CodeIgniter\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() and UploadedFile->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: