Skip to content
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

[4.5] fix: spark does not work with composer install --no-dev #8534

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Feb 10, 2024

Description
Follow-up #8388

$ composer install --no-dev
$ ./spark
[Error]
Class "PHPUnit\Framework\TestCase" not found
at SYSTEMPATH/Test/CIUnitTestCase.php:40

Backtrace:
  1    VENDORPATH/composer/ClassLoader.php:576
       include()

  2    VENDORPATH/composer/ClassLoader.php:427
       Composer\Autoload\{closure}('/Users/kenji/work/codeigniter/official/CodeIgniter4-4.5/vendor/composer/../../system/Test/CIUnitTestCase.php')

  3    ROOTPATH/tests/system/Commands/BaseCommandTest.php:26
       Composer\Autoload\ClassLoader()->loadClass('CodeIgniter\\Test\\CIUnitTestCase')

  4    SYSTEMPATH/Autoloader/Autoloader.php:310
       include_once('/Users/kenji/work/codeigniter/official/CodeIgniter4-4.5/tests/system/Commands/BaseCommandTest.php')

  5    SYSTEMPATH/Autoloader/Autoloader.php:289
       CodeIgniter\Autoloader\Autoloader()->includeFile('/Users/kenji/work/codeigniter/official/CodeIgniter4-4.5/tests/system/Commands/BaseCommandTest.php')

  6    SYSTEMPATH/Autoloader/Autoloader.php:267
       CodeIgniter\Autoloader\Autoloader()->loadInNamespace('Tests\\system\\Commands\\BaseCommandTest')

  7    [internal function]
       CodeIgniter\Autoloader\Autoloader()->loadClass('Tests\\system\\Commands\\BaseCommandTest')

  8    SYSTEMPATH/Autoloader/FileLocator.php:296
       class_exists('Tests\\system\\Commands\\BaseCommandTest')

  9    SYSTEMPATH/CLI/Commands.php:112
       CodeIgniter\Autoloader\FileLocator()->findQualifiedNameFromPath('/Users/kenji/work/codeigniter/official/CodeIgniter4-4.5/tests/system/Commands/BaseCommandTest.php')

 10    SYSTEMPATH/CLI/Commands.php:49
       CodeIgniter\CLI\Commands()->discoverCommands()

 11    SYSTEMPATH/Config/Services.php:176
       CodeIgniter\CLI\Commands()->__construct()

 12    SYSTEMPATH/Config/BaseService.php:261
       CodeIgniter\Config\Services::commands(false)

 13    SYSTEMPATH/Config/BaseService.php:202
       CodeIgniter\Config\BaseService::__callStatic('commands', [...])

 14    SYSTEMPATH/Config/Services.php:173
       CodeIgniter\Config\BaseService::getSharedInstance('commands')

 15    SYSTEMPATH/Config/BaseService.php:261
       CodeIgniter\Config\Services::commands()

 16    SYSTEMPATH/CLI/Console.php:43
       CodeIgniter\Config\BaseService::__callStatic('commands', [])

 17    ROOTPATH/spark:102
       CodeIgniter\CLI\Console()->run()

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them 4.5 labels Feb 10, 2024
[Error]
Class "PHPUnit\Framework\TestCase" not found
at SYSTEMPATH/Test/CIUnitTestCase.php:40

Backtrace:
  1    VENDORPATH/composer/ClassLoader.php:576
       include()

  2    VENDORPATH/composer/ClassLoader.php:427
       Composer\Autoload\{closure}('/Users/kenji/work/codeigniter/official/CodeIgniter4-4.5/vendor/composer/../../system/Test/CIUnitTestCase.php')

  3    ROOTPATH/tests/system/Commands/BaseCommandTest.php:26
       Composer\Autoload\ClassLoader()->loadClass('CodeIgniter\\Test\\CIUnitTestCase')

  4    SYSTEMPATH/Autoloader/Autoloader.php:310
       include_once('/Users/kenji/work/codeigniter/official/CodeIgniter4-4.5/tests/system/Commands/BaseCommandTest.php')

  5    SYSTEMPATH/Autoloader/Autoloader.php:289
       CodeIgniter\Autoloader\Autoloader()->includeFile('/Users/kenji/work/codeigniter/official/CodeIgniter4-4.5/tests/system/Commands/BaseCommandTest.php')

  6    SYSTEMPATH/Autoloader/Autoloader.php:267
       CodeIgniter\Autoloader\Autoloader()->loadInNamespace('Tests\\system\\Commands\\BaseCommandTest')

  7    [internal function]
       CodeIgniter\Autoloader\Autoloader()->loadClass('Tests\\system\\Commands\\BaseCommandTest')

  8    SYSTEMPATH/Autoloader/FileLocator.php:296
       class_exists('Tests\\system\\Commands\\BaseCommandTest')

  9    SYSTEMPATH/CLI/Commands.php:112
       CodeIgniter\Autoloader\FileLocator()->findQualifiedNameFromPath('/Users/kenji/work/codeigniter/official/CodeIgniter4-4.5/tests/system/Commands/BaseCommandTest.php')

 10    SYSTEMPATH/CLI/Commands.php:49
       CodeIgniter\CLI\Commands()->discoverCommands()

 11    SYSTEMPATH/Config/Services.php:176
       CodeIgniter\CLI\Commands()->__construct()

 12    SYSTEMPATH/Config/BaseService.php:261
       CodeIgniter\Config\Services::commands(false)

 13    SYSTEMPATH/Config/BaseService.php:202
       CodeIgniter\Config\BaseService::__callStatic('commands', [...])

 14    SYSTEMPATH/Config/Services.php:173
       CodeIgniter\Config\BaseService::getSharedInstance('commands')

 15    SYSTEMPATH/Config/BaseService.php:261
       CodeIgniter\Config\Services::commands()

 16    SYSTEMPATH/CLI/Console.php:43
       CodeIgniter\Config\BaseService::__callStatic('commands', [])

 17    ROOTPATH/spark:102
       CodeIgniter\CLI\Console()->run()
@kenjis kenjis merged commit b41ac31 into codeigniter4:4.5 Feb 14, 2024
46 checks passed
@kenjis kenjis deleted the fix-spark-not-work-in-prod branch February 14, 2024 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.5 bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants