-
Notifications
You must be signed in to change notification settings - Fork 43
Removed config keys for <table>Plugin Now use the standard dot notation. #20
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
|
Great... I'll look at this tomorrow... It seems legit, I did not create a pivotTable value for tests :) @bravo-kernel Happy exceptions :) |
|
Wow, doesn't that look way cleaner and easier? |
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.
Did you remove the autodetect here? In case no config is provided? Should we?
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 personally prefer the exception and less magic,
|
I'copy/paste the discussion with @bravo-kernel wich bring me here: TL;DR; we get rid of autoconfig and throw an exception if the pivot table is missing, so we don't even need to parse the table name for a plugin in it. |
|
@mtancoigne could you please try to prevent pasting personal info into public resource? Final question about this PR; does this work for namespaced plugins as well? E.g. MyCorp\Plugin.TableClass? |
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.
This message make me think the table does not exist (in the database). Maybe change it to something like below, would make it consistent with the other feedback as well.
Invalid TinyAuthorize MultiRole Setup (no pivot table found in Configure)
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.
Sorry for the paste...
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 agree. But since we have that logic here why do we not use conventions to find it? The error will then come from the orm and will say exaxtly what it said so far.
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.
@dereuromark I guess it's a preference thing. I always appreciate being informed about the root cause as concrete as possible and this would point me straight to Tiny's config but I can live with the ORM exception as well. Your plugin... your call
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.
Since its cached performance is not an issue :)
I like convention driven. But maybe later
As I can't make the tests yet, let's Travis do this...