Routing preview / discussion

After multiple attempts building a router from ground up I have decided that it could be a waste of time at the moment so it was decided to implement an abstraction and a test adapter based on FastRoute.

Here’s what router looks like: https://github.com/yiisoft/router
And there’s FastRoute adapter: https://github.com/yiisoft/router-fastroute

Later we can get back to implementing our own router.

6 Likes

It looks like FastRoute came from Nikita Popov who is a bit of a star in the PHP community. He just started working for Jetbrains as well so some good pedigree :slight_smile:

Yes. He gave a talk last week at PHP Russia I’ve organized. That’s partially why such choice of first adapter to implement was made :slight_smile:

In its current form the API for defining routes is very minimal. We can extend it with groups, intermediate middleware stacks and more later.

It really looks like huge regression when we compare this with Yii 2 URL Manager. Were there any specific problems with migration of Yii 2 router to Yii 3, or just lack of time?

1 Like

Lack of time mainly.

And it would not be good to ask for help from the Yii community, many of us can help, i could make a to-do list of things that need to be done.

4 Likes

If you want to help that’s great. You can use issues at https://github.com/yiisoft/router for planning and we can do it together. Contact me at slack / telegram (samdark there).