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

Remove file and index getters and setters from project #3482

Merged
merged 4 commits into from Mar 20, 2023

Conversation

mvriel
Copy link
Member

@mvriel mvriel commented Mar 18, 2023

In this change, I have begun the effort of moving stuff out of the ProjectDescriptor that doesn't belong there into the DocumentationSetDescriptors. This also means Project references might be deleted from some services in favour of this one.

This doesn't yet replace the getFiles and getIndexes calls because these are used in a lot of files and warrants a separate PR

This is probably the most lowhanging fruit because files and
indexes are not set using the main setter, but mostly by getting the
collection and adding onto that.
);
foreach ($project->getVersions() as $version) {
$apiSets = $version->getDocumentationSets()->filter(ApiSetDescriptor::class);
foreach ($apiSets as $apiSet) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Just to clarify, using multiple documentation sets would still not work because it is not fully supported when it comes to linking and even writing to the correct folder; but this will ensure the documentation set is propagated throughout the chain, which allowed me to remove findElement from the Project

@mvriel mvriel marked this pull request as ready for review March 19, 2023 09:32
@jaapio jaapio merged commit 50cb8d2 into master Mar 20, 2023
57 checks passed
@jaapio jaapio deleted the remove-file-and-index-getters-and-setters-from-project branch March 20, 2023 08:11
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.

None yet

2 participants