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: Composer autoload.psr4 #8569

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Feb 22, 2024

Description
Follow-up #8005

  • remove Config\\ from autoload.psr4

If we use this repository from appstarter, the Config files in app/Config/ in this repository are loaded first.

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

If we use this repository from appstarter, the Config files in
app/Config/ in this repository are loaded first.
@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them 4.5 labels Feb 22, 2024
@kenjis
Copy link
Member Author

kenjis commented Mar 5, 2024

This is a bug fix in 4.5. Please review.

@lonnieezell
Copy link
Member

How does this affect those that do manual installs and don't use Composer?

@kenjis
Copy link
Member Author

kenjis commented Mar 5, 2024

See composer.json in develop below. It is the same as this PR.

"autoload": {
"psr-4": {
"CodeIgniter\\": "system/"
},
"exclude-from-classmap": [
"**/Database/Migrations/**"
]
},

and the namespace CodeIgniter and Config are registered in AutoloadConfig. So they work without Composer autoloader.

protected $corePsr4 = [
'CodeIgniter' => SYSTEMPATH,
'Config' => APPPATH . 'Config',
];

@kenjis kenjis merged commit 8c91b0d into codeigniter4:4.5 Mar 25, 2024
43 checks passed
@kenjis kenjis deleted the fix-composer-autoload-psr-4 branch March 25, 2024 23:14
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