Closed mcaskill closed 1 year ago
Thank you. The fix is correct.
🤦 The fix is not correct; the getSubscribedEvents()
method is static. Sorry about that. I'll push a better correction soon.
I can either move the config validity check to handlePreDownloadEvent()
:
public function handlePreDownloadEvent(PreFileDownloadEvent $event): void
{
if ($event->getType() !== 'package' || ! $this->config->isValid()) {
return;
}
Or change the $config
property to be static.
Oh noooooooooooooooooooooooooooooooooooooooooooooooooooooooo!
I leave it 100% up to you. This PR is not yet released :)
Please run composer run analyze
before that PR.
Prevents an error in
EnvatoPlugin
:This error is the result of the
EnvatoApi
not being set up when the config is invalid but events still being subscribed to.