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

!!![TASK] Remove all services from render context #645

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

jaapio
Copy link
Member

@jaapio jaapio commented Oct 30, 2023

The render context should be a service less object only containing the context of the current rendered project/document. This reduces the ways we are generating urls and makes the creation of the object less complex.

@jaapio jaapio requested a review from linawolf October 30, 2023 22:14
@jaapio jaapio force-pushed the task/serviceless-context branch from 60952ef to 6ec95ae Compare October 30, 2023 22:18
@@ -27,6 +27,6 @@ public function getContext(): RenderContext

public function getFileDestination(): string
{
return $this->renderContext->getCurrentFileDestination();
return $this->renderContext->getDestinationPath() . '/' . $this->renderContext->getCurrentFileName() . '.' . $this->renderContext->getOutputFormat();
Copy link
Contributor

Choose a reason for hiding this comment

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

I would use sprintf here

The render context should be a service less object only containing
the context of the current rendered project/document. This
reduces the ways we are generating urls and makes the creation of
the object less complex.
@jaapio jaapio force-pushed the task/serviceless-context branch from 6ec95ae to 98eca7c Compare October 31, 2023 14:39
@jaapio jaapio enabled auto-merge October 31, 2023 14:39
@jaapio jaapio merged commit 5aa985a into main Oct 31, 2023
24 checks passed
@jaapio jaapio deleted the task/serviceless-context branch October 31, 2023 14:42
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