Skip to content

Static pages#9

Open
OStefan2001 wants to merge 3 commits into
developfrom
stefan-dev
Open

Static pages#9
OStefan2001 wants to merge 3 commits into
developfrom
stefan-dev

Conversation

@OStefan2001

Copy link
Copy Markdown
Collaborator

Static pages and generic route

Comment thread src/App/templates/layout/default.html.twig Outdated
Comment thread src/App/templates/layout/default.html.twig Outdated
Comment thread src/App/templates/partial/left-menu.html.twig Outdated
Comment thread src/Blog/src/Handler/GetStaticPageDataHandler.php Outdated
Comment thread src/Blog/src/Handler/GetStaticPageDataHandler.php Outdated
Comment thread src/Blog/src/RoutesDelegator.php Outdated
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 31.81818% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 23.48%. Comparing base (4c7648f) to head (dc53f53).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/Blog/src/Repository/PostRepository.php 0.00% 9 Missing ⚠️
src/Page/src/Factory/GetPageViewHandlerFactory.php 0.00% 4 Missing ⚠️
...rc/Blog/src/Handler/GetCategoryResourceHandler.php 0.00% 1 Missing ⚠️
src/Blog/src/Handler/GetPostResourceHandler.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop       #9      +/-   ##
=============================================
+ Coverage      23.32%   23.48%   +0.16%     
- Complexity       174      175       +1     
=============================================
  Files             43       43              
  Lines            759      775      +16     
=============================================
+ Hits             177      182       +5     
- Misses           582      593      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexmerlin alexmerlin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any route that's using these templates:

  • src/Blog/templates/page/contact.html.twig
  • src/Blog/templates/page/dotkernel-packages-oss-lifecycle.html.twig
    I can't find them.


private function notFound(?string $categorySlug): HtmlResponse
{
$categories = $this->categoryRepository->getCategories();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Another database fetch duplication here - please fix.

Comment on lines 29 to 31
if (! $category) {
return new HtmlResponse('Category not found', 404);
return new HtmlResponse('Category not found', StatusCodeInterface::STATUS_NOT_FOUND);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just asking (if you have specs telling otherwise, you don't need to change anything).

Wouldn't it be better to apply here the same logic that you did in the post handler?
I mean: if the category was not found, then show the 404 Not Found page with other category/post suggestions?

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