Skip to content

Serve favicon.ico from router#33

Merged
guibranco merged 1 commit into
mainfrom
guibranco-patch-1
Apr 16, 2026
Merged

Serve favicon.ico from router#33
guibranco merged 1 commit into
mainfrom
guibranco-patch-1

Conversation

@guibranco
Copy link
Copy Markdown
Owner

@guibranco guibranco commented Apr 16, 2026

📑 Description

Serve favicon.ico from router

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

☢️ Does this introduce a breaking change?

  • Yes
  • No

Summary by Sourcery

New Features:

  • Add routing to serve the favicon.ico file as a static asset from the public directory.

@guibranco guibranco enabled auto-merge (squash) April 16, 2026 23:41
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 16, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds router-level handling for GET /favicon.ico by serving a static favicon file from the public directory, similar to existing swagger and OpenAPI routes.

Sequence diagram for handling GET /favicon.ico in the router

sequenceDiagram
    actor Browser
    participant Router
    participant Filesystem

    Browser->>Router: handle(request GET /favicon.ico)
    Router->>Router: inspectMethodAndPath
    Router->>Filesystem: readFile(public/favicon.ico)
    Filesystem-->>Router: faviconBytes
    Router-->>Browser: Response 200 image/x-icon
Loading

File-Level Changes

Change Details Files
Serve favicon.ico via the HTTP router for GET /favicon.ico requests.
  • Add a conditional branch that matches GET requests whose path is exactly /favicon.ico
  • Return the result of serveFile pointing to ../../public/favicon.ico for matching requests
  • Set the Content-Type of the served favicon to image/x-icon, consistent with ICO files
src/Http/Router.php

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

Warning

Rate limit exceeded

@guibranco has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 34 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 33 minutes and 34 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 250b7da6-df9b-4581-8ad3-6f2b0dbaa61d

📥 Commits

Reviewing files that changed from the base of the PR and between 9254015 and dae4966.

📒 Files selected for processing (1)
  • src/Http/Router.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch guibranco-patch-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gstraccini gstraccini Bot added the ☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) label Apr 16, 2026
@github-actions
Copy link
Copy Markdown

🧪 Unit test summary

✅ All unit tests passed.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • There appears to be an extra leading space before the new favicon if statement, which makes its indentation inconsistent with the surrounding conditionals; aligning it will keep the control flow visually clear.
  • Consider extracting these static file routes (swagger-ui.html, favicon.ico, openapi.yaml) into a small helper or configuration map to avoid repeating the same serveFile pattern and make future additions easier.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- There appears to be an extra leading space before the new favicon `if` statement, which makes its indentation inconsistent with the surrounding conditionals; aligning it will keep the control flow visually clear.
- Consider extracting these static file routes (`swagger-ui.html`, `favicon.ico`, `openapi.yaml`) into a small helper or configuration map to avoid repeating the same `serveFile` pattern and make future additions easier.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@penify-dev
Copy link
Copy Markdown

penify-dev Bot commented Apr 16, 2026

Failed to generate code suggestions for PR

@github-actions
Copy link
Copy Markdown

🎲 Database migration dry run

✅ No new migrations — database is already up to date.

@github-actions
Copy link
Copy Markdown

🔌 Integration test summary

✅ All endpoint tests passed. WebSocket port confirmed open.

@guibranco guibranco merged commit 333ccdf into main Apr 16, 2026
13 checks passed
@guibranco guibranco deleted the guibranco-patch-1 branch April 16, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☑️ auto-merge Automatic merging of pull requests (gstraccini-bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant