flightphp / core

An extensible micro-framework for PHP
https://docs.flightphp.com
MIT License
2.61k stars 407 forks source link

fixed bug with grouped routes #539

Closed n0nag0n closed 5 months ago

n0nag0n commented 5 months ago

This fixes an issue where a grouped route such as the below fails.

Flight::group('/api', function($router) {
    Flight::route('', function() { echo 'Hi'; });
    // or
    Flight::route('GET|POST', function() { echo 'Hi'; });
});

If you navigate to /api this route should still work.

fadrian06 commented 5 months ago

Incomplete typing (Closure() ... | callable)

image

Complete typing (Closure() ...)

image