-
Notifications
You must be signed in to change notification settings - Fork 63
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
Replace skeleton mapper with orm for Projects #592
Conversation
lib/DataSources/Projects.php
Outdated
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 is the code from lib/DataBuilder/ProjectDataBuilder.php
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.
A lot was taken from lib/Hydrators/ProjectHydrator.php
lib/Model/Project.php
Outdated
* @param string[] $keywords | ||
*/ | ||
public function __construct( | ||
#[ORM\OneToOne(targetEntity: ProjectStats::class, fetch: 'EAGER')] |
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 chose EAGER
in all entities because every piece of data is always used in the website build and I didn't experienced a decrease in speed. Maybe the measured build time in GitHub workflows can be compared with the ones from develop
from earlier PRs (if needed).
869c12b
to
dbf34aa
Compare
Empty arrays are stored as null
Once hydrators are gone, this ignored error can be removed again
dbf34aa
to
2daaf03
Compare
return; | ||
} | ||
|
||
self::markTestSkipped('This test requires ./bin/console build-website to have been ran.'); |
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.
self::markTestSkipped('This test requires ./bin/console build-website to have been ran.'); | |
self::markTestSkipped('This test requires ./bin/console build-website to have been run.'); |
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've also fixed the other occurrence where I copied the code from
|
||
$this->projectGitSyncer->expects(self::any()) | ||
->method('checkoutDefaultBranch') | ||
->with('orm'); |
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.
Does this expectation actually expect anything? In other words, when could it fail?
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 took the code from lib/DataBuilder/ProjectDataBuilder.php
and with it also the old tests. I should review the test and make some useful expectations.
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.
Commit b05d808e4373c3eb29b6c756d5d1c9a780f78f4a does fix the expected number of calls, but it doesn't appear in the PR 🤔
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 see it just fine.
This is a bigger one to handle.