-
Notifications
You must be signed in to change notification settings - Fork 21
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
Rework the model collector #540
Conversation
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.
Added some remarks that need to be resolved first.
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.
Added some more remarks influenced by #541
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.
@discordier @baumannsven I reviewed this pull request, added some unit tests to understand the behaviour and changes some implementations based on discussions with @discordier.
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.
Added some remarks.
Additionally, we discussed on Mumble that we want to have github actions in here before merging.
use ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\RootConditionInterface; | ||
use ContaoCommunityAlliance\DcGeneral\EnvironmentInterface; | ||
use ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException; | ||
use ContaoCommunityAlliance\DcGeneral\Test\TestCase; | ||
use Generator; | ||
use function func_get_args; |
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.
PSR-12 requires an empty line here to separate blocks what does the current style say?
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.
Fixed in 7826ab3
use ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\RootConditionInterface; | ||
use ContaoCommunityAlliance\DcGeneral\EnvironmentInterface; | ||
use ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException; | ||
use ContaoCommunityAlliance\DcGeneral\Test\TestCase; | ||
use Generator; | ||
use function func_get_args; | ||
use function var_dump; |
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.
Please remove the forgotten debug import.
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.
Fixed in 7826ab3
|
||
$collector = new ModelCollector($environment); | ||
|
||
$this->assertSame($expected, $collector->searchParentOfIn($model, $candidates)); |
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.
Please call static method via self::assertSame()
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.
Fixed in 7826ab3
); | ||
|
||
$collector = new ModelCollector($environment); | ||
$this->assertSame($expected, $collector->searchParentOfIn($model, $grandParents)); |
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.
Please call static method via self::assertSame()
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.
Fixed in 7826ab3
); | ||
|
||
$collector = new ModelCollector($environment); | ||
$this->assertSame($expected, $collector->searchParentOf($model)); |
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.
Please call static method via self::assertSame()
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.
Fixed in 7826ab3
- Allow the hierarchical has a parent data provider - Add new method for search the parent model from a hierarchical model - Add the missing search over the configured inverse filter
…scribe the purpose
Enables Github Actions and removes obsolete .travis.yml
As discussed with @baumannsven it's unclear if it's really required for #541
d7b4ed8
to
ba51701
Compare
As discussed with @discordier I do not limit |
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.
tested in MM 2.2 - works fine
I can delete attributes without error.
@dmolineus @discordier @zonky2 How is the state of this PR? |
wie schon geschrieben: @dmolineus ist fertig, @zonky2 hat Livetest gemacht und Anmerkungen von @discordier wurden eingepflegt... |
Rework the model collector.