Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order fixtures issue #61

Closed
senghe opened this issue Mar 16, 2020 · 1 comment
Closed

Order fixtures issue #61

senghe opened this issue Mar 16, 2020 · 1 comment

Comments

@senghe
Copy link

senghe commented Mar 16, 2020

Hello! :)

I'm using your plugin (0.8.1) on Sylius 1.6.

As you recommend, I'm using your order trait:

class Order extends BaseOrder implements SetonoSyliusGiftCardPluginOrderInterface
{
    use SetonoSyliusGiftCardPluginOrderTrait {
        SetonoSyliusGiftCardPluginOrderTrait::__construct as private __giftCardTraitConstruct;
    }
}

When I do this, my fixtures installation command tells me:

image

But when I do it this way:

class Order extends BaseOrder implements SetonoSyliusGiftCardPluginOrderInterface
{
    use SetonoSyliusGiftCardPluginOrderTrait;

    public function __construct()
    {
        parent::__construct();
        $this->giftCards = new ArrayCollection();
    }
}

It works correctly.

@loevgaard
Copy link
Member

Oh, we haven't updated the readme. See this file: https://github.com/Setono/SyliusGiftCardPlugin/blob/master/tests/Application/Model/Order.php. This is the correct way to do it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants