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

Make Composer scan all files in src/ #646

Closed
wants to merge 1 commit into from

Conversation

szepeviktor
Copy link
Contributor

What are the main changes in this PR?

Simplify Composer autoloader's configuration.

@JoosuaKoskinen

Big win! 🎉

Comment on lines -825 to -829
"php": "^5.6 || ^7.0 || ^8.0",
"ext-curl": "*",
"ext-fileinfo": "*",
"ext-json": "*",
"ext-zlib": "*"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know where it came from...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ext- ones can be removed for sure. They were added because of a linter nag but they caused more problems than solved.

Copy link
Contributor

@JoosuaKoskinen JoosuaKoskinen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Autoloading everything under src/ is something I want to do soon but I don't think the codebase is ready for that yet. We still have some files left which can't be autoloaded like:

Comment on lines -825 to -829
"php": "^5.6 || ^7.0 || ^8.0",
"ext-curl": "*",
"ext-fileinfo": "*",
"ext-json": "*",
"ext-zlib": "*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ext- ones can be removed for sure. They were added because of a linter nag but they caused more problems than solved.

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Oct 15, 2021

We still have some files left which can't be autoloaded

With classmap mechanism Composer autoloads only files with classes.
And only when instantiated/called!! Not like require.

@szepeviktor szepeviktor closed this Aug 6, 2024
@szepeviktor szepeviktor deleted the composer-autoloader branch August 6, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants