FIX BASE_PATH fallback assumed wrong file location #9977
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The file was moved back in 2017 with 3873e4b#diff-8ce3f007bef0668c2c08320160362229abce9614025dc2a5b729d1b2b56ed3f7,
but the logic wasn't updated. That wasn't apparent since the fallback usually doesn't need to be triggered.
Whenever constants.php is included through the standard composer autoload, the debug_backtrace() logic took priority.
This is an important piece for using CoreKernel directly to boot Silverstripe,
which I'm currently attempting through a composer plugin (so a different autoloading path).
https://github.com/silverstripe/silverstripe-graphql-composer-plugin, context at silverstripe/silverstripe-graphql#388
PR against minor release branch because its a bugfix, and we might rely on this being present in a 4.8.1 release for the composer graphql plugin rollout to early adopters.