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: Helpers at non-default locations are not found #3026

Closed
JanZelenka opened this issue May 20, 2020 · 2 comments
Closed

Bug: Helpers at non-default locations are not found #3026

JanZelenka opened this issue May 20, 2020 · 2 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@JanZelenka
Copy link

I have a namespace: App\Libraries\FileMaker
at a corresponding location on the disc.
I also have a subfolder Helpers at that location with the file filemaker_helper.php in it.

According to the documentation the correct way to load this helper is: helper('App\Library\FileMaker\filemaker').
Unfortunatelly that doesn't work. The autoloader stops searching through the namespace segments once it matches the first one with the App namespace and attaches the Helpers segment followed by the rest of the namespace:
...app\Helpers\Library\FileMaker\filemaker_helper.php

Version: 4.0.3.
Affected module: Custom Helpers

@JanZelenka JanZelenka added the bug Verified issues on the current code behavior or pull requests that will fix them label May 20, 2020
@InsiteFX
Copy link
Contributor

Helpers should go into folder helpers if use with app

otherwise modules should have there own helpers folder.

@JanZelenka
Copy link
Author

I see. Of course, thanks for clarifying this. I need to declare my FileMaker namespace outside the App namespace...

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