diff --git a/.github/scripts/deploy.sh b/.github/scripts/deploy.sh
new file mode 100755
index 00000000..783eddb8
--- /dev/null
+++ b/.github/scripts/deploy.sh
@@ -0,0 +1,58 @@
+#!/bin/sh -e
+
+# Deploys the official site to the production server.
+# See ../workflows/deploy.yml
+
+REPO="/opt/website"
+RELEASE_DIR="/home/public_html/site/releases"
+SHARED_DIR="/home/public_html/site/shared"
+USERGUIDE_DIR="/home/public_html/userguides"
+CONFIG_FILE="/home/public_html/config/.env.site"
+
+if [ "$(id -u)" = "0" ]; then
+ echo "Cannot be run as root. Please run as the user for deployment."
+ exit 1
+fi
+
+RELEASE=`date +"%Y-%m-%d-%H-%M-%S"`
+
+echo 'Update website repository\n'
+cd $REPO
+git switch master
+git pull
+
+echo 'Copy current release\n'
+cd $RELEASE_DIR
+sudo cp -pr $REPO ./$RELEASE
+
+echo 'Install composer dependencies\n'
+cd $RELEASE_DIR/$RELEASE
+composer install --no-dev
+
+if [ ! -d "$SHARED_DIR" ]; then
+ echo 'Create shared directory\n'
+ sudo mkdir -p "$SHARED_DIR"
+ echo 'Setup folder permissions\n'
+ sudo chown -R www-data:www-data writable
+ sudo chmod -R 755 writable
+ sudo cp -rp writable "$SHARED_DIR"
+fi
+
+echo 'Link writable\n'
+sudo rm -rf writable
+sudo ln -nsf "$SHARED_DIR/writable" writable
+
+echo 'Link .env\n'
+sudo ln -nsf $CONFIG_FILE .env
+
+echo 'Link user guides\n'
+ln -nsf $USERGUIDE_DIR/userguide4 public/user_guide
+ln -nsf $USERGUIDE_DIR/userguide3 public/userguide3
+ln -nsf $USERGUIDE_DIR/userguide2 public/userguide2
+
+echo 'Deploy: update symlink\n'
+cd $RELEASE_DIR
+sudo ln -nsf $RELEASE_DIR/$RELEASE "../current"
+
+echo 'Reload PHP8.1-FPM\n'
+sudo service php8.1-fpm reload
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index bfffe306..4867e15e 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -9,63 +9,15 @@ jobs:
name: "Deploy to Production"
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
with:
ref: master
- - name: Install SSH key
- uses: shimataro/ssh-key-action@v2
+ - name: executing remote ssh commands using ssh key
+ uses: appleboy/ssh-action@v1.2.4
with:
- key: ${{ secrets.DEPLOY_KEY }}
- name: id_rsa
- known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
-
- - name: Deploy to Webserver
- uses: yeshan333/rsync-deploy-action@main
- id: rsync-deploy-action
- with:
- ssh_login_username: ${{ secrets.DEPLOY_USER }}
- remote_server_ip: ${{ secrets.DEPLOY_SSH_BOX }}
- ssh_port: ${{ secrets.DEPLOY_PORT }}
- ssh_private_key: ${{ secrets.DEPLOY_KEY }}
- source_path: "./*"
- destination_path: "/home/public_html/site/latest"
-
- - name: Finalize deployment
- uses: appleboy/ssh-action@master
- env:
- RELEASE_DIR: "/home/public_html/site/releases/"
- RSYNC_DIR: "/home/public_html/site/latest/"
- USERGUIDE_DIR: "/home/public_html/userguides"
- CONFIG_FILE: "/home/public_html/config/.env.site"
- with:
- host: ${{ secrets.DEPLOY_SSH_BOX }}
- username: ${{ secrets.DEPLOY_USER }}
- key: ${{ secrets.DEPLOY_KEY }}
- script_stop: true
- envs: RELEASE_DIR,CONFIG_FILE,RSYNC_DIR,USERGUIDE_DIR
- script: |
- cd ~/
- RELEASE=`date +"%d-%m-%Y-%H-%M-%S"`
-
- echo $'Copy current release\n'
- cd $RELEASE_DIR
- cp -r ../latest ./$RELEASE
-
- echo $'Install composer dependencies\n'
- cd $RELEASE_DIR/$RELEASE
- composer install
-
- echo $'Setup FS\n'
- cd $RELEASE_DIR/$RELEASE
- sudo chmod -R 777 writable
- sudo chmod -R a+rx vendor
- sudo ln -nsf $CONFIG_FILE .env
-
- echo $'Link current user guide\n'
- sudo ln -nsf $USERGUIDE_DIR/userguide4 public/user_guide
-
- echo $'Set up Links\n'
- cd $RELEASE_DIR
- sudo ln -nsf $RELEASE_DIR/$RELEASE "../current"
- sudo service php8.1-fpm reload
+ host: ${{ secrets.HOST }}
+ username: ${{ secrets.USERNAME }}
+ key: ${{ secrets.KEY }}
+ port: ${{ secrets.PORT }}
+ script: /opt/website/.github/scripts/deploy.sh
diff --git a/.github/workflows/infection.yml b/.github/workflows/infection.yml
index e7d09934..eb3fbe9d 100644
--- a/.github/workflows/infection.yml
+++ b/.github/workflows/infection.yml
@@ -26,12 +26,12 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '8.1'
+ php-version: '8.2'
tools: infection, phpunit
extensions: intl, json, mbstring, gd, xml, sqlite3
coverage: xdebug
@@ -48,7 +48,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache composer dependencies
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
@@ -65,6 +65,6 @@ jobs:
- name: Run Infection for added files only
run: |
git fetch --depth=1 origin $GITHUB_BASE_REF
- infection --threads=max --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --ignore-msi-with-no-mutations --only-covered --logger-github
+ infection --threads=max --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --ignore-msi-with-no-mutations --logger-github
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml
index 79e5ecb8..38a3c933 100644
--- a/.github/workflows/phpcsfixer.yml
+++ b/.github/workflows/phpcsfixer.yml
@@ -34,7 +34,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Set up PHP
uses: shivammathur/setup-php@v2
@@ -49,7 +49,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache composer dependencies
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index 9ff74c77..ddf6070d 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -38,7 +38,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -54,7 +54,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache composer dependencies
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
@@ -64,7 +64,7 @@ jobs:
run: mkdir -p build/phpstan
- name: Cache PHPStan results
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: build/phpstan
key: ${{ runner.os }}-phpstan-${{ github.sha }}
diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml
index 11f7fccf..f0667bf9 100644
--- a/.github/workflows/phpunit.yml
+++ b/.github/workflows/phpunit.yml
@@ -29,7 +29,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Set up PHP
uses: shivammathur/setup-php@v2
@@ -45,7 +45,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache composer dependencies
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
@@ -60,7 +60,7 @@ jobs:
fi
- name: Test with PHPUnit
- run: vendor/bin/phpunit --verbose --coverage-text
+ run: vendor/bin/phpunit --coverage-text
env:
TERM: xterm-256color
TACHYCARDIA_MONITOR_GA: enabled
diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml
index 59518cf5..93c8db2a 100644
--- a/.github/workflows/rector.yml
+++ b/.github/workflows/rector.yml
@@ -38,7 +38,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Set up PHP
uses: shivammathur/setup-php@v2
@@ -54,7 +54,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache composer dependencies
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
diff --git a/README.md b/README.md
index 6e4169b3..469dbb69 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ Some of the programming design decisions reflected:
## Server Requirements
-PHP version 7.4 or higher is required, with the following extensions installed:
+PHP version 8.1 or higher is required, with the following extensions installed:
- [intl](https://php.net/manual/en/intl.requirements.php)
- [libcurl](https://php.net/manual/en/curl.requirements.php) if you plan to use the `HTTP\CURLRequest` library
diff --git a/app/Config/App.php b/app/Config/App.php
index 17a7d65e..74239fb0 100644
--- a/app/Config/App.php
+++ b/app/Config/App.php
@@ -14,7 +14,7 @@ class App extends BaseConfig
* URL to your CodeIgniter root. Typically, this will be your base URL,
* WITH a trailing slash:
*
- * http://example.com/
+ * E.g., http://example.com/
*/
public string $baseURL = 'http://localhost:8080/';
@@ -22,10 +22,10 @@ class App extends BaseConfig
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
* If you want to accept multiple Hostnames, set this.
*
- * E.g. When your site URL ($baseURL) is 'http://example.com/', and your site
- * also accepts 'http://media.example.com/' and
- * 'http://accounts.example.com/':
- * ['media.example.com', 'accounts.example.com']
+ * E.g.,
+ * When your site URL ($baseURL) is 'http://example.com/', and your site
+ * also accepts 'http://media.example.com/' and 'http://accounts.example.com/':
+ * ['media.example.com', 'accounts.example.com']
*
* @var list
*/
@@ -36,9 +36,9 @@ class App extends BaseConfig
* Index File
* --------------------------------------------------------------------------
*
- * Typically this will be your index.php file, unless you've renamed it to
- * something else. If you are using mod_rewrite to remove the page set this
- * variable so that it is blank.
+ * Typically, this will be your `index.php` file, unless you've renamed it to
+ * something else. If you have configured your web server to remove this file
+ * from your site URIs, set this variable to an empty string.
*/
public string $indexPage = '';
@@ -48,17 +48,41 @@ class App extends BaseConfig
* --------------------------------------------------------------------------
*
* This item determines which server global should be used to retrieve the
- * URI string. The default setting of 'REQUEST_URI' works for most servers.
+ * URI string. The default setting of 'REQUEST_URI' works for most servers.
* If your links do not seem to work, try one of the other delicious flavors:
*
- * 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
- * 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
- * 'PATH_INFO' Uses $_SERVER['PATH_INFO']
+ * 'REQUEST_URI': Uses $_SERVER['REQUEST_URI']
+ * 'QUERY_STRING': Uses $_SERVER['QUERY_STRING']
+ * 'PATH_INFO': Uses $_SERVER['PATH_INFO']
*
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
public string $uriProtocol = 'REQUEST_URI';
+ /*
+ |--------------------------------------------------------------------------
+ | Allowed URL Characters
+ |--------------------------------------------------------------------------
+ |
+ | This lets you specify which characters are permitted within your URLs.
+ | When someone tries to submit a URL with disallowed characters they will
+ | get a warning message.
+ |
+ | As a security measure you are STRONGLY encouraged to restrict URLs to
+ | as few characters as possible.
+ |
+ | By default, only these are allowed: `a-z 0-9~%.:_-`
+ |
+ | Set an empty string to allow all characters -- but only if you are insane.
+ |
+ | The configured value is actually a regular expression character group
+ | and it will be used as: '/\A[]+\z/iu'
+ |
+ | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
+ |
+ */
+ public string $permittedURIChars = 'a-z 0-9~%.:_\-';
+
/**
* --------------------------------------------------------------------------
* Default Locale
@@ -94,7 +118,7 @@ class App extends BaseConfig
*
* IncomingRequest::setLocale() also uses this list.
*
- * @var string[]
+ * @var list
*/
public array $supportedLocales = ['en'];
@@ -106,7 +130,8 @@ class App extends BaseConfig
* The default timezone that will be used in your application to display
* dates with the date helper, and can be retrieved through app_timezone()
*
- * @see https://www.php.net/manual/en/timezones.php for list of timezones supported by PHP.
+ * @see https://www.php.net/manual/en/timezones.php for list of timezones
+ * supported by PHP.
*/
public string $appTimezone = 'UTC';
@@ -130,7 +155,7 @@ class App extends BaseConfig
* If true, this will force every request made to this application to be
* made via a secure connection (HTTPS). If the incoming request is not
* secure, the user will be redirected to a secure version of the page
- * and the HTTP Strict Transport Security header will be set.
+ * and the HTTP Strict Transport Security (HSTS) header will be set.
*/
public bool $forceGlobalSecureRequests = true;
diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php
index 647b5ee9..79972a47 100644
--- a/app/Config/Autoload.php
+++ b/app/Config/Autoload.php
@@ -17,8 +17,6 @@
*
* NOTE: This class is required prior to Autoloader instantiation,
* and does not extend BaseConfig.
- *
- * @immutable
*/
class Autoload extends AutoloadConfig
{
@@ -30,8 +28,10 @@ class Autoload extends AutoloadConfig
* their location on the file system. These are used by the autoloader
* to locate files the first time they have been instantiated.
*
- * The '/app' and '/system' directories are already mapped for you.
- * you may change the name of the 'App' namespace if you wish,
+ * The 'Config' (APPPATH . 'Config') and 'CodeIgniter' (SYSTEMPATH) are
+ * already mapped for you.
+ *
+ * You may change the name of the 'App' namespace if you wish,
* but this should be done prior to creating any namespaced classes,
* else you will need to modify all of those classes for this to work.
*
@@ -44,8 +44,7 @@ class Autoload extends AutoloadConfig
* @var array|string>
*/
public $psr4 = [
- APP_NAMESPACE => APPPATH, // For custom app namespace
- 'Config' => APPPATH . 'Config',
+ APP_NAMESPACE => APPPATH,
];
/**
diff --git a/app/Config/Boot/development.php b/app/Config/Boot/development.php
index 63fdd88b..94274168 100644
--- a/app/Config/Boot/development.php
+++ b/app/Config/Boot/development.php
@@ -1,4 +1,5 @@
+ * @var array{storePath?: string, mode?: int}
*/
public array $file = [
'storePath' => WRITEPATH . 'cache/',
@@ -118,12 +88,13 @@ class Cache extends BaseConfig
* -------------------------------------------------------------------------
* Memcached settings
* -------------------------------------------------------------------------
+ *
* Your Memcached servers can be specified below, if you are using
* the Memcached drivers.
*
* @see https://codeigniter.com/user_guide/libraries/caching.html#memcached
*
- * @var array
+ * @var array{host?: string, port?: int, weight?: int, raw?: bool}
*/
public array $memcached = [
'host' => '127.0.0.1',
@@ -136,10 +107,11 @@ class Cache extends BaseConfig
* -------------------------------------------------------------------------
* Redis settings
* -------------------------------------------------------------------------
+ *
* Your Redis server can be specified below, if you are using
* the Redis or Predis drivers.
*
- * @var array
+ * @var array{host?: string, password?: string|null, port?: int, timeout?: int, database?: int}
*/
public array $redis = [
'host' => '127.0.0.1',
@@ -167,4 +139,23 @@ class Cache extends BaseConfig
'redis' => RedisHandler::class,
'wincache' => WincacheHandler::class,
];
+
+ /**
+ * --------------------------------------------------------------------------
+ * Web Page Caching: Cache Include Query String
+ * --------------------------------------------------------------------------
+ *
+ * Whether to take the URL query string into consideration when generating
+ * output cache files. Valid options are:
+ *
+ * false = Disabled
+ * true = Enabled, take all query parameters into account.
+ * Please be aware that this may result in numerous cache
+ * files generated for the same page over and over again.
+ * ['q'] = Enabled, but only take into account the specified list
+ * of query parameters.
+ *
+ * @var bool|list
+ */
+ public $cacheQueryString = false;
}
diff --git a/app/Config/Constants.php b/app/Config/Constants.php
index 197bfce9..d28eb41c 100644
--- a/app/Config/Constants.php
+++ b/app/Config/Constants.php
@@ -67,28 +67,13 @@
| https://tldp.org/LDP/abs/html/exitcodes.html
|
*/
-defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
-defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
-defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
-defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
-defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
+defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
+defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
+defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
+defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
+defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
-defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
-defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
-defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
-defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
-
-/**
- * @deprecated Use \CodeIgniter\Events\Events::PRIORITY_LOW instead.
- */
-define('EVENT_PRIORITY_LOW', 200);
-
-/**
- * @deprecated Use \CodeIgniter\Events\Events::PRIORITY_NORMAL instead.
- */
-define('EVENT_PRIORITY_NORMAL', 100);
-
-/**
- * @deprecated Use \CodeIgniter\Events\Events::PRIORITY_HIGH instead.
- */
-define('EVENT_PRIORITY_HIGH', 10);
+defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
+defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
+defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
+defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
diff --git a/app/Config/ContentSecurityPolicy.php b/app/Config/ContentSecurityPolicy.php
index 18612e15..b414fcbd 100644
--- a/app/Config/ContentSecurityPolicy.php
+++ b/app/Config/ContentSecurityPolicy.php
@@ -45,28 +45,28 @@ class ContentSecurityPolicy extends BaseConfig
/**
* Will default to self if not overridden
*
- * @var string|string[]|null
+ * @var list|string|null
*/
public $defaultSrc;
/**
* Lists allowed scripts' URLs.
*
- * @var string|string[]
+ * @var list|string
*/
public $scriptSrc = 'self';
/**
* Lists allowed stylesheets' URLs.
*
- * @var string|string[]
+ * @var list|string
*/
public $styleSrc = 'self';
/**
* Defines the origins from which images can be loaded.
*
- * @var string|string[]
+ * @var list|string
*/
public $imageSrc = 'self';
@@ -75,14 +75,14 @@ class ContentSecurityPolicy extends BaseConfig
*
* Will default to self if not overridden
*
- * @var string|string[]|null
+ * @var list|string|null
*/
public $baseURI;
/**
* Lists the URLs for workers and embedded frame contents
*
- * @var string|string[]
+ * @var list|string
*/
public $childSrc = 'self';
@@ -90,21 +90,21 @@ class ContentSecurityPolicy extends BaseConfig
* Limits the origins that you can connect to (via XHR,
* WebSockets, and EventSource).
*
- * @var string|string[]
+ * @var list|string
*/
public $connectSrc = 'self';
/**
* Specifies the origins that can serve web fonts.
*
- * @var string|string[]
+ * @var list|string
*/
public $fontSrc;
/**
* Lists valid endpoints for submission from `
-
- Slack
-
-
+ Visit Slack Channel
-
Github
+
GitHub
- The development action takes place on Github. See the contribute page for more details.
+ The development action takes place on GitHub. See the contribute page for more details.
- The Github repository is where you can file bug reports (github issues), or where you can submit pull requests
- for enhancements to or fixes for framework. Github is *not* for support or help ... use the forum instead.
+ The GitHub repository is where you can file bug reports (github issues), or where you can submit pull requests
+ for enhancements to or fixes for framework. GitHub is *not* for support or help ... use the forum instead.
- Github issues are also used for tracking planned and approved enhancements, often tied in to specific releases.
+ GitHub issues are also used for tracking planned and approved enhancements, often tied in to specific releases.
-
- CodeIgniter 3
- CodeIgniter 4
-
-
+
+
CodeIgniter 3
+
CodeIgniter 4
+
diff --git a/app/Views/download.php b/app/Views/download.php
index 7b4504dc..5104d4e1 100644
--- a/app/Views/download.php
+++ b/app/Views/download.php
@@ -12,8 +12,8 @@
-
CodeIgniter 4 is the latest version of the framework, intended for use with PHP 7.4+ (including 8.2).
-
The initial release was February 24, 2020. The current version is = $v4name ?>.
+
CodeIgniter 4 is the latest version of the framework, intended for use with PHP 8.1+ (including 8.4).
+
The initial release was February 24, 2020. The current version is = esc($v4name) ?>.
You *could* download this version of the framework using the button below, but we encourage you to check the
Installation section
diff --git a/app/Views/errors/cli/error_exception.php b/app/Views/errors/cli/error_exception.php
index 98d83b0e..624f3b5b 100644
--- a/app/Views/errors/cli/error_exception.php
+++ b/app/Views/errors/cli/error_exception.php
@@ -3,7 +3,7 @@
use CodeIgniter\CLI\CLI;
// The main Exception
-CLI::write('[' . get_class($exception) . ']', 'light_gray', 'red');
+CLI::write('[' . $exception::class . ']', 'light_gray', 'red');
CLI::write($message);
CLI::write('at ' . CLI::color(clean_path($exception->getFile()) . ':' . $exception->getLine(), 'green'));
CLI::newLine();
@@ -14,7 +14,7 @@
$last = $prevException;
CLI::write(' Caused by:');
- CLI::write(' [' . get_class($prevException) . ']', 'red');
+ CLI::write(' [' . $prevException::class . ']', 'red');
CLI::write(' ' . $prevException->getMessage());
CLI::write(' at ' . CLI::color(clean_path($prevException->getFile()) . ':' . $prevException->getLine(), 'green'));
CLI::newLine();
@@ -50,20 +50,11 @@
$function .= $padClass . $error['function'];
}
- $args = implode(', ', array_map(static function ($value) {
- switch (true) {
- case is_object($value):
- return 'Object(' . get_class($value) . ')';
-
- case is_array($value):
- return count($value) ? '[...]' : '[]';
-
- case $value === null:
- return 'null'; // return the lowercased version
-
- default:
- return var_export($value, true);
- }
+ $args = implode(', ', array_map(static fn ($value): string => match (true) {
+ is_object($value) => 'Object(' . $value::class . ')',
+ is_array($value) => $value !== [] ? '[...]' : '[]',
+ $value === null => 'null', // return the lowercased version
+ default => var_export($value, true),
}, array_values($error['args'] ?? [])));
$function .= '(' . $args . ')';
diff --git a/app/Views/errors/html/debug.css b/app/Views/errors/html/debug.css
index 98f54dbc..b8539a42 100644
--- a/app/Views/errors/html/debug.css
+++ b/app/Views/errors/html/debug.css
@@ -3,7 +3,7 @@
--main-text-color: #555;
--dark-text-color: #222;
--light-text-color: #c7c7c7;
- --brand-primary-color: #E06E3F;
+ --brand-primary-color: #DC4814;
--light-bg-color: #ededee;
--dark-bg-color: #404040;
}
@@ -19,7 +19,6 @@ body {
}
h1 {
font-weight: lighter;
- letter-spacing: 0.8;
font-size: 3rem;
color: var(--dark-text-color);
margin: 0;
@@ -42,9 +41,10 @@ p.lead {
.header {
background: var(--light-bg-color);
color: var(--dark-text-color);
+ margin-top: 2.17rem;
}
.header .container {
- padding: 1rem 1.75rem 1.75rem 1.75rem;
+ padding: 1rem;
}
.header h1 {
font-size: 2.5rem;
@@ -65,14 +65,14 @@ p.lead {
display: inline;
}
-.footer {
- background: var(--dark-bg-color);
- color: var(--light-text-color);
-}
-.footer .container {
- border-top: 1px solid #e7e7e7;
- margin-top: 1rem;
+.environment {
+ background: var(--brand-primary-color);
+ color: var(--main-bg-color);
text-align: center;
+ padding: calc(4px + 0.2083vw);
+ width: 100%;
+ top: 0;
+ position: fixed;
}
.source {
@@ -112,7 +112,7 @@ p.lead {
}
.tabs a:link,
.tabs a:visited {
- padding: 0rem 1rem;
+ padding: 0 1rem;
line-height: 2.7;
text-decoration: none;
color: var(--dark-text-color);
@@ -152,9 +152,6 @@ p.lead {
border-radius: 5px;
color: #31708f;
}
-ul, ol {
- line-height: 1.8;
-}
table {
width: 100%;
diff --git a/app/Views/errors/html/error_400.php b/app/Views/errors/html/error_400.php
new file mode 100644
index 00000000..555da042
--- /dev/null
+++ b/app/Views/errors/html/error_400.php
@@ -0,0 +1,84 @@
+
+
+
+
+
= lang('Errors.badRequest') ?>
+
+
+
+
+
+
400
+
+
+
+ = nl2br(esc($message)) ?>
+
+ = lang('Errors.sorryBadRequest') ?>
+
+
+
+
+
diff --git a/app/Views/errors/html/error_exception.php b/app/Views/errors/html/error_exception.php
index 406b48ec..2c4e0091 100644
--- a/app/Views/errors/html/error_exception.php
+++ b/app/Views/errors/html/error_exception.php
@@ -1,5 +1,5 @@