bramus / bramus/router

Show if class or method does not exists

Open
#185 5 comments 0 reactions 0 assignees View on GitHub
feature request good first issue
Dominant language
PHP
Stars
1.1k
Forks
236
PR merge metrics
No merged PRs in 30d

Description

I'm Using the Router and extending it in my own class in order to change some methods and update the router without loosing changes. The invoke() method is private and I need to catch if no Class or method exists and return it.
I found that there is a catch of The ReflectionException in invoke() method, and I think that's exactly what I need but it's a private and I cannot override it. Is there another way to return message that a class or method does not exists, because now it shows an white screen, when the name of the class or method is wrong.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the Router's private invoke() method and the existing ReflectionException handling mentioned in the issue. Reproduce the white screen with an invalid class or method name, then determine the expected returned error message or response. Done means both missing classes and missing methods produce a visible, defined result without requiring an override of invoke().

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.