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

Refinements to Autoloader #3589

Merged
merged 1 commit into from Sep 3, 2020
Merged

Refinements to Autoloader #3589

merged 1 commit into from Sep 3, 2020

Conversation

paulbalandan
Copy link
Member

Description
Mini refinements

  • Ensure paths have correct ending directory separators.
  • When removing namespaces, ensure the namespace is set.
  • Add more tests to Autoloader and remove redundant test

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@@ -100,11 +103,11 @@ class Autoloader
* the valid parts that we'll need.
*
* @param \Config\Autoload $config
* @param \Config\Modules $moduleConfig
* @param \Config\Modules $modules
Copy link
Member

Choose a reason for hiding this comment

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

@param Modules $modules can be used, no longer require fqcn

Copy link
Member Author

Choose a reason for hiding this comment

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

My preference has always been FQCN for phpdocs since that will help my IDE in resolving names. If others would want short class names, I'll oblige.

Copy link
Member

Choose a reason for hiding this comment

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

I have no preferences in that matter. But maybe we should standardize it somehow in the codebase.

Copy link
Member

Choose a reason for hiding this comment

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

I prefer to use the shortname for anything that has a use statement, but I don't use an IDE so it doesn't actually have negative consequences. I will say that PHPStan accepts the shortname.

@michalsn michalsn merged commit a945003 into codeigniter4:develop Sep 3, 2020
@paulbalandan paulbalandan deleted the autoloader-refine branch September 3, 2020 17:24
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.

None yet

4 participants