Actualizacion automatica: 2024-05-01 20:46:56

This commit is contained in:
imnavajas
2024-05-01 20:52:15 +02:00
parent 0c4888f9b3
commit 94446e4a79
26 changed files with 585 additions and 315 deletions

8
.idea/safekat.iml generated
View File

@ -1,13 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/ci4/app" isTestSource="false" packagePrefix="App\" />
<sourceFolder url="file://$MODULE_DIR$/ci4/app/Config" isTestSource="false" packagePrefix="Config\" />
<sourceFolder url="file://$MODULE_DIR$/ci4/app/ThirdParty/DatatablesEditor/" isTestSource="false" packagePrefix="DataTables\" />
<sourceFolder url="file://$MODULE_DIR$/ci4/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/ci4/tests/_support" isTestSource="true" packagePrefix="Tests\Support\" />
</content>
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>

View File

@ -1,6 +1,6 @@
<?php
namespace App\Config;
namespace Config;
use CodeIgniter\Config\BaseConfig;

View File

@ -2,6 +2,7 @@
namespace Config;
use CodeIgniter\Cache\CacheInterface;
use CodeIgniter\Cache\Handlers\DummyHandler;
use CodeIgniter\Cache\Handlers\FileHandler;
use CodeIgniter\Cache\Handlers\MemcachedHandler;
@ -19,10 +20,8 @@ class Cache extends BaseConfig
*
* The name of the preferred handler that should be used. If for some reason
* it is not available, the $backupHandler will be used in its place.
*
* @var string
*/
public $handler = 'file';
public string $handler = 'file';
/**
* --------------------------------------------------------------------------
@ -32,10 +31,8 @@ class Cache extends BaseConfig
* The name of the handler that will be used in case the first one is
* unreachable. Often, 'file' is used here since the filesystem is
* always available, though that's not always practical for the app.
*
* @var string
*/
public $backupHandler = 'dummy';
public string $backupHandler = 'dummy';
/**
* --------------------------------------------------------------------------
@ -45,11 +42,9 @@ class Cache extends BaseConfig
* The path to where cache files should be stored, if using a file-based
* system.
*
* @var string
*
* @deprecated Use the driver-specific variant under $file
*/
public $storePath = WRITEPATH . 'cache/';
public string $storePath = WRITEPATH . 'cache/';
/**
* --------------------------------------------------------------------------
@ -59,12 +54,12 @@ class Cache extends BaseConfig
* 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.
* array('q') = Enabled, but only take into account the specified list
* of query parameters.
* 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[]
*/
@ -77,10 +72,8 @@ class Cache extends BaseConfig
*
* This string is added to all cache item names to help avoid collisions
* if you run multiple applications with the same cache engine.
*
* @var string
*/
public $prefix = '';
public string $prefix = '';
/**
* --------------------------------------------------------------------------
@ -92,10 +85,21 @@ class Cache extends BaseConfig
* WARNING: This is not used by framework handlers where 60 seconds is
* hard-coded, but may be useful to projects and modules. This will replace
* the hard-coded value in a future release.
*
* @var int
*/
public $ttl = 60;
public int $ttl = 60;
/**
* --------------------------------------------------------------------------
* Reserved Characters
* --------------------------------------------------------------------------
*
* A string of reserved characters that will not be allowed in keys or tags.
* Strings that violate this restriction will cause handlers to throw.
* Default: {}()/\@:
*
* NOTE: The default set is required for PSR-6 compliance.
*/
public string $reservedCharacters = '{}()/\@:';
/**
* --------------------------------------------------------------------------
@ -106,7 +110,7 @@ class Cache extends BaseConfig
*
* @var array<string, int|string|null>
*/
public $file = [
public array $file = [
'storePath' => WRITEPATH . 'cache/',
'mode' => 0640,
];
@ -120,9 +124,9 @@ class Cache extends BaseConfig
*
* @see https://codeigniter.com/user_guide/libraries/caching.html#memcached
*
* @var array<string, boolean|int|string>
* @var array<string, bool|int|string>
*/
public $memcached = [
public array $memcached = [
'host' => '127.0.0.1',
'port' => 11211,
'weight' => 1,
@ -138,7 +142,7 @@ class Cache extends BaseConfig
*
* @var array<string, int|string|null>
*/
public $redis = [
public array $redis = [
'host' => '127.0.0.1',
'password' => null,
'port' => 6379,
@ -154,9 +158,9 @@ class Cache extends BaseConfig
* This is an array of cache engine alias' and class names. Only engines
* that are listed here are allowed to be used.
*
* @var array<string, string>
* @var array<string, class-string<CacheInterface>>
*/
public $validHandlers = [
public array $validHandlers = [
'dummy' => DummyHandler::class,
'file' => FileHandler::class,
'memcached' => MemcachedHandler::class,

View File

@ -38,9 +38,9 @@ defined('MINUTE') || define('MINUTE', 60);
defined('HOUR') || define('HOUR', 3600);
defined('DAY') || define('DAY', 86400);
defined('WEEK') || define('WEEK', 604800);
defined('MONTH') || define('MONTH', 2592000);
defined('YEAR') || define('YEAR', 31536000);
defined('DECADE') || define('DECADE', 315360000);
defined('MONTH') || define('MONTH', 2_592_000);
defined('YEAR') || define('YEAR', 31_536_000);
defined('DECADE') || define('DECADE', 315_360_000);
/*
| --------------------------------------------------------------------------
@ -67,13 +67,28 @@ defined('DECADE') || define('DECADE', 315360000);
| http://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
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);

View File

@ -15,38 +15,32 @@ use CodeIgniter\Config\BaseConfig;
*/
class ContentSecurityPolicy extends BaseConfig
{
//-------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Broadbrush CSP management
//-------------------------------------------------------------------------
// -------------------------------------------------------------------------
/**
* Default CSP report context
*
* @var bool
*/
public $reportOnly = false;
public bool $reportOnly = false;
/**
* Specifies a URL where a browser will send reports
* when a content security policy is violated.
*
* @var string|null
*/
public $reportURI;
public ?string $reportURI = null;
/**
* Instructs user agents to rewrite URL schemes, changing
* HTTP to HTTPS. This directive is for websites with
* large numbers of old URLs that need to be rewritten.
*
* @var bool
*/
public $upgradeInsecureRequests = false;
public bool $upgradeInsecureRequests = false;
//-------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Sources allowed
// Note: once you set a policy to 'none', it cannot be further restricted
//-------------------------------------------------------------------------
// NOTE: once you set a policy to 'none', it cannot be further restricted
// -------------------------------------------------------------------------
/**
* Will default to self if not overridden
@ -164,4 +158,19 @@ class ContentSecurityPolicy extends BaseConfig
* @var string|string[]|null
*/
public $sandbox;
/**
* Nonce tag for style
*/
public string $styleNonceTag = '{csp-style-nonce}';
/**
* Nonce tag for script
*/
public string $scriptNonceTag = '{csp-script-nonce}';
/**
* Replace nonce tag automatically
*/
public bool $autoNonce = true;
}

View File

@ -2,6 +2,9 @@
namespace Config;
/**
* @immutable
*/
class DocTypes
{
/**
@ -9,7 +12,7 @@ class DocTypes
*
* @var array<string, string>
*/
public $list = [
public array $list = [
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
@ -30,4 +33,14 @@ class DocTypes
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
];
/**
* Whether to remove the solidus (`/`) character for void HTML elements (e.g. `<input>`)
* for HTML5 compatibility.
*
* Set to:
* `true` - to be HTML5 compatible
* `false` - to be XHTML compatible
*/
public bool $html5 = true;
}

View File

@ -6,165 +6,116 @@ use CodeIgniter\Config\BaseConfig;
class Email extends BaseConfig
{
/**
* @var string
*/
public $fromEmail;
/**
* @var string
*/
public $fromName;
/**
* @var string
*/
public $recipients;
public string $fromEmail = 'safekat@imnavajas.es';
public string $fromName = 'Safekat ERP';
public string $recipients = '';
/**
* The "user agent"
*
* @var string
*/
public $userAgent = 'Safekat ERP';
public string $userAgent = 'Safekat SL';
/**
* The mail sending protocol: mail, sendmail, smtp
*
* @var string
*/
public $protocol = 'smtp';
public string $protocol = 'smtp';
/**
* The server path to Sendmail.
*
* @var string
*/
public $mailPath = '/usr/sbin/sendmail';
public string $mailPath = '/usr/sbin/sendmail';
/**
* SMTP Server Address
*
* @var string
* SMTP Server Hostname
*/
public $SMTPHost = "imnavajas.es";
public string $SMTPHost = 'imnavajas.es';
/**
* SMTP Username
*
* @var string
*/
public $SMTPUser = "safekat@imnavajas.es";
public string $SMTPUser = 'safekat@imnavajas.es';
/**
* SMTP Password
*
* @var string
*/
public $SMTPPass = "Etkd9~448";
public string $SMTPPass = 'Etkd9~448';
/**
* SMTP Port
*
* @var int
*/
public $SMTPPort = 25;
public int $SMTPPort = 25;
/**
* SMTP Timeout (in seconds)
*
* @var int
*/
public $SMTPTimeout = 5;
public int $SMTPTimeout = 5;
/**
* Enable persistent SMTP connections
*
* @var bool
*/
public $SMTPKeepAlive = false;
public bool $SMTPKeepAlive = false;
/**
* SMTP Encryption. Either tls or ssl
* SMTP Encryption.
*
* @var string
* @var string '', 'tls' or 'ssl'. 'tls' will issue a STARTTLS command
* to the server. 'ssl' means implicit SSL. Connection on port
* 465 should set this to ''.
*/
public $SMTPCrypto = 'tls';
public string $SMTPCrypto = 'tls';
/**
* Enable word-wrap
*
* @var bool
*/
public $wordWrap = true;
public bool $wordWrap = true;
/**
* Character count to wrap at
*
* @var int
*/
public $wrapChars = 76;
public int $wrapChars = 76;
/**
* Type of mail, either 'text' or 'html'
*
* @var string
*/
public $mailType = 'html';
public string $mailType = 'html';
/**
* Character set (utf-8, iso-8859-1, etc.)
*
* @var string
*/
public $charset = 'UTF-8';
public string $charset = 'UTF-8';
/**
* Whether to validate the email address
*
* @var bool
*/
public $validate = false;
public bool $validate = false;
/**
* Email Priority. 1 = highest. 5 = lowest. 3 = normal
*
* @var int
*/
public $priority = 3;
public int $priority = 3;
/**
* Newline character. (Use “\r\n” to comply with RFC 822)
*
* @var string
*/
public $CRLF = "\r\n";
public string $CRLF = "\r\n";
/**
* Newline character. (Use “\r\n” to comply with RFC 822)
*
* @var string
*/
public $newline = "\r\n";
public string $newline = "\r\n";
/**
* Enable BCC Batch Mode.
*
* @var bool
*/
public $BCCBatchMode = false;
public bool $BCCBatchMode = false;
/**
* Number of emails in each BCC batch
*
* @var int
*/
public $BCCBatchSize = 200;
public int $BCCBatchSize = 200;
/**
* Enable notify message from server
*
* @var bool
*/
public $DSN = false;
public bool $DSN = false;
}

View File

@ -20,10 +20,8 @@ class Encryption extends BaseConfig
* If you use the Encryption class you must set an encryption key (seed).
* You need to ensure it is long enough for the cipher and mode you plan to use.
* See the user guide for more info.
*
* @var string
*/
public $key = '';
public string $key = '';
/**
* --------------------------------------------------------------------------
@ -35,10 +33,8 @@ class Encryption extends BaseConfig
* Available drivers:
* - OpenSSL
* - Sodium
*
* @var string
*/
public $driver = 'OpenSSL';
public string $driver = 'OpenSSL';
/**
* --------------------------------------------------------------------------
@ -49,10 +45,8 @@ class Encryption extends BaseConfig
* before it is encrypted. This value should be greater than zero.
*
* See the user guide for more information on padding.
*
* @var int
*/
public $blockSize = 16;
public int $blockSize = 16;
/**
* --------------------------------------------------------------------------
@ -60,8 +54,39 @@ class Encryption extends BaseConfig
* --------------------------------------------------------------------------
*
* HMAC digest to use, e.g. 'SHA512' or 'SHA256'. Default value is 'SHA512'.
*
* @var string
*/
public $digest = 'SHA512';
public string $digest = 'SHA512';
/**
* Whether the cipher-text should be raw. If set to false, then it will be base64 encoded.
* This setting is only used by OpenSSLHandler.
*
* Set to false for CI3 Encryption compatibility.
*/
public bool $rawData = true;
/**
* Encryption key info.
* This setting is only used by OpenSSLHandler.
*
* Set to 'encryption' for CI3 Encryption compatibility.
*/
public string $encryptKeyInfo = '';
/**
* Authentication key info.
* This setting is only used by OpenSSLHandler.
*
* Set to 'authentication' for CI3 Encryption compatibility.
*/
public string $authKeyInfo = '';
/**
* Cipher to use.
* This setting is only used by OpenSSLHandler.
*
* Set to 'AES-128-CBC' to decrypt encrypted data that encrypted
* by CI3 Encryption default configuration.
*/
public string $cipher = 'AES-256-CTR';
}

View File

@ -0,0 +1,30 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
/**
* Enable/disable backward compatibility breaking features.
*/
class Feature extends BaseConfig
{
/**
* Enable multiple filters for a route or not.
*
* If you enable this:
* - CodeIgniter\CodeIgniter::handleRequest() uses:
* - CodeIgniter\Filters\Filters::enableFilters(), instead of enableFilter()
* - CodeIgniter\CodeIgniter::tryToRouteIt() uses:
* - CodeIgniter\Router\Router::getFilters(), instead of getFilter()
* - CodeIgniter\Router\Router::handle() uses:
* - property $filtersInfo, instead of $filterInfo
* - CodeIgniter\Router\RouteCollection::getFiltersForRoute(), instead of getFilterForRoute()
*/
public bool $multipleFilters = false;
/**
* Use improved new auto routing instead of the default legacy version.
*/
public bool $autoRoutesImproved = false;
}

View File

@ -4,6 +4,9 @@ namespace Config;
use CodeIgniter\Config\ForeignCharacters as BaseForeignCharacters;
/**
* @immutable
*/
class ForeignCharacters extends BaseForeignCharacters
{
}

View File

@ -4,6 +4,8 @@ namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Format\FormatterInterface;
use CodeIgniter\Format\JSONFormatter;
use CodeIgniter\Format\XMLFormatter;
class Format extends BaseConfig
{
@ -22,7 +24,7 @@ class Format extends BaseConfig
*
* @var string[]
*/
public $supportedResponseFormats = [
public array $supportedResponseFormats = [
'application/json',
'application/xml', // machine-readable XML
'text/xml', // human-readable XML
@ -39,10 +41,10 @@ class Format extends BaseConfig
*
* @var array<string, string>
*/
public $formatters = [
'application/json' => 'CodeIgniter\Format\JSONFormatter',
'application/xml' => 'CodeIgniter\Format\XMLFormatter',
'text/xml' => 'CodeIgniter\Format\XMLFormatter',
public array $formatters = [
'application/json' => JSONFormatter::class,
'application/xml' => XMLFormatter::class,
'text/xml' => XMLFormatter::class,
];
/**
@ -55,7 +57,7 @@ class Format extends BaseConfig
*
* @var array<string, int>
*/
public $formatterOptions = [
public array $formatterOptions = [
'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES,
'application/xml' => 0,
'text/xml' => 0,

View File

@ -25,8 +25,11 @@ class Generators extends BaseConfig
*
* @var array<string, string>
*/
public $views = [
public array $views = [
'make:cell' => 'CodeIgniter\Commands\Generators\Views\cell.tpl.php',
'make:cell_view' => 'CodeIgniter\Commands\Generators\Views\cell_view.tpl.php',
'make:command' => 'CodeIgniter\Commands\Generators\Views\command.tpl.php',
'make:config' => 'CodeIgniter\Commands\Generators\Views\config.tpl.php',
'make:controller' => 'CodeIgniter\Commands\Generators\Views\controller.tpl.php',
'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php',
'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php',

View File

@ -8,36 +8,35 @@ class Honeypot extends BaseConfig
{
/**
* Makes Honeypot visible or not to human
*
* @var bool
*/
public $hidden = true;
public bool $hidden = true;
/**
* Honeypot Label Content
*
* @var string
*/
public $label = 'Fill This Field';
public string $label = 'Fill This Field';
/**
* Honeypot Field Name
*
* @var string
*/
public $name = 'honeypot';
public string $name = 'honeypot';
/**
* Honeypot HTML Template
*
* @var string
*/
public $template = '<label>{label}</label><input type="text" name="{name}" value=""/>';
public string $template = '<label>{label}</label><input type="text" name="{name}" value="">';
/**
* Honeypot container
*
* @var string
* If you enabled CSP, you can remove `style="display:none"`.
*/
public $container = '<div style="display:none">{template}</div>';
public string $container = '<div style="display:none">{template}</div>';
/**
* The id attribute for Honeypot container tag
*
* Used when CSP is enabled.
*/
public string $containerId = 'hpc';
}

View File

@ -10,25 +10,21 @@ class Images extends BaseConfig
{
/**
* Default handler used if no other handler is specified.
*
* @var string
*/
public $defaultHandler = 'gd';
public string $defaultHandler = 'gd';
/**
* The path to the image library.
* Required for ImageMagick, GraphicsMagick, or NetPBM.
*
* @var string
*/
public $libraryPath = '/usr/local/bin/convert';
public string $libraryPath = '/usr/local/bin/convert';
/**
* The available handler classes.
*
* @var array<string, string>
*/
public $handlers = [
public array $handlers = [
'gd' => GDHandler::class,
'imagick' => ImageMagickHandler::class,
];

View File

@ -3,6 +3,7 @@
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Log\Handlers\FileHandler;
class Logger extends BaseConfig
{
@ -37,7 +38,7 @@ class Logger extends BaseConfig
*
* @var array|int
*/
public $threshold = 4;
public $threshold = (ENVIRONMENT === 'production') ? 4 : 9;
/**
* --------------------------------------------------------------------------
@ -46,10 +47,8 @@ class Logger extends BaseConfig
*
* Each item that is logged has an associated date. You can use PHP date
* codes to set your own date formatting
*
* @var string
*/
public $dateFormat = 'Y-m-d H:i:s';
public string $dateFormat = 'Y-m-d H:i:s';
/**
* --------------------------------------------------------------------------
@ -73,18 +72,14 @@ class Logger extends BaseConfig
*
* Handlers are executed in the order defined in this array, starting with
* the handler on top and continuing down.
*
* @var array
*/
public $handlers = [
public array $handlers = [
/*
* --------------------------------------------------------------------
* File Handler
* --------------------------------------------------------------------
*/
'CodeIgniter\Log\Handlers\FileHandler' => [
FileHandler::class => [
// The log levels that this handler will handle.
'handles' => [
'critical',
@ -102,7 +97,7 @@ class Logger extends BaseConfig
* An extension of 'php' allows for protecting the log files via basic
* scripting, when they are to be stored under a publicly accessible directory.
*
* Note: Leaving it blank will default to 'log'.
* NOTE: Leaving it blank will default to 'log'.
*/
'fileExtension' => '',
@ -140,14 +135,14 @@ class Logger extends BaseConfig
* Uncomment this block to use it.
*/
// 'CodeIgniter\Log\Handlers\ErrorlogHandler' => [
// /* The log levels this handler can handle. */
// 'handles' => ['critical', 'alert', 'emergency', 'debug', 'error', 'info', 'notice', 'warning'],
// /* The log levels this handler can handle. */
// 'handles' => ['critical', 'alert', 'emergency', 'debug', 'error', 'info', 'notice', 'warning'],
//
// /*
// * The message type where the error should go. Can be 0 or 4, or use the
// * class constants: `ErrorlogHandler::TYPE_OS` (0) or `ErrorlogHandler::TYPE_SAPI` (4)
// */
// 'messageType' => 0,
// /*
// * The message type where the error should go. Can be 0 or 4, or use the
// * class constants: `ErrorlogHandler::TYPE_OS` (0) or `ErrorlogHandler::TYPE_SAPI` (4)
// */
// 'messageType' => 0,
// ],
];
}

View File

@ -15,10 +15,8 @@ class Migrations extends BaseConfig
*
* You should enable migrations whenever you intend to do a schema migration
* and disable it back when you're done.
*
* @var bool
*/
public $enabled = true;
public bool $enabled = true;
/**
* --------------------------------------------------------------------------
@ -27,13 +25,9 @@ class Migrations extends BaseConfig
*
* This is the name of the table that will store the current migrations state.
* When migrations runs it will store in a database table which migration
* level the system is at. It then compares the migration level in this
* table to the $config['migration_version'] if they are not the same it
* will migrate up. This must be set.
*
* @var string
* files have already been run.
*/
public $table = 'migrations';
public string $table = 'migrations';
/**
* --------------------------------------------------------------------------
@ -42,14 +36,15 @@ class Migrations extends BaseConfig
*
* This is the format that will be used when creating new migrations
* using the CLI command:
* > php spark migrate:create
* > php spark make:migration
*
* Typical formats:
* NOTE: if you set an unsupported format, migration runner will not find
* your migration files.
*
* Supported formats:
* - YmdHis_
* - Y-m-d-His_
* - Y_m_d_His_
*
* @var string
*/
public $timestampFormat = 'Y-m-d-His_';
public string $timestampFormat = 'Y-m-d-His_';
}

View File

@ -15,15 +15,15 @@ namespace Config;
*
* When working with mime types, please make sure you have the ´fileinfo´
* extension enabled to reliably detect the media types.
*
* @immutable
*/
class Mimes
{
/**
* Map of extensions to mime types.
*
* @var array
*/
public static $mimes = [
public static array $mimes = [
'hqx' => [
'application/mac-binhex40',
'application/mac-binhex',
@ -55,6 +55,8 @@ class Mimes
'lzh' => 'application/octet-stream',
'exe' => [
'application/octet-stream',
'application/vnd.microsoft.portable-executable',
'application/x-dosexec',
'application/x-msdownload',
],
'class' => 'application/octet-stream',
@ -102,8 +104,6 @@ class Mimes
],
'pptx' => [
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/x-zip',
'application/zip',
],
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
@ -260,6 +260,7 @@ class Mimes
'image/png',
'image/x-png',
],
'webp' => 'image/webp',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'css' => [
@ -509,22 +510,21 @@ class Mimes
{
$type = trim(strtolower($type), '. ');
$proposedExtension = trim(strtolower($proposedExtension));
$proposedExtension = trim(strtolower($proposedExtension ?? ''));
if ($proposedExtension !== '') {
if (array_key_exists($proposedExtension, static::$mimes) && in_array($type, is_string(static::$mimes[$proposedExtension]) ? [static::$mimes[$proposedExtension]] : static::$mimes[$proposedExtension], true)) {
// The detected mime type matches with the proposed extension.
return $proposedExtension;
}
// An extension was proposed, but the media type does not match the mime type list.
return null;
if (
$proposedExtension !== ''
&& array_key_exists($proposedExtension, static::$mimes)
&& in_array($type, (array) static::$mimes[$proposedExtension], true)
) {
// The detected mime type matches with the proposed extension.
return $proposedExtension;
}
// Reverse check the mime type list if no extension was proposed.
// This search is order sensitive!
foreach (static::$mimes as $ext => $types) {
if ((is_string($types) && $types === $type) || (is_array($types) && in_array($type, $types, true))) {
if (in_array($type, (array) $types, true)) {
return $ext;
}
}

View File

@ -4,6 +4,14 @@ namespace Config;
use CodeIgniter\Modules\Modules as BaseModules;
/**
* Modules Configuration.
*
* NOTE: This class is required prior to Autoloader instantiation,
* and does not extend BaseConfig.
*
* @immutable
*/
class Modules extends BaseModules
{
/**
@ -31,6 +39,29 @@ class Modules extends BaseModules
*/
public $discoverInComposer = true;
/**
* The Composer package list for Auto-Discovery
* This setting is optional.
*
* E.g.:
* [
* 'only' => [
* // List up all packages to auto-discover
* 'codeigniter4/shield',
* ],
* ]
* or
* [
* 'exclude' => [
* // List up packages to exclude.
* 'pestphp/pest',
* ],
* ]
*
* @var array{only?: list<string>, exclude?: list<string>}
*/
public $composerPackages = [];
/**
* --------------------------------------------------------------------------
* Auto-Discovery Rules
@ -41,7 +72,7 @@ class Modules extends BaseModules
*
* If it is not listed, only the base application elements will be used.
*
* @var string[]
* @var list<string>
*/
public $aliases = [
'events',

View File

@ -20,7 +20,7 @@ class Pager extends BaseConfig
*
* @var array<string, string>
*/
public $templates = [
public array $templates = [
'default_full' => 'CodeIgniter\Pager\Views\default_full',
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
'default_head' => 'CodeIgniter\Pager\Views\default_head',
@ -32,8 +32,6 @@ class Pager extends BaseConfig
* --------------------------------------------------------------------------
*
* The default number of results shown in a single page.
*
* @var int
*/
public $perPage = 20;
public int $perPage = 20;
}

View File

@ -22,10 +22,8 @@ class Paths
*
* This must contain the name of your "system" folder. Include
* the path if the folder is not in the same directory as this file.
*
* @var string
*/
public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';
public string $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';
/**
* ---------------------------------------------------------------
@ -34,14 +32,12 @@ class Paths
*
* If you want this front controller to use a different "app"
* folder than the default one you can set its name here. The folder
* can also be renamed or relocated anywhere on your getServer. If
* you do, use a full getServer path.
* can also be renamed or relocated anywhere on your server. If
* you do, use a full server path.
*
* @see http://codeigniter.com/user_guide/general/managing_apps.html
*
* @var string
*/
public $appDirectory = __DIR__ . '/..';
public string $appDirectory = __DIR__ . '/..';
/**
* ---------------------------------------------------------------
@ -53,10 +49,8 @@ class Paths
* need write permission to a single place that can be tucked away
* for maximum security, keeping it out of the app and/or
* system directories.
*
* @var string
*/
public $writableDirectory = __DIR__ . '/../../writable';
public string $writableDirectory = __DIR__ . '/../../writable';
/**
* ---------------------------------------------------------------
@ -64,10 +58,8 @@ class Paths
* ---------------------------------------------------------------
*
* This variable must contain the name of your "tests" directory.
*
* @var string
*/
public $testsDirectory = __DIR__ . '/../../tests';
public string $testsDirectory = __DIR__ . '/../../tests';
/**
* ---------------------------------------------------------------
@ -78,8 +70,6 @@ class Paths
* contains the view files used by your application. By
* default this is in `app/Views`. This value
* is used when no value is provided to `Services::renderer()`.
*
* @var string
*/
public $viewDirectory = __DIR__ . '/../Views';
public string $viewDirectory = __DIR__ . '/../Views';
}

View File

@ -23,7 +23,7 @@ class UserAgents extends BaseConfig
*
* @var array<string, string>
*/
public $platforms = [
public array $platforms = [
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
@ -78,7 +78,7 @@ class UserAgents extends BaseConfig
*
* @var array<string, string>
*/
public $browsers = [
public array $browsers = [
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Spartan',
@ -119,7 +119,7 @@ class UserAgents extends BaseConfig
*
* @var array<string, string>
*/
public $mobiles = [
public array $mobiles = [
// legacy array, old values commented out
'mobileexplorer' => 'Mobile Explorer',
// 'openwave' => 'Open Wave',
@ -228,7 +228,7 @@ class UserAgents extends BaseConfig
*
* @var array<string, string>
*/
public $robots = [
public array $robots = [
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',

View File

@ -2,18 +2,17 @@
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Validation\StrictRules\CreditCardRules;
use CodeIgniter\Validation\StrictRules\FileRules;
use CodeIgniter\Validation\StrictRules\FormatRules;
use CodeIgniter\Validation\StrictRules\Rules;
use CodeIgniter\Shield\Authentication\Passwords\ValidationRules;
use CodeIgniter\Validation\CreditCardRules;
use CodeIgniter\Validation\FileRules;
use CodeIgniter\Validation\FormatRules;
use CodeIgniter\Validation\Rules;
class Validation
class Validation extends BaseConfig
{
//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Setup
//--------------------------------------------------------------------
// --------------------------------------------------------------------
/**
* Stores the classes that contain the
@ -26,7 +25,6 @@ class Validation
FormatRules::class,
FileRules::class,
CreditCardRules::class,
ValidationRules::class,
];
/**
@ -39,44 +37,9 @@ class Validation
'list' => 'CodeIgniter\Validation\Views\list',
'single' => 'CodeIgniter\Validation\Views\single',
'bootstrap_style' => 'themes/_commonPartialsBs/_form_validation_errors',
];
//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Rules
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// Rules For Login
//--------------------------------------------------------------------
/*public $login = [
// 'username' => [
// 'label' => 'Auth.username',
// 'rules' => [
// 'required',
// 'max_length[30]',
// 'min_length[3]',
// 'regex_match[/\A[a-zA-Z0-9\.]+\z/]',
// ],
// ],
'email' => [
'label' => 'Auth.email',
'rules' => [
'required',
'max_length[254]',
'valid_email'
],
],
'password' => [
'label' => 'Auth.password',
'rules' => [
'required',
'max_byte[72]',
],
'errors' => [
'max_byte' => 'Auth.errorPasswordTooLongBytes',
]
],
];*/
// --------------------------------------------------------------------
}

View File

@ -3,7 +3,12 @@
namespace Config;
use CodeIgniter\Config\View as BaseView;
use CodeIgniter\View\ViewDecoratorInterface;
/**
* @phpstan-type ParserCallable (callable(mixed): mixed)
* @phpstan-type ParserCallableString (callable(mixed): mixed)&string
*/
class View extends BaseView
{
/**
@ -29,7 +34,8 @@ class View extends BaseView
* { title|esc(js) }
* { created_on|date(Y-m-d)|esc(attr) }
*
* @var array
* @var array<string, string>
* @phpstan-var array<string, ParserCallableString>
*/
public $filters = [];
@ -38,7 +44,19 @@ class View extends BaseView
* by the core Parser by creating aliases that will be replaced with
* any callable. Can be single or tag pair.
*
* @var array
* @var array<string, array<string>|callable|string>
* @phpstan-var array<string, array<ParserCallableString>|ParserCallableString|ParserCallable>
*/
public $plugins = [];
/**
* View Decorators are class methods that will be run in sequence to
* have a chance to alter the generated output just prior to caching
* the results.
*
* All classes must implement CodeIgniter\View\ViewDecoratorInterface
*
* @var class-string<ViewDecoratorInterface>[]
*/
public array $decorators = [];
}

View File

@ -0,0 +1,117 @@
<?php
declare(strict_types=1);
/**
* This file is part of CodeIgniter Shield.
*
* (c) CodeIgniter Foundation <admin@codeigniter.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
return [
// Exceptions
'unknownAuthenticator' => '{0} is not a valid authenticator.',
'unknownUserProvider' => 'Unable to determine the User Provider to use.',
'invalidUser' => 'Unable to locate the specified user.',
'bannedUser' => 'Can not log you in as you are currently banned.',
'logOutBannedUser' => 'You have been logged out because you have been banned.',
'badAttempt' => 'Unable to log you in. Please check your credentials.',
'noPassword' => 'Cannot validate a user without a password.',
'invalidPassword' => 'Unable to log you in. Please check your password.',
'noToken' => 'Every request must have a bearer token in the {0} header.',
'badToken' => 'The access token is invalid.',
'oldToken' => 'The access token has expired.',
'noUserEntity' => 'User Entity must be provided for password validation.',
'invalidEmail' => 'Unable to verify the email address matches the email on record.',
'unableSendEmailToUser' => 'Sorry, there was a problem sending the email. We could not send an email to "{0}".',
'throttled' => 'Too many requests made from this IP address. You may try again in {0} seconds.',
'notEnoughPrivilege' => 'You do not have the necessary permission to perform the desired operation.',
// JWT Exceptions
'invalidJWT' => 'The token is invalid.',
'expiredJWT' => 'The token has expired.',
'beforeValidJWT' => 'The token is not yet available.',
'email' => 'Email Address',
'username' => 'Username',
'password' => 'Password',
'passwordConfirm' => 'Password (again)',
'haveAccount' => 'Already have an account?',
'token' => 'Token',
// Buttons
'confirm' => 'Confirm',
'send' => 'Send',
// Registration
'register' => 'Register',
'registerDisabled' => 'Registration is not currently allowed.',
'registerSuccess' => 'Welcome aboard!',
// Login
'login' => 'Login',
'needAccount' => 'Need an account?',
'rememberMe' => 'Remember me?',
'forgotPassword' => 'Forgot your password?',
'useMagicLink' => 'Use a Login Link',
'magicLinkSubject' => 'Your Login Link',
'magicTokenNotFound' => 'Unable to verify the link.',
'magicLinkExpired' => 'Sorry, link has expired.',
'checkYourEmail' => 'Check your email!',
'magicLinkDetails' => 'We just sent you an email with a Login link inside. It is only valid for {0} minutes.',
'magicLinkDisabled' => 'Use of MagicLink is currently not allowed.',
'successLogout' => 'You have successfully logged out.',
'backToLogin' => 'Back to Login',
// Passwords
'errorPasswordLength' => 'Passwords must be at least {0, number} characters long.',
'suggestPasswordLength' => 'Pass phrases - up to 255 characters long - make more secure passwords that are easy to remember.',
'errorPasswordCommon' => 'Password must not be a common password.',
'suggestPasswordCommon' => 'The password was checked against over 65k commonly used passwords or passwords that have been leaked through hacks.',
'errorPasswordPersonal' => 'Passwords cannot contain re-hashed personal information.',
'suggestPasswordPersonal' => 'Variations on your email address or username should not be used for passwords.',
'errorPasswordTooSimilar' => 'Password is too similar to the username.',
'suggestPasswordTooSimilar' => 'Do not use parts of your username in your password.',
'errorPasswordPwned' => 'The password {0} has been exposed due to a data breach and has been seen {1, number} times in {2} of compromised passwords.',
'suggestPasswordPwned' => '{0} should never be used as a password. If you are using it anywhere change it immediately.',
'errorPasswordEmpty' => 'A Password is required.',
'errorPasswordTooLongBytes' => 'Password cannot exceed {param} bytes in length.',
'passwordChangeSuccess' => 'Password changed successfully',
'userDoesNotExist' => 'Password was not changed. User does not exist',
'resetTokenExpired' => 'Sorry. Your reset token has expired.',
// Email Globals
'emailInfo' => 'Some information about the person:',
'emailIpAddress' => 'IP Address:',
'emailDevice' => 'Device:',
'emailDate' => 'Date:',
// 2FA
'email2FATitle' => 'Two Factor Authentication',
'confirmEmailAddress' => 'Confirm your email address.',
'emailEnterCode' => 'Confirm your Email',
'emailConfirmCode' => 'Enter the 6-digit code we just sent to your email address.',
'email2FASubject' => 'Your authentication code',
'email2FAMailBody' => 'Your authentication code is:',
'invalid2FAToken' => 'The code was incorrect.',
'need2FA' => 'You must complete a two-factor verification.',
'needVerification' => 'Check your email to complete account activation.',
// Activate
'emailActivateTitle' => 'Email Activation',
'emailActivateBody' => 'We just sent an email to you with a code to confirm your email address. Copy that code and paste it below.',
'emailActivateSubject' => 'Your activation code',
'emailActivateMailBody' => 'Please use the code below to activate your account and start using the site.',
'invalidActivateToken' => 'The code was incorrect.',
'needActivate' => 'You must complete your registration by confirming the code sent to your email address.',
'activationBlocked' => 'You must activate your account before logging in.',
// Groups
'unknownGroup' => '{0} is not a valid group.',
'missingTitle' => 'Groups must have a title.',
// Permissions
'unknownPermission' => '{0} is not a valid permission.',
];

View File

@ -0,0 +1,117 @@
<?php
declare(strict_types=1);
/**
* This file is part of CodeIgniter Shield.
*
* (c) CodeIgniter Foundation <admin@codeigniter.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
return [
// Excepciones
'unknownAuthenticator' => '{0} no es un autenticador válido.',
'unknownUserProvider' => 'No se puede determinar el proveedor de usuario a utilizar.',
'invalidUser' => 'No se puede localizar al usuario especificado.',
'bannedUser' => 'No puedes iniciar sesión ya que estás actualmente vetado.',
'logOutBannedUser' => 'Se ha cerrado la sesión porque se ha vetado al usuario.',
'badAttempt' => 'No se puede iniciar sesión. Por favor, comprueba tus credenciales.',
'noPassword' => 'No se puede validar un usuario sin contraseña.',
'invalidPassword' => 'No se puede iniciar sesión. Por favor, comprueba tu contraseña.',
'noToken' => 'Cada solicitud debe tener un token de portador en la cabecera {0}.',
'badToken' => 'El token de acceso no es válido.',
'oldToken' => 'El token de acceso ha caducado.',
'noUserEntity' => 'Se debe proporcionar una entidad de usuario para la validación de contraseña.',
'invalidEmail' => 'No se puede verificar que la dirección de correo electrónico coincida con la registrada.',
'unableSendEmailToUser' => 'Lo siento, hubo un problema al enviar el correo electrónico. No pudimos enviar un correo electrónico a "{0}".',
'throttled' => 'Se han realizado demasiadas solicitudes desde esta dirección IP. Puedes intentarlo de nuevo en {0} segundos.',
'notEnoughPrivilege' => 'No tienes los permisos necesarios para realizar la operación deseada.',
// JWT Exceptions
'invalidJWT' => '(To be translated) The token is invalid.',
'expiredJWT' => '(To be translated) The token has expired.',
'beforeValidJWT' => '(To be translated) The token is not yet available.',
'email' => 'Correo Electrónico',
'username' => 'Nombre de usuario',
'password' => 'Contraseña',
'passwordConfirm' => 'Contraseña (otra vez)',
'haveAccount' => '¿Ya tienes una cuenta?',
'token' => '(To be translated) Token',
// Botones
'confirm' => 'Confirmar',
'send' => 'Enviar',
// Registro
'register' => 'Registrarse',
'registerDisabled' => 'Actualmente no se permite el registro.',
'registerSuccess' => '¡Bienvenido a bordo!',
// Login
'login' => 'Iniciar sesión',
'needAccount' => '¿Necesitas una cuenta?',
'rememberMe' => 'Recordarme',
'forgotPassword' => '¿Olvidaste tu contraseña?',
'useMagicLink' => 'Usar un enlace de inicio de sesión',
'magicLinkSubject' => 'Tu enlace de inicio de sesión',
'magicTokenNotFound' => 'No se puede verificar el enlace.',
'magicLinkExpired' => 'Lo siento, el enlace ha caducado.',
'checkYourEmail' => '¡Revisa tu correo electrónico!',
'magicLinkDetails' => 'Acabamos de enviarte un correo electrónico con un enlace de inicio de sesión. Solo es válido durante {0} minutos.',
'magicLinkDisabled' => '(To be translated) Use of MagicLink is currently not allowed.',
'successLogout' => 'Has cerrado sesión correctamente.',
'backToLogin' => 'Volver al inicio de sesión',
// Contraseñas
'errorPasswordLength' => 'Las contraseñas deben tener al menos {0, number} caracteres.',
'suggestPasswordLength' => 'Las frases de contraseña, de hasta 255 caracteres de longitud, hacen que las contraseñas sean más seguras y fáciles de recordar.',
'errorPasswordCommon' => 'La contraseña no puede ser una contraseña común.',
'suggestPasswordCommon' => 'La contraseña se comprobó frente a más de 65k contraseñas comúnmente utilizadas o contraseñas que se filtraron a través de ataques.',
'errorPasswordPersonal' => 'Las contraseñas no pueden contener información personal reutilizada.',
'suggestPasswordPersonal' => 'No se deben usar variaciones de su dirección de correo electrónico o nombre de usuario como contraseña.',
'errorPasswordTooSimilar' => 'La contraseña es demasiado similar al nombre de usuario.',
'suggestPasswordTooSimilar' => 'No use partes de su nombre de usuario en su contraseña.',
'errorPasswordPwned' => 'La contraseña {0} se ha expuesto debido a una violación de datos y se ha visto {1, number} veces en {2} de contraseñas comprometidas.',
'suggestPasswordPwned' => 'Nunca se debe usar {0} como contraseña. Si lo está utilizando en algún lugar, cambie su contraseña de inmediato.',
'errorPasswordEmpty' => 'Se requiere una contraseña.',
'errorPasswordTooLongBytes' => 'La contraseña no puede tener más de {param} caracteres',
'passwordChangeSuccess' => 'Contraseña cambiada correctamente',
'userDoesNotExist' => 'La contraseña no se cambió. El usuario no existe',
'resetTokenExpired' => 'Lo siento. Su token de reinicio ha caducado.',
// Email Globals
'emailInfo' => 'Alguna información sobre la persona:',
'emailIpAddress' => 'Dirección IP:',
'emailDevice' => 'Dispositivo:',
'emailDate' => 'Fecha:',
// 2FA
'email2FATitle' => 'Autenticación de dos factores',
'confirmEmailAddress' => 'Confirma tu dirección de correo electrónico.',
'emailEnterCode' => 'Confirma tu correo electrónico',
'emailConfirmCode' => 'Ingresa el código de 6 dígitos que acabamos de enviar a tu correo electrónico.',
'email2FASubject' => 'Tu código de autenticación',
'email2FAMailBody' => 'Tu código de autenticación es:',
'invalid2FAToken' => 'El código era incorrecto.',
'need2FA' => 'Debes completar la verificación de dos factores.',
'needVerification' => 'Verifica tu correo electrónico para completar la activación de la cuenta.',
// Activar
'emailActivateTitle' => 'Activación de correo electrónico',
'emailActivateBody' => 'Acabamos de enviarte un correo electrónico con un código para confirmar tu dirección de correo electrónico. Copia ese código y pégalo a continuación.',
'emailActivateSubject' => 'Tu código de activación',
'emailActivateMailBody' => 'Utiliza el código siguiente para activar tu cuenta y comenzar a usar el sitio.',
'invalidActivateToken' => 'El código era incorrecto.',
'needActivate' => 'Debes completar tu registro confirmando el código enviado a tu dirección de correo electrónico.',
'activationBlocked' => 'Debes activar tu cuenta antes de iniciar sesión.',
// Grupos
'unknownGroup' => '{0} no es un grupo válido.',
'missingTitle' => 'Los grupos deben tener un título.',
// Permisos
'unknownPermission' => '{0} no es un permiso válido.',
];

View File

@ -1,24 +1,26 @@
{
"name": "codeigniter4/appstarter",
"type": "project",
"description": "CodeIgniter4 starter app",
"homepage": "https://codeigniter.com",
"license": "MIT",
"type": "project",
"homepage": "https://codeigniter.com",
"support": {
"forum": "https://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
},
"require": {
"php": "^8.1",
"codeigniter4/framework": "^4.0",
"codeigniter4/shield": "^1.0",
"codeigniter4/framework": "^4",
"phpoffice/phpspreadsheet": "^1.18",
"dompdf/dompdf": "^2.0"
"dompdf/dompdf": "^2.0",
//"phpoffice/phpspreadsheet": "^1.18"
},
"require-dev": {
"fakerphp/faker": "^1.9",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^9.1"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
},
"autoload": {
"psr-4": {
"App\\": "app",
@ -33,12 +35,12 @@
"Tests\\Support\\": "tests/_support"
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"scripts": {
"test": "phpunit"
},
"support": {
"forum": "http://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
}
}