我想在ActiveAdmin的标题处添加link_to("Edit yout profile",edit_user(current_user))等链接.那可能吗 ?!
当我尝试在我的symfony项目上运行phpunit时,我遇到以下错误:
$ phpunit -c app
1) [...]\DefaultControllerTest::testIndex
Symfony\Component\Config\Exception\FileLoaderLoadException: Cannot import resource "/srv/http/typeform/app/config/config.yml" from "/srv/http/typeform/app/config/config_dev.yml".
/srv/http/typeform/vendor/symfony/src/Symfony/Component/Config/Loader/FileLoader.php:89
[...]
/srv/http/typeform/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php:39
/srv/http/typeform/src/QuickyForm/PublicBundle/Tests/Controller/DefaultControllerTest.php:11
Caused by
Symfony\Component\Yaml\Exception\ParseException: You cannot define a mapping item when in a sequence in "\/srv\/http\/typeform\/app\/config\/config.yml"
/usr/share/pear/Symfony/Component/Yaml/Parser.php:116
[...]
/srv/http/typeform/app/bootstrap.php.cache:520
/srv/http/typeform/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php:39
/srv/http/typeform/src/QuickyForm/PublicBundle/Tests/Controller/DefaultControllerTest.php:11
Run Code Online (Sandbox Code Playgroud)
我打电话时似乎崩溃了 static::createClient();
这是我的config_test.yml
imports:
- { resource: config_dev.yml }
Run Code Online (Sandbox Code Playgroud) 我在匹配 golang 使用的 DSN 时遇到问题。所以我有两个应用程序(golang 和 php)使用相同的配置文件,并且该配置文件使用 golang dsn 格式声明 DSN,我的想法是解析该 dsn 并将其使用到 PHP 的代码中。对正确的正则表达式有任何帮助吗?谢谢!