Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into 4.5
Browse files Browse the repository at this point in the history
 Conflicts:
	system/Commands/Generators/MigrateCreate.php
	system/Commands/Generators/SessionMigrationGenerator.php
  • Loading branch information
kenjis committed Oct 28, 2023
2 parents 76edbf4 + 94e13a4 commit b3db566
Show file tree
Hide file tree
Showing 30 changed files with 54 additions and 109 deletions.
2 changes: 1 addition & 1 deletion env
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@
# CURLRequest
#--------------------------------------------------------------------

# curlrequest.shareOptions = true
# curlrequest.shareOptions = false
55 changes: 0 additions & 55 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,11 @@
'count' => 5,
'path' => __DIR__ . '/system/CodeIgniter.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\CodeIgniter\\:\\:\\$controller type has no signature specified for Closure\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/CodeIgniter.php',
];
$ignoreErrors[] = [
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/CreateDatabase.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\CreateDatabase\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/CreateDatabase.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\CreateDatabase\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/CreateDatabase.php',
];
$ignoreErrors[] = [
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
'count' => 1,
Expand All @@ -216,11 +201,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/MigrateStatus.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\MigrateStatus\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/MigrateStatus.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$params \\(array\\<string, mixed\\>\\) of method CodeIgniter\\\\Commands\\\\Database\\\\MigrateStatus\\:\\:run\\(\\) should be contravariant with parameter \\$params \\(array\\<int\\|string, string\\|null\\>\\) of method CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:run\\(\\)$#',
'count' => 1,
Expand All @@ -231,11 +211,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/Seed.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\Seed\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/Seed.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Commands\\\\Database\\\\ShowTableInfo\\:\\:showAllTables\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand All @@ -246,16 +221,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/ShowTableInfo.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\ShowTableInfo\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/ShowTableInfo.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Database\\\\ShowTableInfo\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Database/ShowTableInfo.php',
];
$ignoreErrors[] = [
'message' => '#^Accessing offset \'encryption\\.key\' directly on \\$_SERVER is discouraged\\.$#',
'count' => 1,
Expand Down Expand Up @@ -721,26 +686,11 @@
'count' => 3,
'path' => __DIR__ . '/system/Commands/Utilities/Environment.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Utilities\\\\Environment\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Utilities/Environment.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Utilities\\\\FilterCheck\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Utilities/FilterCheck.php',
];
$ignoreErrors[] = [
'message' => '#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Utilities/Namespaces.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Utilities\\\\Publish\\:\\:\\$arguments is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$arguments\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Utilities/Publish.php',
];
$ignoreErrors[] = [
'message' => '#^Accessing offset \'HTTP_HOST\' directly on \\$_SERVER is discouraged\\.$#',
'count' => 1,
Expand All @@ -761,11 +711,6 @@
'count' => 3,
'path' => __DIR__ . '/system/Commands/Utilities/Routes.php',
];
$ignoreErrors[] = [
'message' => '#^PHPDoc type array\\<string, string\\> of property CodeIgniter\\\\Commands\\\\Utilities\\\\Routes\\:\\:\\$options is not the same as PHPDoc type array of overridden property CodeIgniter\\\\CLI\\\\BaseCommand\\:\\:\\$options\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Commands/Utilities/Routes.php',
];
$ignoreErrors[] = [
'message' => '#^Implicit array creation is not allowed \\- variable \\$filters might not exist\\.$#',
'count' => 1,
Expand Down
20 changes: 10 additions & 10 deletions system/CLI/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
/**
* BaseCommand is the base class used in creating CLI commands.
*
* @property array $arguments
* @property Commands $commands
* @property string $description
* @property string $group
* @property LoggerInterface $logger
* @property string $name
* @property array $options
* @property string $usage
* @property array<string, string> $arguments
* @property Commands $commands
* @property string $description
* @property string $group
* @property LoggerInterface $logger
* @property string $name
* @property array<string, string> $options
* @property string $usage
*/
abstract class BaseCommand
{
Expand Down Expand Up @@ -62,14 +62,14 @@ abstract class BaseCommand
/**
* the Command's options description
*
* @var array
* @var array<string, string>
*/
protected $options = [];

/**
* the Command's Arguments description
*
* @var array
* @var array<string, string>
*/
protected $arguments = [];

Expand Down
2 changes: 1 addition & 1 deletion system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class CodeIgniter
/**
* Controller to use.
*
* @var Closure|string
* @var (Closure(mixed...): ResponseInterface|string)|string
*/
protected $controller;

Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Cache/ClearCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ClearCache extends BaseCommand
/**
* the Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'driver' => 'The cache driver to use',
Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Database/Migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Migrate extends BaseCommand
/**
* the Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'-n' => 'Set migration namespace',
Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Database/MigrateRefresh.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MigrateRefresh extends BaseCommand
/**
* the Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'-n' => 'Set migration namespace',
Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Database/MigrateRollback.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class MigrateRollback extends BaseCommand
/**
* the Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'-b' => 'Specify a batch to roll back to; e.g. "3" to return to batch #3',
Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Encryption/GenerateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class GenerateKey extends BaseCommand
/**
* The command's options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--force' => 'Force overwrite existing key in `.env` file.',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/CellGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CellGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The cell class name.',
Expand All @@ -61,7 +61,7 @@ class CellGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/CommandGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CommandGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The command class name.',
Expand All @@ -62,7 +62,7 @@ class CommandGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--command' => 'The command name. Default: "command:name"',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/ConfigGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ConfigGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The config class name.',
Expand All @@ -61,7 +61,7 @@ class ConfigGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/ControllerGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ControllerGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The controller class name.',
Expand All @@ -65,7 +65,7 @@ class ControllerGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--bare' => 'Extends from CodeIgniter\Controller instead of BaseController.',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/EntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class EntityGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The entity class name.',
Expand All @@ -61,7 +61,7 @@ class EntityGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/FilterGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class FilterGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The filter class name.',
Expand All @@ -61,7 +61,7 @@ class FilterGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/MigrationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class MigrationGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The migration class name.',
Expand All @@ -65,7 +65,7 @@ class MigrationGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--session' => 'Generates the migration file for database sessions.',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/ModelGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ModelGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The model class name.',
Expand All @@ -62,7 +62,7 @@ class ModelGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--table' => 'Supply a table name. Default: "the lowercased plural of the class name".',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/ScaffoldGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ScaffoldGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The class name',
Expand All @@ -62,7 +62,7 @@ class ScaffoldGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--bare' => 'Add the "--bare" option to controller component.',
Expand Down
4 changes: 2 additions & 2 deletions system/Commands/Generators/SeederGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SeederGenerator extends BaseCommand
/**
* The Command's Arguments
*
* @var array
* @var array<string, string>
*/
protected $arguments = [
'name' => 'The seeder class name.',
Expand All @@ -61,7 +61,7 @@ class SeederGenerator extends BaseCommand
/**
* The Command's Options
*
* @var array
* @var array<string, string>
*/
protected $options = [
'--namespace' => 'Set root namespace. Default: "APP_NAMESPACE".',
Expand Down
Loading

0 comments on commit b3db566

Please sign in to comment.