小编Kri*_*dke的帖子

Symfony2中的系统(SonataAdminBundle)中缺少请求的PHP扩展intl

我尝试安装沙箱但是我从composer得到以下错误:

使用包信息加载composer存储库从锁定文件安装依赖项无法将您的需求解析为可安装的软件包集.

问题1

- Installation request for sonata-project/intl-bundle 2.1.0 -> satisfiable by sonata-project/intl-bundle 2.1.0.`

- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`
Run Code Online (Sandbox Code Playgroud)

问题2

- sonata-project/intl-bundle 2.1.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.`

- sonata-project/news-bundle 2.1.x-dev requires sonata-project/intl-bundle 2.1.* -> satisfiable by sonata-project/intl-bundle 2.1.0.
- Installation request for sonata-project/news-bundle 2.1.
Run Code Online (Sandbox Code Playgroud)

php intl symfony

12
推荐指数
4
解决办法
5万
查看次数

IntlDateFormatter :: format():datefmt_format:获取数组或整数时间戳值或DateTime对象(SonataSanBox)

我安装了SonataAdmin Bundle.一切正常,但是当我从仪表板添加任何用户时,它会抛出一个警告:

警告:IntlDateFormatter :: format():datefmt_format:在C:\ wamp\www\sonata-sandbox\vendor\symfony\symfony\src\Symfony\Component\Form \中获取数组或整数时间戳值或DateTime对象第260行的Extension\Core\Type\DateType.php

php intl symfony-sonata sonata-admin symfony-2.3

9
推荐指数
1
解决办法
1218
查看次数

如何使用Symfony2中的Swiftmailer将PDF附加到电子邮件中

我在symfony2中使用swiftmailer发送电子邮件,但我想将指定的PDF文件添加为电子邮件的文件附件.我该怎么办?

这是我目前的代码:

$message = \Swift_Message::newInstance()
    ->setSubject('Hello Email')
    ->setFrom('send@example.com')
    ->setTo('recipient@example.com')
    ->setBody(
        $this->renderView(
            'HelloBundle:Hello:email.txt.twig',
            array('name' => $name)
        )
    )
;
$this->get('mailer')->send($message);
Run Code Online (Sandbox Code Playgroud)

php email swiftmailer symfony

7
推荐指数
3
解决办法
1万
查看次数

URL包含点(.)时Symfony2出错

我使用Symfony 2.2.4,我拼命地生成URL(使用Twig).事实上,当我的网址加点时,我总是得到同样的错误.

例如: - 路线:"my_route" - 第一个参数:"id" - 第二个参数:"title"

在Twig:

{{ path("my_route", {"id" : 1984, "title" : "another...test"}) }}
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

在渲染模板期间抛出异常("参数"标题"路由"my_route"必须匹配"[^ /.] ++"("另一个...测试"给出)以生成相应的URL." )...

我试过Symfony 2.0.3,没有问题.

你有想法解决这个问题吗?

谢谢你的帮助.

最好的祝福

php url symfony twig

4
推荐指数
1
解决办法
3617
查看次数

安装后Symfony 2.8.1错误

我正在使用Symfony 2.8.1并使用WAMP Server 2,Apache 2.4.2和PHP 5.4.3Windows 8上工作 我已经使用命令工具成功安装了Symfony,但是当我尝试访问URL时http:// localhost /Symfony/web/app_dev.php/我收到此错误消息:

FatalErrorException in ProxyGenerator.php line 62: Parse Error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING)

然后是这个错误列表:

in ProxyGenerator.php line 62
at DebugClassLoader->loadClass() in EntityManager.php line 0
at ProxyFactory->__construct() in EntityManager.php line 166
at EntityManager->__construct() in EntityManager.php line 850
at EntityManager::create() in appDevDebugProjectContainer.php line 605
at appDevDebugProjectContainer->getDoctrine_Orm_DefaultEntityManagerService() in Container.php line 312
at Container->get() in classes.php line 6695
at ManagerRegistry->getService() in …
Run Code Online (Sandbox Code Playgroud)

php symfony

4
推荐指数
2
解决办法
7425
查看次数