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

Bug: cannot run PHPUnit testing in CI 4.5.1 appstarter #8946

Closed
kenjis opened this issue Jun 10, 2024 · 5 comments
Closed

Bug: cannot run PHPUnit testing in CI 4.5.1 appstarter #8946

kenjis opened this issue Jun 10, 2024 · 5 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@kenjis
Copy link
Member

kenjis commented Jun 10, 2024

PHP Version

8.1

CodeIgniter4 Version

4.5.1

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

cli-server (PHP built-in webserver)

Database

n/a

What happened?

Cannot run phpunit.

Steps to Reproduce

$ composer create-project codeigniter4/appstarter ci451
Creating a "codeigniter4/appstarter" project at "./ci451"
Installing codeigniter4/appstarter (v4.5.1)
  - Installing codeigniter4/appstarter (v4.5.1): Extracting archive
Created project in /home/kenji/tmp/ci451
Loading composer repositories with package information
Updating dependencies
Lock file operations: 33 installs, 0 updates, 0 removals
  - Locking codeigniter4/framework (v4.5.1)
  - Locking fakerphp/faker (v1.23.1)
  - Locking laminas/laminas-escaper (2.13.0)
  - Locking mikey179/vfsstream (v1.6.11)
  - Locking myclabs/deep-copy (1.11.1)
  - Locking nikic/php-parser (v5.0.2)
  - Locking phar-io/manifest (2.0.4)
  - Locking phar-io/version (3.2.1)
  - Locking phpunit/php-code-coverage (10.1.14)
  - Locking phpunit/php-file-iterator (4.1.0)
  - Locking phpunit/php-invoker (4.0.0)
  - Locking phpunit/php-text-template (3.0.1)
  - Locking phpunit/php-timer (6.0.0)
  - Locking phpunit/phpunit (10.5.20)
  - Locking psr/container (2.0.2)
  - Locking psr/log (3.0.0)
  - Locking sebastian/cli-parser (2.0.1)
  - Locking sebastian/code-unit (2.0.0)
  - Locking sebastian/code-unit-reverse-lookup (3.0.0)
  - Locking sebastian/comparator (5.0.1)
  - Locking sebastian/complexity (3.2.0)
  - Locking sebastian/diff (5.1.1)
  - Locking sebastian/environment (6.1.0)
  - Locking sebastian/exporter (5.1.2)
  - Locking sebastian/global-state (6.0.2)
  - Locking sebastian/lines-of-code (2.0.2)
  - Locking sebastian/object-enumerator (5.0.0)
  - Locking sebastian/object-reflector (3.0.0)
  - Locking sebastian/recursion-context (5.0.0)
  - Locking sebastian/type (4.0.0)
  - Locking sebastian/version (4.0.1)
  - Locking symfony/deprecation-contracts (v3.5.0)
  - Locking theseer/tokenizer (1.2.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 33 installs, 0 updates, 0 removals
  - Installing psr/log (3.0.0): Extracting archive
  - Installing laminas/laminas-escaper (2.13.0): Extracting archive
  - Installing codeigniter4/framework (v4.5.1): Extracting archive
  - Installing symfony/deprecation-contracts (v3.5.0): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing fakerphp/faker (v1.23.1): Extracting archive
  - Installing mikey179/vfsstream (v1.6.11): Extracting archive
  - Installing sebastian/version (4.0.1): Extracting archive
  - Installing sebastian/type (4.0.0): Extracting archive
  - Installing sebastian/recursion-context (5.0.0): Extracting archive
  - Installing sebastian/object-reflector (3.0.0): Extracting archive
  - Installing sebastian/object-enumerator (5.0.0): Extracting archive
  - Installing sebastian/global-state (6.0.2): Extracting archive
  - Installing sebastian/exporter (5.1.2): Extracting archive
  - Installing sebastian/environment (6.1.0): Extracting archive
  - Installing sebastian/diff (5.1.1): Extracting archive
  - Installing sebastian/comparator (5.0.1): Extracting archive
  - Installing sebastian/code-unit (2.0.0): Extracting archive
  - Installing sebastian/cli-parser (2.0.1): Extracting archive
  - Installing phpunit/php-timer (6.0.0): Extracting archive
  - Installing phpunit/php-text-template (3.0.1): Extracting archive
  - Installing phpunit/php-invoker (4.0.0): Extracting archive
  - Installing phpunit/php-file-iterator (4.1.0): Extracting archive
  - Installing theseer/tokenizer (1.2.3): Extracting archive
  - Installing nikic/php-parser (v5.0.2): Extracting archive
  - Installing sebastian/lines-of-code (2.0.2): Extracting archive
  - Installing sebastian/complexity (3.2.0): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (3.0.0): Extracting archive
  - Installing phpunit/php-code-coverage (10.1.14): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.4): Extracting archive
  - Installing myclabs/deep-copy (1.11.1): Extracting archive
  - Installing phpunit/phpunit (10.5.20): Extracting archive
11 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
26 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
$ cd ci451/
$ composer test
> phpunit
PHPUnit 10.5.20 by Sebastian Bergmann and contributors.

Cannot open bootstrap script "/home/kenji/tmp/ci451/system/Test/bootstrap.php"
Script phpunit handling the test event returned with error code 2

Expected Output

No error.

Anything else?

No response

@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Jun 10, 2024
@kenjis
Copy link
Member Author

kenjis commented Jun 10, 2024

I do not know why this defect exists, as it should have been verified to pass testing at the time of release.
The fix #8785 is not released yet.

@neznaika0
Copy link
Contributor

The XML seems to be copied from the codeigniter 4 dev branch. It works because there is a folder ./system

@kenjis
Copy link
Member Author

kenjis commented Jun 10, 2024

@neznaika0 I remember now. There was the bug, but the fix #8785 is not yet released.
The file is copied from
https://github.com/codeigniter4/CodeIgniter4/blob/master/admin/starter/phpunit.xml.dist#L5

@neznaika0
Copy link
Contributor

Okay, I didn't check the history either.

Directed by Robert B. Weide

@kenjis
Copy link
Member Author

kenjis commented Jun 10, 2024

Closed by v4.5.2.

@kenjis kenjis closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

2 participants