CodeIgniter - a PHP full-stack web framework that is light, fast, flexible and secure

Overview

CodeIgniter 4 Development

Build Status Coverage Status Downloads GitHub release (latest by date) GitHub stars GitHub license contributions welcome

What is CodeIgniter?

CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure. More information can be found at the official site.

This repository holds the source code for CodeIgniter 4 only. Version 4 is a complete rewrite to bring the quality and the code into a more modern version, while still keeping as many of the things intact that has made people love the framework over the years.

More information about the plans for version 4 can be found in the announcement on the forums.

Documentation

The User Guide is the primary documentation for CodeIgniter 4.

The current in-progress User Guide can be found here. As with the rest of the framework, it is a work in progress, and will see changes over time to structure, explanations, etc.

You might also be interested in the API documentation for the framework components.

Important Change with index.php

index.php is no longer in the root of the project! It has been moved inside the public folder, for better security and separation of components.

This means that you should configure your web server to "point" to your project's public folder, and not to the project root. A better practice would be to configure a virtual host to point there. A poor practice would be to point your web server to the project root and expect to enter public/..., as the rest of your logic and the framework are exposed.

Please read the user guide for a better explanation of how CI4 works!

Repository Management

CodeIgniter is developed completely on a volunteer basis. As such, please give up to 7 days for your issues to be reviewed. If you haven't heard from one of the team in that time period, feel free to leave a comment on the issue so that it gets brought back to our attention.

We use GitHub issues to track BUGS and to track approved DEVELOPMENT work packages. We use our forum to provide SUPPORT and to discuss FEATURE REQUESTS.

If you raise an issue here that pertains to support or a feature request, it will be closed! If you are not sure if you have found a bug, raise a thread on the forum first - someone else may have encountered the same thing.

Before raising a new GitHub issue, please check that your bug hasn't already been reported or fixed.

We use pull requests (PRs) for CONTRIBUTIONS to the repository. We are looking for contributions that address one of the reported bugs or approved work packages.

Do not use a PR as a form of feature request. Unsolicited contributions will only be considered if they fit nicely into the framework roadmap. Remember that some components that were part of CodeIgniter 3 are being moved to optional packages, with their own repository.

Contributing

We are accepting contributions from the community!

Please read the Contributing to CodeIgniter.

Server Requirements

PHP version 7.4 or higher is required, with the following extensions installed:

