Skip to content

refactor: prepend Autoloader's own autoload functions - #10092

Closed
paulbalandan wants to merge 1 commit into
codeigniter4:developfrom
paulbalandan:prepend-autoloader
Closed

refactor: prepend Autoloader's own autoload functions#10092
paulbalandan wants to merge 1 commit into
codeigniter4:developfrom
paulbalandan:prepend-autoloader

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
Random tests fail haphazardly with cannot autoload CodeIgniter\CodeIgniter.

From this failing test details for DataCaster, it looks to me that composer's autoloader are in effect here.

Details

> vendor/bin/phpunit tests/system/DataCaster --colors=never --no-coverage --order-by=random --random-order-seed=1775670338

PHPUnit 11.5.55 by Sebastian Bergmann and contributors.

Runtime: PHP 8.5.4
Configuration: /home/runner/work/CodeIgniter4/CodeIgniter4/phpunit.xml.dist
Random Seed: 1775670338

E 1 / 1 (100%)

Time: 00:00.011, Memory: 12.00 MB

There was 1 error:

  1. CodeIgniter\DataCaster\DataCasterTest::testCastInvalidMethodException
    ErrorException: include(/home/runner/work/CodeIgniter4/CodeIgniter4/vendor/composer/../../system/CodeIgniter.php): Failed to open stream: No such file or directory

/home/runner/work/CodeIgniter4/CodeIgniter4/system/Test/Mock/MockCodeIgniter.php:18
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Test/CIUnitTestCase.php:519
/home/runner/work/CodeIgniter4/CodeIgniter4/system/Test/CIUnitTestCase.php:245

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

Execution order file: /home/runner/work/CodeIgniter4/CodeIgniter4/build/random-tests/random_test_order_176_DataCaster.txt
Failed test: CodeIgniter\DataCaster\DataCasterTest::testCastInvalidMethodException
Previous test: (none - failed test ran first)

Exit code: 1
Elapsed time: 176

I temporarily upped the run limit of random tests to 50 to see if there are still flaky tests.

Checklist:

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

@github-actionsgithub-actionsBot added the github_actions Pull requests that update Github_actions code label Apr 8, 2026
@michalsn

Copy link
Copy Markdown
Member

I was trying to dig into this "No such file or directory" problem, but without any luck.

@paulbalandan
paulbalandanforce-pushed the prepend-autoloader branch 5 times, most recently from 5ce5e65 to 802a45bCompareApril 9, 2026 09:30
@paulbalandanpaulbalandan added the refactor Pull requests that refactor code label Apr 9, 2026
@paulbalandan
paulbalandanforce-pushed the prepend-autoloader branch 4 times, most recently from bc74b38 to 3e2993dCompareApril 9, 2026 10:57
@github-actionsgithub-actionsBot added the stale Pull requests with conflicts label Apr 10, 2026
@github-actions

Copy link
Copy Markdown

👋 Hi, @paulbalandan!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@paulbalandanpaulbalandan removed the stale Pull requests with conflicts label Apr 10, 2026
@paulbalandan
paulbalandan deleted the prepend-autoloader branch April 10, 2026 13:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actionsPull requests that update Github_actions coderefactorPull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@paulbalandan@michalsn