Skip to content

Update to CI 4.5.1 #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deptrac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ on:

jobs:
deptrac:
uses: codeigniter4/.github/.github/workflows/deptrac.yml@main
uses: codeigniter4/.github/.github/workflows/deptrac.yml@CI45
2 changes: 1 addition & 1 deletion .github/workflows/infection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ on:

jobs:
infection:
uses: codeigniter4/.github/.github/workflows/infection.yml@main
uses: codeigniter4/.github/.github/workflows/infection.yml@CI45
2 changes: 1 addition & 1 deletion .github/workflows/phpcpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ on:

jobs:
phpcpd:
uses: codeigniter4/.github/.github/workflows/phpcpd.yml@main
uses: codeigniter4/.github/.github/workflows/phpcpd.yml@CI45
with:
dirs: "src/ tests/"
2 changes: 1 addition & 1 deletion .github/workflows/phpcsfixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ on:

jobs:
phpcsfixer:
uses: codeigniter4/.github/.github/workflows/phpcsfixer.yml@main
uses: codeigniter4/.github/.github/workflows/phpcsfixer.yml@CI45
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ on:

jobs:
phpstan:
uses: codeigniter4/.github/.github/workflows/phpstan.yml@main
uses: codeigniter4/.github/.github/workflows/phpstan.yml@CI45
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ on:

jobs:
phpunit:
uses: codeigniter4/.github/.github/workflows/phpunit.yml@main
uses: codeigniter4/.github/.github/workflows/phpunit.yml@CI45
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ on:

jobs:
psalm:
uses: codeigniter4/.github/.github/workflows/psalm.yml@main
uses: codeigniter4/.github/.github/workflows/psalm.yml@CI45
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ on:

jobs:
rector:
uses: codeigniter4/.github/.github/workflows/rector.yml@main
uses: codeigniter4/.github/.github/workflows/rector.yml@CI45
2 changes: 1 addition & 1 deletion .github/workflows/unused.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ on:

jobs:
unused:
uses: codeigniter4/.github/.github/workflows/unused.yml@main
uses: codeigniter4/.github/.github/workflows/unused.yml@CI45
4 changes: 2 additions & 2 deletions app/.htaccess
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<IfModule authz_core_module>
Require all denied
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
Deny from all
</IfModule>
55 changes: 40 additions & 15 deletions app/Config/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ 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/';

/**
* 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<string>
*/
Expand All @@ -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 = 'index.php';

Expand All @@ -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[<permittedURIChars>]+\z/iu'
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
public string $permittedURIChars = 'a-z 0-9~%.:_\-';

/**
* --------------------------------------------------------------------------
* Default Locale
Expand Down Expand Up @@ -94,7 +118,7 @@ class App extends BaseConfig
*
* IncomingRequest::setLocale() also uses this list.
*
* @var string[]
* @var list<string>
*/
public array $supportedLocales = ['en'];

Expand All @@ -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';

Expand All @@ -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 = false;

Expand Down
15 changes: 5 additions & 10 deletions app/Config/Autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,17 @@ 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.
*
* Prototype:
* $psr4 = [
* 'CodeIgniter' => SYSTEMPATH,
* 'App' => APPPATH
* ];
*
* @var array<string, list<string>|string>
*/
public $psr4 = [
APP_NAMESPACE => APPPATH, // For custom app namespace
'Config' => APPPATH . 'Config',
APP_NAMESPACE => APPPATH,
];

/**
Expand Down
4 changes: 3 additions & 1 deletion app/Config/Boot/production.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
|
| If you set 'display_errors' to '1', CI4's detailed error report will show.
*/
error_reporting(E_ALL & ~E_DEPRECATED);
// If you want to suppress more types of errors.
// error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
ini_set('display_errors', '0');
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);

/*
|--------------------------------------------------------------------------
Expand Down
38 changes: 19 additions & 19 deletions app/Config/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,6 @@ class Cache extends BaseConfig
*/
public string $storePath = WRITEPATH . 'cache/';

/**
* --------------------------------------------------------------------------
* 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|string[]
*/
public $cacheQueryString = false;

/**
* --------------------------------------------------------------------------
* Key Prefix
Expand Down Expand Up @@ -168,4 +149,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<string>
*/
public $cacheQueryString = false;
}
32 changes: 16 additions & 16 deletions app/Config/ContentSecurityPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ class ContentSecurityPolicy extends BaseConfig
/**
* Will default to self if not overridden
*
* @var string|string[]|null
* @var list<string>|string|null
*/
public $defaultSrc;

/**
* Lists allowed scripts' URLs.
*
* @var string|string[]
* @var list<string>|string
*/
public $scriptSrc = 'self';

/**
* Lists allowed stylesheets' URLs.
*
* @var string|string[]
* @var list<string>|string
*/
public $styleSrc = 'self';

/**
* Defines the origins from which images can be loaded.
*
* @var string|string[]
* @var list<string>|string
*/
public $imageSrc = 'self';

Expand All @@ -75,36 +75,36 @@ class ContentSecurityPolicy extends BaseConfig
*
* Will default to self if not overridden
*
* @var string|string[]|null
* @var list<string>|string|null
*/
public $baseURI;

/**
* Lists the URLs for workers and embedded frame contents
*
* @var string|string[]
* @var list<string>|string
*/
public $childSrc = 'self';

/**
* Limits the origins that you can connect to (via XHR,
* WebSockets, and EventSource).
*
* @var string|string[]
* @var list<string>|string
*/
public $connectSrc = 'self';

/**
* Specifies the origins that can serve web fonts.
*
* @var string|string[]
* @var list<string>|string
*/
public $fontSrc;

/**
* Lists valid endpoints for submission from `<form>` tags.
*
* @var string|string[]
* @var list<string>|string
*/
public $formAction = 'self';

Expand All @@ -114,48 +114,48 @@ class ContentSecurityPolicy extends BaseConfig
* and `<applet>` tags. This directive can't be used in
* `<meta>` tags and applies only to non-HTML resources.
*
* @var string|string[]|null
* @var list<string>|string|null
*/
public $frameAncestors;

/**
* The frame-src directive restricts the URLs which may
* be loaded into nested browsing contexts.
*
* @var array|string|null
* @var list<string>|string|null
*/
public $frameSrc;

/**
* Restricts the origins allowed to deliver video and audio.
*
* @var string|string[]|null
* @var list<string>|string|null
*/
public $mediaSrc;

/**
* Allows control over Flash and other plugins.
*
* @var string|string[]
* @var list<string>|string
*/
public $objectSrc = 'self';

/**
* @var string|string[]|null
* @var list<string>|string|null
*/
public $manifestSrc;

/**
* Limits the kinds of plugins a page may invoke.
*
* @var string|string[]|null
* @var list<string>|string|null
*/
public $pluginTypes;

/**
* List of actions allowed.
*
* @var string|string[]|null
* @var list<string>|string|null
*/
public $sandbox;

Expand Down
Loading
Loading