Additionally, make sure that the following extensions are enabled in your PHP:

  • json (enabled by default - don't turn it off)
  • xml (enabled by default - don't turn it off)
  • mysqlnd

Running CodeIgniter Tests

Information on running the CodeIgniter test suite can be found in the README.md file in the tests directory.

Comments
  • Bug 4069 - query returns Result even when query result is FALSE

    Bug 4069 - query returns Result even when query result is FALSE

    Initial commit fixing wrong return value in Database/BaseConnection:query. When underlying resultID if false, this function should return false as described in #4069. This is a preliminary (and trivial) correction. In order for this change to be run, the db must be configured with DBDebug=false (e.g., in production mode).

    NOTE that this code change is based on the CI 3 behavior. This may seem like a fundamental change but I truly believe that returning a Result object when the query failed was a mistake because these cast to true. I have been unable to detect any change in the behavior of the phpunit tests from this one change, so it's my guess that the phpunit tests do not ever run with DBDebug=false. I've constructed a phpunit test, BadQueryTest which seems to work on my machine, but I have added this line to my .env file:

    database.tests.DBDebug = false
    

    I suspect my BadQueryTest might have trouble with the automate tests that will run, and would ask help (@kenjis ? @michalsn ?) in massaging things here to achieve the right test and make sure this isn't a breaking change. I've only made this change to try and make sure CI4 behaves as the documentation says it will. There are no changes required to the user docs. On the contrary, there is probably still more work to be done to the code to make sure it behaves as the documentation says it does. In particular, the code will not currently return true under any circumstances.

    Description I changed one line (line 680) to return false instead of a Result object. This conforms both to CI3 behavior but also to the behavior described in the CI4 documentation. I added a BadQueryTest which probably needs work.

    Checklist:

    • [x] Securely signed commits
    • [x] Component(s) with PHPdocs
    • [x] Unit testing, with >80% coverage
    • [ ] User guide updated
    • [x] Conforms to style guide
    opened by sneakyimp 65
  • Feature Add Oracle driver

    Feature Add Oracle driver

    Description I wanted to use CodeIgniter4 in an Oracle environment. Also, it was determined that support would be provided because ORACLE was described in the document.

    Checklist:

    • [x] Securely signed commits
    • [x] Component(s) with PHPdocs
    • [ ] Unit testing, with >80% coverage
    • [x] User guide updated
    • [x] Conforms to style guide

    The design of the program to get the insertId of this PR is not so good.

    Please good solution.

    database new feature dev 
    opened by ytetsuro 56
  • Add PHP 8.2 to Unit Tests GHA

    Add PHP 8.2 to Unit Tests GHA

    See #6170

    Checklist:

    • [x] Securely signed commits
    • [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
    • [ ] Unit testing, with >80% coverage
    • [ ] User guide updated
    • [ ] Conforms to style guide
    github_actions PHP 8.2 
    opened by paulbalandan 55
  • Issues with redirects - had to use exit to make it work and blank page

    Issues with redirects - had to use exit to make it work and blank page


    name: Bug report about: Help us improve the framework by reporting bugs!


    Describe the bug There are two issues with the redirect() method.

    1. I am not able to use return redirect()->to('/'); so I have to follow it up with an exit to make it work. e.g.
    public function hello() {
    //this won't work;
    return redirect()->to('/');
    //this works
    redirect()->to('/');
    exit;
    }
    
    1. The other issue is none of the redirects are working now since approximately after yesterday (17 nov 2018) evening. To make sure, I haven't accidently broken it, I just downloaded a new copy of CI4-develop and after setup I could see welcome message to confirm everything working fine. Then I made these modifications below to the Home controller. If I try mylocalsite/home/daljit it just shows a blank page.
     namespace App\Controllers;
    
    use CodeIgniter\Controller;
    
    class Home extends Controller
    {
    	public function index()
    	{
    		return view('welcome_message');
    	}
    
    	//--------------------------------------------------------------------
        public function daljit()
        {
            return redirect()->to("/home/hello");
        }
    
        public function hello()
        {
            echo "Hello!";
        }
    }
    

    CodeIgniter 4 version CodeIgniter 4 develop branch.

    opened by daljit3 49
  • Code Sniffer Rules

    Code Sniffer Rules

    Looking for someone familiar with PHP_CodeSniffer to create a ruleset matching our style guide. This is initially intended for use inside an IDE, and ultimately perhaps as part of our travis-ci build.

    help wanted in progress 
    opened by jim-parry 46
  • adds BaseResult::getNumRows(). adds getNumRows to various DBMS Result classes

    adds BaseResult::getNumRows(). adds getNumRows to various DBMS Result classes

    Added unit tests/system/Database/Live/GetNumRowsTest.php for this newly added method. Added an entry in the user docs for getNumRows method. Tweaks MockResult to fix phpstan problem and class definition conflict. This is my signed initial commit.

    Description Per Lonnie Ezell's message in #109, I have attempted my first CodeIgniter fork/branch/pull request here. It adds a getNumRows method to the ResultInterface and the various DBMS classes that extend it. This pull request supercedes a couple of messy ones (for which I apologize).

    Checklist:

    • [X] Securely signed commits
    • [X] Component(s) with PHPdocs
    • [X] Unit testing, with >80% coverage
    • [X] User guide updated
    • [X] Conforms to style guide
    opened by sneakyimp 39
  • Debug bar: Dark/light mode + Complete CSS refactoring

    Debug bar: Dark/light mode + Complete CSS refactoring

    Description

    Many devices and applications have a "dark mode" nowadays. I use it on my computer, and I develop applications with this feature.

    When I use the current debug bar, it sometimes gives a contrast which is tiring for the eyes. So I thought it might be interesting to add this feature, which ultimately requires only a few lines of code.

    Colors are similar to Chrome's console, using dark mode on Mac OS.

    Checklist:

    • [x] Securely signed commits
    • [x] Unit testing, with >80% coverage
    • [x] User guide updated
    • [x] Conforms to style guide
    • [x] Component(s) with PHPdocs (N/A)
    opened by LittleJ 38
  • Bug: php spark migrate throws wrongful CodeIgniter\Database\Exceptions\DatabaseException Unable to connect to the database

    Bug: php spark migrate throws wrongful CodeIgniter\Database\Exceptions\DatabaseException Unable to connect to the database

    Bug Description Impossible to perform migrations through spark (experienced in versions 4.0.2 to 4.0.4)

    Although DB credentials are set in .env and/orin app/Config/Database.php and successful query results obtained through Controller classes,

    php spark migrate causes CodeIgniter\Database\Exceptions\DatabaseException

    Exact command line output:

    
    CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2020-07-19 05:22:57am
    
    Running all new migrations...
    An uncaught Exception was encountered
    
    Type:        CodeIgniter\Database\Exceptions\DatabaseException
    Message:     Unable to connect to the database.
    Filename:    /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/BaseConnection.php
    Line Number: 425
    
    	Backtrace:
    						-646 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/BaseConnection.php::initialize
    								-1548 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/BaseConnection.php::query
    								-1591 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/BaseConnection.php::listTables
    								-945 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/MigrationRunner.php::tableExists
    								-193 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/MigrationRunner.php::ensureTable
    								-128 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Commands/Database/Migrate.php::latest
    								-100 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CLI/Commands.php::run
    								-107 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CLI/CommandRunner.php::run
    								-85 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CLI/CommandRunner.php::index
    								-914 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CodeIgniter.php::_remap
    								-404 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CodeIgniter.php::runController
    								-312 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CodeIgniter.php::handleRequest
    								-86 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CLI/Console.php::run
    								-57 - /Applications/MAMP/ci4projs/deneme/spark::run
    
    

    CodeIgniter 4 version Last gotten in v4.0.4 release

    Affected module(s) spark

    Expected behavior All migrations performed successfully (without exceptions).

    Steps to reproduce

    1. Open up a Terminal / command line window
    2. Change to the directory to the grand-parent level of your webserver's htdocs where htdocs will be substituted with the public directory of CI4
    3. composer create-project codeigniter4/appstarter deneme
    4. Open the project in your code editor and edit the .env file to set CI_ENVIRONMENT = development (duplicate it first from the file named 'env' if it doesn't exist - i.e. cp env .env)
    5. Perform one or both of steps 6 and 7:
    6. Enter DB credentials for MySQL in .env file (with database.default.DBDriver = MySQLi)
    7. Enter DB credentials in app/Config/Database.php
    8. Go back to the command line and run the following commands (in my example proj name is 'deneme': 9: cd deneme
    9. php spark migrate:create AddBlog
    10. (Optional) Go back to your code editor and open the file whose name is resembles "2020_mm_dd_hhmmss_AddBlog.php" from app/Database/Migrations
    11. (Optional) Replace the contents of up() and down() methods with example from https://codeigniter.com/user_guide/dbmgmt/migration.html
    12. Go back to the command line and while still in the root directory of the CI4 project run
    13. php spark migrate
    14. Compare your Terminal output to the following output:
    CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2020-07-19 05:42:10am
    
    Running all new migrations...
    An uncaught Exception was encountered
    
    Type:        CodeIgniter\Database\Exceptions\DatabaseException
    Message:     Unable to connect to the database.
    Filename:    /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/BaseConnection.php
    Line Number: 425
    
    	Backtrace:
    						-646 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/BaseConnection.php::initialize
    								-1548 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/BaseConnection.php::query
    								-1591 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/BaseConnection.php::listTables
    								-945 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/MigrationRunner.php::tableExists
    								-193 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Database/MigrationRunner.php::ensureTable
    								-128 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/Commands/Database/Migrate.php::latest
    								-100 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CLI/Commands.php::run
    								-107 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CLI/CommandRunner.php::run
    								-85 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CLI/CommandRunner.php::index
    								-914 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CodeIgniter.php::_remap
    								-404 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CodeIgniter.php::runController
    								-312 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CodeIgniter.php::handleRequest
    								-86 - /Applications/MAMP/ci4projs/deneme/vendor/codeigniter4/framework/system/CLI/Console.php::run
    								-57 - /Applications/MAMP/ci4projs/deneme/spark::run
    

    Context

    • OS: Experienced in macOS 10.3
    • Web server: Apache 2.x (in MAMP 5.4)
    • PHP version 7.3.7
    • MySQL 5.7
    bug 
    opened by gosocial2 35
  • Fix is_unique/is_not_unique validation called on POST/PUT via API in Postgresql

    Fix is_unique/is_not_unique validation called on POST/PUT via API in Postgresql

    Fixing #2812 . In postgresql, somehow, call via API with Resource Controller and is_unique/is_not_unique validation make query id != {id} not work. While in mysql work. This check if ignoreValue doesn't has { prefix and } suffix.

    Checklist:

    • [x] Securely signed commits
    • [x] Unit testing, with >80% coverage
    opened by samsonasik 35
  • feat: disallow `Model::update()` without WHERE clause

    feat: disallow `Model::update()` without WHERE clause

    Description It is not necessary that the update() method be able to update all records without WHERE clause. Updating all records is a risky operation and should not be mixed with update method with id(s).

    The current API is not good design because it is easily to create a vulnerability that allows all records to be updated if you accidentally forget to validate the $id. See https://forum.codeigniter.com/showthread.php?tid=84833

    • [BC] disallow Model::update() without WHERE clause (throws Exception).
    • disallow $id as bool for update()/delete() (throws Exception).
    • ~~add Model::updateAll($data) for UPDATE without WHERE clause.~~
    • add tests for Model::detete(). DELETE without WHERE clause is already not allowed.

    Checklist:

    • [x] Securely signed commits
    • [x] Component(s) with PHPDoc blocks, only if necessary or adds value
    • [ ] Unit testing, with >80% coverage
    • [x] User guide updated
    • [x] Conforms to style guide
    enhancement database breaking change 4.3 
    opened by kenjis 33
  • Bug: Argument 1 passed to CodeIgniter\Config\Services::request() must be an instance of Config\App or null, instance of BackEnd\Config\App

    Bug: Argument 1 passed to CodeIgniter\Config\Services::request() must be an instance of Config\App or null, instance of BackEnd\Config\App

    I have changed the namespace from Config\App to BackEnd\Config\App

    it gives me an error in the core here. called in /path/system/CodeIgniter.php on line 571

    Some of configuration files i can't use on BackEnd and FrontEnd simultaneously.

    How can i make this work without changing core ?

    This issue come from #3434

    bug 
    opened by crustamet 33
  • Bug: a tilde (~) in the path, such as within iCloud local storage, will cause CodeIgniter to fail

    Bug: a tilde (~) in the path, such as within iCloud local storage, will cause CodeIgniter to fail

    PHP Version

    8.2

    CodeIgniter4 Version

    4.2.11

    CodeIgniter4 Installation Method

    Composer (using codeigniter4/appstarter)

    Which operating systems have you tested for this bug?

    macOS

    Which server did you use?

    cli-server (PHP built-in webserver)

    Database

    none

    What happened?

    When a fresh composer-created CodeIgniter 4 application has a tilde(~) in its path, it crashes when staring with "php spark serve".

    This is a critical failure, because on MacOS in all filesystem areas synced to iCloud, tildes are present, like so: /Users/moo/Library/Mobile Documents/com~apple~CloudDocs/Documents/development/swapper/vendor/codeigniter4

    I moved the fresh new app out of the com~apple~CloudDocs directory tree to /Users/shared/dev/swapper, and it immediately starts up fine with "php spark serve".

    After renaming the directory from "/Users/shared/dev/swapper" to "/Users/shared/dev/~swapper", the application immediately fails when started with "php spark serve".

    CodeIgniter_4.2.11_tilde_bug.pdf

    Steps to Reproduce

    1. cd to directory that does not include a tilde(~), such as /Users/shared/ on MacOS.
    2. composer create-project codeigniter4/appstarter newApp
    3. cd ./newApp
    4. php spark serve
    5. newApp works as expected
    6. cd ../
    7. mv ./newApp ./~newApp
    8. cd ./~newApp
    9. php spark serve
    10. newApp fails due to the tilde-intolerance bug
    11. cd ../
    12. mv ./~newApp ./newApp
    13. cd newApp
    14. php spark serve now works as expected

    Expected Output

    php spark serve should start the application, no matter what characters are present in the path name. And ESPECIALLY tildes should be accounted for, because all MacOS users should be using iCloud to sync their files.

    Anything else?

    The test log on my machine:

    {23-01-05 23:51}MoosacreM1ProMax:/Users/Shared/dev moo% cd swapper 
    {23-01-05 23:51}MoosacreM1ProMax:/Users/Shared/dev/swapper moo% php spark serve
    
    CodeIgniter v4.2.11 Command Line Tool - Server Time: 2023-01-05 23:51:41 UTC-06:00
    
    CodeIgniter development server started on http://localhost:8080
    Press Control-C to stop.
    [Thu Jan  5 23:51:41 2023] PHP 8.2.1 Development Server (http://localhost:8080) started
    ^C
    {23-01-05 23:51}MoosacreM1ProMax:/Users/Shared/dev/swapper moo% cd ..
    {23-01-05 23:51}MoosacreM1ProMax:/Users/Shared/dev moo% mv swapper \~swapper
    {23-01-05 23:52}MoosacreM1ProMax:/Users/Shared/dev moo% cd \~swapper 
    {23-01-05 23:52}MoosacreM1ProMax:/Users/Shared/dev/~swapper moo% php spark serve
    PHP Fatal error:  Uncaught Error: Class "Config\App" not found in /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/Factories.php:129
    Stack trace:
    #0 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Common.php(204): CodeIgniter\Config\Factories::__callStatic('config', Array)
    #1 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/Services.php(146): config('App')
    #2 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/BaseService.php(253): CodeIgniter\Config\Services::codeigniter(NULL, false)
    #3 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/BaseService.php(194): CodeIgniter\Config\BaseService::__callStatic('codeigniter', Array)
    #4 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/Services.php(143): CodeIgniter\Config\BaseService::getSharedInstance('codeigniter', NULL)
    #5 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/BaseService.php(253): CodeIgniter\Config\Services::codeigniter()
    #6 /Users/Shared/dev/~swapper/spark(82): CodeIgniter\Config\BaseService::__callStatic('codeigniter', Array)
    #7 {main}
      thrown in /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/Factories.php on line 129
    
    Fatal error: Uncaught Error: Class "Config\App" not found in /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/Factories.php:129
    Stack trace:
    #0 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Common.php(204): CodeIgniter\Config\Factories::__callStatic('config', Array)
    #1 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/Services.php(146): config('App')
    #2 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/BaseService.php(253): CodeIgniter\Config\Services::codeigniter(NULL, false)
    #3 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/BaseService.php(194): CodeIgniter\Config\BaseService::__callStatic('codeigniter', Array)
    #4 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/Services.php(143): CodeIgniter\Config\BaseService::getSharedInstance('codeigniter', NULL)
    #5 /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/BaseService.php(253): CodeIgniter\Config\Services::codeigniter()
    #6 /Users/Shared/dev/~swapper/spark(82): CodeIgniter\Config\BaseService::__callStatic('codeigniter', Array)
    #7 {main}
      thrown in /Users/Shared/dev/~swapper/vendor/codeigniter4/framework/system/Config/Factories.php on line 129
    {23-01-05 23:52}MoosacreM1ProMax:/Users/Shared/dev/~swapper moo% composer create-project codeigniter4/appstarter swapper
    
    opened by zigmoo 2
  • fix: [Email] add fallback to use gethostname()

    fix: [Email] add fallback to use gethostname()

    Description [127.0.0.1] is not valid domain parameter. 127.0.0.1 is a loopback address.

    See https://forum.codeigniter.com/showthread.php?tid=84852

    Checklist:

    • [x] Securely signed commits
    • [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
    • [ ] Unit testing, with >80% coverage
    • [ ] User guide updated
    • [x] Conforms to style guide
    bug 
    opened by kenjis 0
  • InsertModelTest::testInsertBatchSetsDatetimeTimestamps failed on OCI8

    InsertModelTest::testInsertBatchSetsDatetimeTimestamps failed on OCI8

    database-live-tests (8.0, OCI8, 5.7) / Database Live Tests

    There was 1 failure:
    
    1) CodeIgniter\Models\InsertModelTest::testInsertBatchSetsDatetimeTimestamps
    Failed asserting that 2 is equal to 1 or is less than 1.
    
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Test/CIUnitTestCase.php:436
    /home/runner/work/CodeIgniter4/CodeIgniter4/tests/system/Models/InsertModelTest.php:125
    
    testing 
    opened by kenjis 0
  • feat: allow duplicate migration classnames

    feat: allow duplicate migration classnames

    Description

    • replace migration classname at runtime

    See https://github.com/codeigniter4/CodeIgniter4/pull/7038#issuecomment-1367178671

    How to Test

    $ php spark make:migration KenjisTest
    $ php spark make:migration KenjisTest
    $ php spark migrate
    $ php spark migrate:refresh
    

    Checklist:

    • [x] Securely signed commits
    • [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
    • [ ] Unit testing, with >80% coverage
    • [ ] User guide updated
    • [x] Conforms to style guide
    enhancement 4.3 
    opened by kenjis 10
  • docs: add about removal of deprecated functionality

    docs: add about removal of deprecated functionality

    Description See https://github.com/codeigniter4/CodeIgniter4/pull/7000#issuecomment-1364524729

    • update backward_compatibility_notes.rst

    At least Autoloader::loadLegacy() was removed in 4.1.0. See https://codeigniter4.github.io/CodeIgniter4/installation/upgrade_410.html#breaking-changes

    Checklist:

    • [x] Securely signed commits
    • [] Component(s) with PHPDoc blocks, only if necessary or adds value
    • [] Unit testing, with >80% coverage
    • [x] User guide updated
    • [] Conforms to style guide
    documentation 
    opened by kenjis 3
  • feat: `spark routes` option to sort by handler

    feat: `spark routes` option to sort by handler

    Description Supersedes #6415

    • add option -h to sort by handler
    $ php spark routes
    
    CodeIgniter v4.2.11 Command Line Tool - Server Time: 2022-12-24 02:10:28 UTC+00:00
    
    +--------+------------------------------+------+---------------------------------------------+----------------+---------------+
    | Method | Route                        | Name | Handler                                     | Before Filters | After Filters |
    +--------+------------------------------+------+---------------------------------------------+----------------+---------------+
    | GET    | /                            | »    | \App\Controllers\Home::index                |                | toolbar       |
    | GET    | bbs/index                    | »    | \App\Controllers\Bbs::index                 |                | toolbar       |
    | GET    | bbs/post                     | »    | \App\Controllers\Bbs::post                  |                | toolbar       |
    | GET    | form                         | »    | \App\Controllers\Form::index                |                | toolbar       |
    | GET    | shop/cart                    | »    | \App\Controllers\Shop\Cart::index           |                | toolbar       |
    | GET    | shop/index/([0-9]+)          | »    | \App\Controllers\Shop\Index::index/$1       |                | toolbar       |
    | GET    | shop/index/([0-9]+)/([0-9]+) | »    | \App\Controllers\Shop\Index::index/$1/$2    |                | toolbar       |
    | GET    | shop/product/([0-9]+)        | »    | \App\Controllers\Shop\Product::index/$1     |                | toolbar       |
    | GET    | shop/search                  | »    | \App\Controllers\Shop\Search::index         |                | toolbar       |
    | GET    | shop/search/([0-9]+)         | »    | \App\Controllers\Shop\Search::index/$1      |                | toolbar       |
    | POST   | bbs/confirm                  | »    | \App\Controllers\Bbs::confirm               |                | toolbar       |
    | POST   | bbs/delete/([0-9]+)          | »    | \App\Controllers\Bbs::delete/$1             |                | toolbar       |
    | POST   | bbs/insert                   | »    | \App\Controllers\Bbs::insert                |                | toolbar       |
    | POST   | form                         | »    | \App\Controllers\Form::index                |                | toolbar       |
    | POST   | form/confirm                 | »    | \App\Controllers\Form::confirm              |                | toolbar       |
    | POST   | form/send                    | »    | \App\Controllers\Form::send                 |                | toolbar       |
    | POST   | shop/add/([0-9]+)            | »    | \App\Controllers\Shop\Cart::add/$1          |                | toolbar       |
    | POST   | shop/customer_info           | »    | \App\Controllers\Shop\CustomerInfo::index   |                | toolbar       |
    | POST   | shop/confirm                 | »    | \App\Controllers\Shop\CustomerInfo::confirm |                | toolbar       |
    | POST   | shop/order                   | »    | \App\Controllers\Shop\Order::index          |                | toolbar       |
    +--------+------------------------------+------+---------------------------------------------+----------------+---------------+
    
    $ php spark routes -h
    
    CodeIgniter v4.2.11 Command Line Tool - Server Time: 2022-12-24 02:10:32 UTC+00:00
    
    +--------+------------------------------+------+---------------------------------------------+----------------+---------------+
    | Method | Route                        | Name | Handler ↓                                   | Before Filters | After Filters |
    +--------+------------------------------+------+---------------------------------------------+----------------+---------------+
    | POST   | bbs/confirm                  | »    | \App\Controllers\Bbs::confirm               |                | toolbar       |
    | POST   | bbs/delete/([0-9]+)          | »    | \App\Controllers\Bbs::delete/$1             |                | toolbar       |
    | GET    | bbs/index                    | »    | \App\Controllers\Bbs::index                 |                | toolbar       |
    | POST   | bbs/insert                   | »    | \App\Controllers\Bbs::insert                |                | toolbar       |
    | GET    | bbs/post                     | »    | \App\Controllers\Bbs::post                  |                | toolbar       |
    | POST   | form/confirm                 | »    | \App\Controllers\Form::confirm              |                | toolbar       |
    | GET    | form                         | »    | \App\Controllers\Form::index                |                | toolbar       |
    | POST   | form                         | »    | \App\Controllers\Form::index                |                | toolbar       |
    | POST   | form/send                    | »    | \App\Controllers\Form::send                 |                | toolbar       |
    | GET    | /                            | »    | \App\Controllers\Home::index                |                | toolbar       |
    | POST   | shop/add/([0-9]+)            | »    | \App\Controllers\Shop\Cart::add/$1          |                | toolbar       |
    | GET    | shop/cart                    | »    | \App\Controllers\Shop\Cart::index           |                | toolbar       |
    | POST   | shop/confirm                 | »    | \App\Controllers\Shop\CustomerInfo::confirm |                | toolbar       |
    | POST   | shop/customer_info           | »    | \App\Controllers\Shop\CustomerInfo::index   |                | toolbar       |
    | GET    | shop/index/([0-9]+)          | »    | \App\Controllers\Shop\Index::index/$1       |                | toolbar       |
    | GET    | shop/index/([0-9]+)/([0-9]+) | »    | \App\Controllers\Shop\Index::index/$1/$2    |                | toolbar       |
    | POST   | shop/order                   | »    | \App\Controllers\Shop\Order::index          |                | toolbar       |
    | GET    | shop/product/([0-9]+)        | »    | \App\Controllers\Shop\Product::index/$1     |                | toolbar       |
    | GET    | shop/search                  | »    | \App\Controllers\Shop\Search::index         |                | toolbar       |
    | GET    | shop/search/([0-9]+)         | »    | \App\Controllers\Shop\Search::index/$1      |                | toolbar       |
    +--------+------------------------------+------+---------------------------------------------+----------------+---------------+
    

    Checklist:

    • [x] Securely signed commits
    • [] Component(s) with PHPDoc blocks, only if necessary or adds value
    • [ ] Unit testing, with >80% coverage
    • [x] User guide updated
    • [x] Conforms to style guide
    enhancement 4.3 
    opened by kenjis 2
Releases(v4.2.11)
  • v4.2.11(Dec 22, 2022)

    CodeIgniter 4.2.11 release.

    See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md

    New Contributors

    • @danger89 made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6821
    • @LeMyst made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6833
    • @philFernandez made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6920

    Full Changelog: https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.10...v4.2.11

    Source code(tar.gz)
    Source code(zip)
  • v4.2.10(Nov 5, 2022)

  • v4.2.9(Oct 31, 2022)

  • v4.2.8(Oct 31, 2022)

    CodeIgniter 4.2.8 release.

    See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md

    New Contributors

    • @domaingenerator made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6660
    • @AndrewDawes made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6738

    Full Changelog: https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.7...v4.2.8

    Source code(tar.gz)
    Source code(zip)
  • v4.2.7(Oct 6, 2022)

    CodeIgniter 4.2.7 release.

    See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md

    New Contributors

    • @ddevsr made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6497
    • @DhPandya made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6521
    • @iamsyh made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6539
    • @akuo-tbf made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6585
    • @sammyskills made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6622
    Source code(tar.gz)
    Source code(zip)
  • v4.2.6(Sep 4, 2022)

    CodeIgniter 4.2.6 release.

    See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md

    New Contributors

    • @JavaDeveloperKiev made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6475

    Full Changelog: https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.5...v4.2.6

    Source code(tar.gz)
    Source code(zip)
  • v4.2.5(Aug 29, 2022)

    CodeIgniter 4.2.5 release.

    See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md

    New Contributors

    • @ping-yee made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6378
    Source code(tar.gz)
    Source code(zip)
  • v4.2.4(Aug 13, 2022)

    Hotfix release to fix download errors (see https://github.com/codeigniter4/CodeIgniter4/pull/6361).

    Full Changelog: https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.3...v4.2.4

    Source code(tar.gz)
    Source code(zip)
  • v4.2.3(Aug 7, 2022)

    CodeIgniter 4.2.3 release.

    See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md

    New Contributors

    • @naente made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6349

    Full Changelog: https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.2...v4.2.3

    Source code(tar.gz)
    Source code(zip)
  • v4.2.2(Aug 5, 2022)

    CodeIgniter 4.2.2 release.

    See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md

    Breaking Changes

    • Now Services::request() returns IncomingRequest or CLIRequest.
    • 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.
    • The method signature of BaseBuilder.php::insert() and BaseBuilder.php::update() have been changed. The ?array typehint on the $set parameter was removed.
    • 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.
    • Due to a bug fix, now random_string with the first parameter 'crypto' throws InvalidArgumentException if the second parameter $len is an odd number.

    New Contributors

    • @mackieee made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6196
    • @nalakapws made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6250
    • @fcosrno made their first contribution in https://github.com/codeigniter4/CodeIgniter4/pull/6257

    Full Changelog: https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.1...v4.2.2

    Source code(tar.gz)
    Source code(zip)
  • v4.2.1(Jun 16, 2022)

  • v4.2.0(Jun 3, 2022)

  • v4.1.9(Feb 26, 2022)

  • v4.1.8(Jan 24, 2022)

  • v4.1.7(Jan 10, 2022)

  • v4.1.6(Jan 4, 2022)

  • v4.1.5(Nov 8, 2021)

  • v4.1.4(Sep 7, 2021)

  • v4.1.3(Jun 5, 2021)

  • v4.1.2(May 18, 2021)

  • v4.1.1(Feb 1, 2021)

  • v4.1.0(Feb 1, 2021)

  • v4.0.5(Feb 1, 2021)

  • v4.0.4(Jul 16, 2020)

  • v4.0.3(May 1, 2020)

    Bugfixes and enhancements, including:

    • The API Response Trait now only determines the final formatting (json/xml) through content negotiation when the controller's $format variable is null. If it contains either json or xml, then that format will always be returned.
    • Pagination now can actually create next page and previous page links, instead of next/previous groups of links.
    • Windows users wanting to build their own copy of the user guide locally can now use the included make.bat file.
    • Locale matching in the IncomingRequest class now works to match broad groups, like fr even when the browser only supplies a more specific locale code, like fr-FR.
    • Added the ability to have nested language defintions.
    • add ability to replace {locale} to request->getLocale() in form_open('action')
    • tables generated by CLI commands can now be colored.
    Source code(tar.gz)
    Source code(zip)
  • 4.0.2(Feb 25, 2020)

  • v4.0.1(Feb 24, 2020)

  • 4.0.0(Feb 24, 2020)

  • v4.0.0-rc.4(Feb 7, 2020)

    • Fixed url systems so that it would work when system is served out of subfolders.
    • Added required insert ignore support for sqlite3 and mysql.
    • Add validation function is_not_unique
    • Various improvements and cleanup to the Email class
    • lots of small bugfixes and user guide updates
    Source code(tar.gz)
    Source code(zip)
  • v4.0.0-rc.3(Oct 19, 2019)

Owner
CodeIgniter 4 web framework
CodeIgniter 4 web framework
CleverStyle Framework is simple, scalable, fast and secure full-stack PHP framework

CleverStyle Framework is simple, scalable, fast and secure full-stack PHP framework. It is free, Open Source and is distributed under Free Public Lice

Nazar Mokrynskyi 150 Apr 12, 2022
Spiral Framework is a High-Performance PHP/Go Full-Stack framework and group of over sixty PSR-compatible components

Spiral HTTP Application Skeleton Spiral Framework is a High-Performance PHP/Go Full-Stack framework and group of over sixty PSR-compatible components.

Spiral Scout 152 Dec 18, 2022
High performance, full-stack PHP framework delivered as a C extension.

Phalcon Framework Phalcon is an open source web framework delivered as a C extension for the PHP language providing high performance and lower resourc

The Phalcon PHP Framework 10.7k Jan 8, 2023
A Faster Lightweight Full-Stack PHP Framework

A Faster Lightweight Full-Stack PHP Framework 中文版  Docker env Just one command to build all env for the easy-php How to build a PHP framework by ourse

Zhan Shi 769 Dec 8, 2022
li₃ is the fast, flexible and most RAD development framework for PHP

li₃ You asked for a better framework. Here it is. li₃ is the fast, flexible and the most RAD development framework for PHP. A framework of firsts li₃

Union of RAD 1.2k Dec 23, 2022
Yii 2: The Fast, Secure and Professional PHP Framework

Yii 2 is a modern framework designed to be a solid foundation for your PHP application. It is fast, secure and efficient and works right out of the bo

Yii Software 14k Dec 31, 2022
Simple, fast and secure PHP Framework with easy integration.

simple-php-framework Simple, fast and secure PHP Framework with easy integration.

winact 2 Nov 23, 2021
A simple and light-weight PHP framework

A simple and light-weight PHP framework

Radhe Shyam Salopanthula 0 Jun 22, 2022
Opulence is a PHP web application framework that simplifies the difficult parts of creating and maintaining a secure, scalable website.

Opulence Introduction Opulence is a PHP web application framework that simplifies the difficult parts of creating and maintaining a secure, scalable w

Opulence 733 Sep 8, 2022
Light, concurrent RPC framework for PHP & C

Yar - Yet Another RPC framework for PHP Light, concurrent RPC framework for PHP(see also: Yar C framework, Yar Java framework) Requirement PHP 7.0+ (m

Xinchen Hui 1.4k Dec 28, 2022
Framework X – the simple and fast micro framework for building reactive web applications that run anywhere.

Framework X Framework X – the simple and fast micro framework for building reactive web applications that run anywhere. Quickstart Documentation Tests

Christian Lück 620 Jan 7, 2023
Hackigniter, php codeigniter üzerinde kodlanmış zafiyetli bir web uygulamasıdır. Uygulama üzerinde bulunan zafiyetler, sızma testi sırasında en çok tespit edilen zafiyetlere benzer olacak şekilde hazırlanmıştır.

hackigniter Hakkında : Hackigniter php codeigniter üzerinde kodlanmış zafiyetli bir web uygulamasıdır. Uygulama üzerinde bulunan zafiyetler, sızma tes

Ferhat Çil 13 Dec 8, 2022
PHP REST API using CodeIgniter 3 framework and CRUD operations

PHP REST API using CodeIgniter 3 framework and CRUD operations ?? Hi there, this is a simple REST API built using the Codeigniter 3 framework. And thi

Hanoak 0 Oct 20, 2021
💡 Mudrock is a MVC PHP framework, which was inspired by the Laravel and CodeIgniter frameworks.

?? Mudrock is a MVC PHP framework, which was inspired by the Laravel and CodeIgniter frameworks

null 3 Nov 17, 2021
A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast! Condensed in a single ~65KB file

Bong Cosca 2.6k Dec 30, 2022
Woski is a fast and simple lightweight PHP Framework for building applications in the realm of the web.

Woski is a simple fast PHP framework for the Realm The Project Installation Clone the repository $ composer create-project clintonnzedimma/woski myApp

Clinton Nzedimma 19 Aug 15, 2022
🚀Hyperf is an extremely performant and flexible PHP CLI framework

Hyperf is an extremely performant and flexible PHP CLI framework, powered by a state-of-the-art coroutine server and a large number of battle-tested components. Aside from decisively beating PHP-FPM frameworks in benchmarks, Hyperf is unique in its focus on flexibility and composition.

Hyperf 4.9k Dec 30, 2022
Hyperf is an extremely performant and flexible PHP CLI framework

?? A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.

Hyperf 5k Jan 4, 2023
A simple, secure, and scalable PHP application framework

Opulence Introduction Opulence is a PHP web application framework that simplifies the difficult parts of creating and maintaining a secure, scalable w

Opulence 732 Dec 30, 2022