Skip to content
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

Merged
merged 14 commits into from
Jul 19, 2024
Merged

Conversation

SenseException
Copy link
Member

This is a bigger one to handle.

Copy link
Member Author

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

Copy link
Member Author

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

* @param string[] $keywords
*/
public function __construct(
#[ORM\OneToOne(targetEntity: ProjectStats::class, fetch: 'EAGER')]
Copy link
Member Author

@SenseException SenseException Jul 9, 2024

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).

return;
}

self::markTestSkipped('This test requires ./bin/console build-website to have been ran.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.');

Copy link
Member Author

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');
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

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 🤔

Copy link
Member

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.

@SenseException SenseException merged commit d37cb5b into master Jul 19, 2024
8 checks passed
@SenseException SenseException deleted the projects-orm branch July 19, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants