指尖上的记忆指尖上的记忆
首页
  • 基础
  • Laravel框架
  • Symfony框架
  • 基础
  • Gin框架
  • 基础
  • Spring框架
  • 命令
  • Nginx
  • Ai
  • Deploy
  • Docker
  • K8s
  • Micro
  • RabbitMQ
  • Mysql
  • PostgreSsql
  • Redis
  • MongoDb
  • Html
  • Js
  • 前端
  • 后端
  • Git
  • 知识扫盲
  • Golang
🌟 gitHub
首页
  • 基础
  • Laravel框架
  • Symfony框架
  • 基础
  • Gin框架
  • 基础
  • Spring框架
  • 命令
  • Nginx
  • Ai
  • Deploy
  • Docker
  • K8s
  • Micro
  • RabbitMQ
  • Mysql
  • PostgreSsql
  • Redis
  • MongoDb
  • Html
  • Js
  • 前端
  • 后端
  • Git
  • 知识扫盲
  • Golang
🌟 gitHub

一直在定义 监听或者订阅 的配置文件用到这个,就记录一下 这个参数的意义

Service tags are a way to tell Symfony or other third-party bundles that your service should be registered in some special way. Take the following example:
# config/services.yaml
services:
    App\Twig\AppExtension:
        tags: ['twig.extension']

Services tagged with the twig.extension tag are collected during the initialization of TwigBundle and added to Twig as extensions.

Other tags are used to integrate your services into other systems. For a list of all the tags available in the core Symfony Framework, check out Built-in 
Symfony Service Tags(下面的链接,查看所有的tag). Each of these has a different effect on your service and many tags require additional arguments (beyond the name parameter).

参考:https://symfony.com/doc/current/service_container/tags.html

查看所有的tag(以及每个tag下绑定的services/hooks):

php bin/console debug:container --tags

比如:
tag: kernel.event_listener
Purpose: To listen to different events/hooks in Symfony (要在Symfony中监听不同的事件/钩子)

ref:https://symfony.com/doc/current/reference/dic_tags.html
内置核心事件:https://symfony.com/doc/current/reference/events.html#kernel-events

安全事件中的 dispatcher定义:

security.event_dispatcher.FIREWALLNAME

https://symfony.com/doc/current/security.html#security-events

验证发现上面的 AuthenticationSuccessEvent 可以触发, 但是 LoginSuccessEvent 无法触发