-
Notifications
You must be signed in to change notification settings - Fork 100
Use internal table locator with fallback classes #1046
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
Conversation
src/Command/BakeCommand.php
Outdated
| parent::initialize(); | ||
| // Use our own table locator with fallback classes | ||
| $locator = new TableLocator(); | ||
| $locator->allowFallbackClass(true); |
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.
I wonder, could we check if there is already one locator defined that has fallback activated?
Then we could skip adding another one.
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.
We don't have a way to check unless I am missing something.
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.
nvm. I figured it out. Not ideal but it works for now.
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.
Yeah, this looks like the safest BC way once we remove it from the app skeleton.
|
Why the hacky try/catch and new instance creation instead of a single line |
|
If we remove the fallback in app skeleton, we might still have existing apps already declare it. |
|
How is simply resetting a flag, even if already set, an overall, instead of recreating a locator instance? |
|
Also replacing the existing locator instance with a new one would lose and customization/config. For e.g. one can set additional locations for the location using the |
|
Yeah there should be no replacement. Only adding if not there yet |
|
@ADmad you might have misread. It does not replace. |
These lines do replace the locator instance. All that needs to be done is toggle on the fallback behavior. |
|
Closing in favor of #1047 |
No description provided.