Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何将 Doctrine Entity Manager 注入 Symfony 4 服务
我有一个控制器 use Doctrine ORM EntityManagerInterface class ExampleController public function someFunction ExampleService inje
Symfony
doctrine
symfony4
Symfony 检查表单验证时两个字段中是否至少有一个不为空
我已经在脑子里思考这个问题有一段时间了 但仍然无法找到解决我的问题的方法 使用 Symfony 4 表单和约束 我无法设置一项检查来表明在提交包含子表单的表单时至少两个字段之一不能为空 我有一个预订实体 其中包含一个具有电话号码属性和电子邮
Forms
constraints
symfony4
Symfony 4 生产模式错误处理页面内存耗尽
我将我的项目设置为prod模式在 env除了自定义错误页面之外的所有内容似乎都有效 我将此作为我的 404 树枝模板 templates bundles TwigBundle Exception error404 html twig inc
php
Symfony
symfony4
“错误命令“encore”未找到。”在 Symfony 4 中运行“yarn run encore”时
我在 Symfony 4 2 项目中工作 并尝试使用 Bootstrap 主题 所以我需要编译 Sass 代码 我按照官方文档中给出的流程进行操作 该文档指示使用 webpack encore 但是根据文档使用它时我遇到了错误 这是指示该过
symfony4
yarnpkg
webpackencore
BrowserKit 组件不可用
当我尝试启动功能测试时出现错误 BrowserKit 组件不可用 php bin phpunit usr bin env php PHPUnit 6 5 14 by Sebastian Bergmann and contributors T
Phpunit
symfony4
functionaltesting
如何在 Api-Platform 中按链接属性过滤结果?
我有一个User实体和一个Organisation实体 存在关系ManyToOne之间Booking and User ORM ManyToOne targetEntity App Entity User inversedBy bookin
php
Symfony
doctrineorm
symfony4
apiplatformcom
如何使用来自数据库的值来定义 Twig 模板的全局变量?
我想为 twig 定义一个全局变量 可以从任何模板访问它 我可以在 symfony 中创建一个全局变量config packages twig yaml 但我需要它是从数据库获取的值 在 twig 的文档中 它说使用此代码 twig new
php
Symfony
Twig
symfony4
如何在 Symfony 4 表单的输入上添加占位符?
在我的 Symfony 4 表单中 我尝试为我的输入获取占位符 我尝试了以下操作 但收到错误消息 表明这是不允许的 有什么想法我还能如何实现这一目标吗 gt add firstname TextType class label gt Vor
html
symfony4
Symfony 4 通过用户名更改密码 - 电子邮件不能为空
介绍 我一直在尝试找出如何创建由用户名值控制的重置密码表单 错误 Path Message Invalid value Violation data email This value should not be blank null Con
php
Symfony
symfony4
Symfony 4. InheritanceType("JOINED") 和 ParamConverter。奇怪的现象
我已经定义了 CoreCase 类 ORM Entity repositoryClass App Repository CoreCaseRepository ORM InheritanceType JOINED ORM Discrimina
symfony4
Symfony 4:JWT 和 Behat 的测试数据库
我将 API Platform 2 1 与 Symfony 4 结合使用 并使用 LexikJWTAuthenticationBundle 进行身份验证 并使用 Behat 进行测试 我无法正确设置 这是到目前为止我的配置 Feature
symfony4
apiplatformcom
lexikjwtauthbundle
如何在 Symfony4 中将用户添加到 Sentry 以应对所有异常?
我将 Sentry 添加到我的项目中 但它不会添加某些事件的当前登录用户 我添加了一个事件订阅者 但我不确定我是否真的需要它 对于像 ArgumentCountError 这样的例外情况 一切正常 对于 NotFoundHttpExcept
symfony4
Sentry
如何在 DI 扩展类中加载、处理和使用 Yaml 配置文件中的自定义参数?
我正在尝试按照此处提供的文档在我的应用程序中导入 yaml 配置文件http symfony com doc current bundles extension html http symfony com doc current bundl
Symfony
yaml
symfony4
如何在 Symfony 4 中使用事件处理异常?
现在我正在尝试捕获这样的异常事件 try echo 1 0 catch Exception e subs new ExceptionSubscriber this gt dispatcher gt addSubscriber subs 我定
php
Symfony
Exception
symfony4
Docker 与 Symfony 4 - 无法看到文件更改
我正在为 Symfony 4 应用程序的开发环境开发 docker 映像 我正在构建它alpine php fpm and nginx 我已经配置了一个应用程序 但即使对于简单的 hello world 应用程序 性能也不是很好 700ms
Symfony
Docker
dockercompose
symfony4
dockervolume
hwi oauth 捆绑包和 Symfony 4.2:无法安装
我正在尝试使用 symfony 4 2 安装 HWI oauth 捆绑包 但它不起作用 我按照描述的步骤操作 https github com hwi HWIOAuthBundle blob master Resources doc 1 s
Symfony
OAuth
composerphp
symfony4
Symfony:这些消息对于给定的语言环境不可用,并且无法在后备语言环境中找到
我正在尝试使用 symfony 翻译 这是我的翻译 yml framework default locale en translator paths kernel project dir translations fallbacks en
Symfony
symfony4
symfony:如何设置不同环境的配置参数文件?
如何为每个环境设置不同的配置参数文件 目前参数在parameters yml两者都使用dev and prod环境 但我需要不同的参数才能在产品中部署我的应用程序 您可以将所有使用的参数放入dev环境在一个app config parame
Symfony
symfony28
symfony4
symfony34
如何让 Doctrine 正确处理 ENUM?
在一个应用程序中我有一个案例类表继承 https www doctrine project org projects doctrine orm en 2 6 reference inheritance mapping html class
enums
doctrineorm
doctrine
Migration
symfony4
Api-Platform:在 SF 4 中使用 Yaml 配置代替注释
我想在 Api Platform 中使用 YAML 而不是注释 我没有使用 Api Platform 发行版 而是将 api pack 添加到了现有的 Symfony Flex 项目中 composer req api 文档说 YAML 文
symfony4
apiplatformcom
1
2
3
»