enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[Magento2] Generate plugin produces wrong syntax code #245

Closed Koc closed 6 years ago

Koc commented 7 years ago

I've tryed to generate plugin and got new class

<?php

namespace Brouzie\Satin\Plugin\Model\Layer\Filter;

class AttributePlugin
{

    public function aroundGetItems(\Smile\ElasticsuiteCatalog\Model\Layer\Filter\Attribute $subject, \Closure $procede}

it has syntax errors

Koc commented 7 years ago

Also it asks for scope - but does scopes affects plugins?

enriquepiatti commented 7 years ago

Thanks @Koc I have corrected the typo, also changed to callable instead of Closure, will be available in next release Regarding to the area, is not needed, but you can use it, please read for more info: http://devdocs.magento.com/guides/v2.1/extension-dev-guide/plugins.html#configuration-inheritance

Koc commented 7 years ago

want write about callable also but you fix it faster :) thank you

enriquepiatti commented 6 years ago

Not sure what was the problem here, but please test if the issue continue after updating to v.1.7.0 and reopen in that case. Thanks !