# Plugin priority in 5.2 plugin system

**URL:** <https://forum.shopware.com/t/plugin-priority-in-5-2-plugin-system/53228>\
**Category:** International (English Only)\
**Tags:** programming\
**Created:** [31. Mai 2018 um 14:21 UTC](https://forum.shopware.com/t/plugin-priority-in-5-2-plugin-system/53228 "2018-05-31T14:21:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmayak](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dmayak](https://forum.shopware.com/u/dmayak)\
**Post date:** [31. Mai 2018 um 14:21 UTC](https://forum.shopware.com/t/plugin-priority-in-5-2-plugin-system/53228/1 "2018-05-31T14:21:49Z")

</div>

Is there a way to control plugin services call order like it was with an old subscribeEvent function? I need to modify data which is added by an old-fashined subscribtion call, I have found that it is subscribed to Enlight\_Controller\_Action\_PostDispatch with priority 100, but my plugin, which subscribes via services.xml to the same event, is called before it. I have checked schema definition for service tag and there are no order or priority attributes.

---

<div class="post-metadata">

**Author:** ![odessite](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@odessite](https://forum.shopware.com/u/odessite)\
**Post date:** [1. Juni 2018 um 11:09 UTC](https://forum.shopware.com/t/plugin-priority-in-5-2-plugin-system/53228/2 "2018-06-01T11:09:49Z")

</div>

You can use **SubscriberInterface** same way like for old plugin system.

You can create [separate subscriber](https://github.com/shopwarrior/OssCustomModel/blob/master/Subscriber/Frontend.php) or subscribe events in [core plugin file](https://github.com/shopwarrior/OssCronjob/blob/master/OssCronjob.php).

If I right understand your needs - that’s what you search.

---

<div class="post-metadata">

**Author:** ![dmayak](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dmayak](https://forum.shopware.com/u/dmayak)\
**Post date:** [1. Juni 2018 um 11:44 UTC](https://forum.shopware.com/t/plugin-priority-in-5-2-plugin-system/53228/3 "2018-06-01T11:44:44Z")

</div>

Yes, thank you, it actually is what I have looking for, upon closer examination of SubscriberInterface I have found syntax for subscribtion priority, which is

```
'eventName' => array('callback', priority),

```

so the question is answered, but strangely I am still unable to launch my subscribtion after **Shopware\_Plugins\_Core\_ControllerBase\_Bootstrap** plugin subscribtion, although core plugins should be executed before custom plugins. Oh well, I have already opted to select data I needed from database so it doesn’t matter now.
