-
Notifications
You must be signed in to change notification settings - Fork 13
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
Change order of autoload file import #25
Change order of autoload file import #25
Conversation
This is a revert of #19 and I'm not sure I see the logic in making it. As it stands (before this PR) is that the first location is not "outside the project" it's the project folder, the second location checked is the public folder (which is basically fallback logic in case you moved your index out of public and into the project root). Especially in master, where we're going to mandate the public folder, I think this change makes little sense and we should really just remove the check in the current directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per feedback
In 5.x we want to make public mandatory; Then we should ONLY check |
Looking at the code it doesn't seem we've enforced public dir yet. |
For context here:
In this case the folder above the project had had Side note: CWP 2 enforces the public webroot but it doesn't look like the cwp/cwp-recipe-core recipe does on its own. It should (I'll log a separate issue for this -> silverstripe/cwp-recipe-core#10). |
Ok suggested this at silverstripe/silverstripe-framework#8168 |
@robbieaverill because it's opt-in for framework 4.x you need to physically add the |
@robbieaverill we can fix the issue by checking that |
Right - |
Correct. You can only have it or not have it. I've already vehemently vetod the ability to soft-code the name of the folder. We hard-code it in many places, including composer plugins, which don't have the ability to read silverstripe config. |
This will ensure the autoload file is first searched for within the project itself, rather than outside of it.