如果包含点,则找不到带有路径参数的 Symfony4 路由

Symfony4 Route not found with path param if contains a dot

如果我用这个 slug 导航到这条路线 (/client/example.com)

/**
 * @Route("/client/{url}")
*/

我收到这个错误

The requested resource "/client/example.com" was not found on this server.

我正在使用 php 内置服务器 php -S 127.0.0.1:8000 public/index.php

使用这种方法可以工作,但无法正确加载资产 php -S localhost:8000 public/index.php

编辑: 没有点就可以了。

php bin/console router:match /client/example.com
[OK] Route "client_show" matches

php bin/console router:match /client/example
[OK] Route "client_show" matches

正如 Lawrence Cherone 在评论中所说,它似乎不适用于内置 php 服务器,但它确实适用于 Symfony Recipes 中包含的 composer require server

php bin/console server:run