enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[Magento2] Create plugin does not imports the class #265

Closed Koc closed 6 years ago

Koc commented 7 years ago

use Magento\Framework\App\ResponseInterface;

    public function renderResult(ResponseInterface $response) // generate plugin for this class

got

<?php

namespace Brouzie\Satin\Plugin\View\Result;

class LayoutPlugin
{

    public function aroundRenderResult(
        \Magento\Framework\View\Result\Layout $subject,
        callable $proceed,
        ResponseInterface $response
    ) {
    }
}

expexted FQCN ResponseInterface or imported class.

Koc commented 7 years ago

also when target class hasn't any argument - we got invalid code

<?php

namespace Brouzie\Satin\Plugin\Model\Export;

class ProductPlugin
{

    public function aroundExport(\Magento\CatalogImportExport\Model\Export\Product $subject, callable $proceed}
Koc commented 7 years ago

seems like #245 returns

enriquepiatti commented 6 years ago

This should be fixed in v1.7.0. Please update.