1
它拋出這個錯誤:FOSUserBundle如何擴展處理程序正確
Unrecognized option "handler" under "fos_user.registration.form"
而且文件是:
//services.yml
app.form.registration:
class: AppBundle\Form\AccomodationFrontSignUpType
tags:
- { name: form.type, alias: app_user_registration }
app.form.handler.registration:
class: AppBundle\Form\Handler\RegistrationFormHandler
arguments: ["@fos_user.registration.form", "@request", "@fos_user.user_manager", "@fos_user.mailer", "@fos_user.util.token_generator"]
scope: request
public: false
//config.yml
fos_user:
db_driver: orm
firewall_name: main
user_class: AppBundle\Entity\User
group:
group_class: AppBundle\Entity\Group
service:
mailer: swiftmailer.mailer.strato
from_email:
address: [email protected]
sender_name: myHomepage
registration:
form:
handler: app.form.handler.registration
type: app_user_registration
confirmation:
template: FOSUserBundle:Registration:email.txt.twig
enabled: true
歡迎任何幫助,感謝
是啊,這僅僅是個問題...爲什麼它會拋出「處理程序」爲無效 – jmunozco
處理程序它不是無效,該選項關鍵是 – zenith
太棒了,我不知道版本改變了......謝謝! – jmunozco