Skip to content

Commit

Permalink
Merge pull request #8534 from kenjis/fix-spark-not-work-in-prod
Browse files Browse the repository at this point in the history
[4.5] fix: spark does not work with composer install --no-dev
  • Loading branch information
kenjis authored Feb 14, 2024
2 parents 01e1a46 + 1cd4cd9 commit b41ac31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions system/Commands/Generators/TestGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ public function run(array $params)
$this->template = 'test.tpl.php';

$this->classNameLang = 'CLI.generator.className.test';

$autoload = Services::autoloader();
$autoload->addNamespace('CodeIgniter', TESTPATH . 'system');
$autoload->addNamespace('Tests', ROOTPATH . 'tests');

$this->generateClass($params);
}

Expand Down
3 changes: 1 addition & 2 deletions system/Config/AutoloadConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ class AutoloadConfig
* @var array<string, string>
*/
protected $corePsr4 = [
'CodeIgniter' => [SYSTEMPATH, TESTPATH . 'system'],
'CodeIgniter' => SYSTEMPATH,
'Config' => APPPATH . 'Config',
'Tests' => ROOTPATH . 'tests',
];

/**
Expand Down
2 changes: 0 additions & 2 deletions tests/system/Commands/Utilities/NamespacesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ public function testNamespacesCommandCodeIgniterOnly(): void
| Namespace | Path | Found? |
+---------------+-------------------------+--------+
| CodeIgniter | ROOTPATH/system | Yes |
| CodeIgniter | ROOTPATH/tests/system | Yes |
| Config | APPPATH/Config | Yes |
| Tests | ROOTPATH/tests | Yes |
| App | ROOTPATH/app | Yes |
| Tests\Support | ROOTPATH/tests/_support | Yes |
+---------------+-------------------------+--------+
Expand Down

0 comments on commit b41ac31

Please sign in to comment.