SyliusResourceBundle icon indicating copy to clipboard operation
SyliusResourceBundle copied to clipboard

Doctrine class metadata not found for extended interface

Open teohhanhui opened this issue 5 years ago • 20 comments

Sylius version affected: 1.x

Description
For any resource, it should be possible to get the Doctrine class metadata using any of the interfaces for the resource defined at the component / core / app level.

Steps to reproduce

  1. Create a new project from Sylius-Standard.
  2. Try to get Doctrine class metadata using Sylius\Component\Core\Model\ProductInterface.

Possible Solution
I think there is a design problem.

If you look at https://github.com/Sylius/SyliusResourceBundle/blob/v1.5.0/src/Bundle/DependencyInjection/Compiler/DoctrineTargetEntitiesResolverPass.php

it does not go up the inheritance chain - and it's not safe to do so, as we can't tell which interfaces should be mapped, and which should not. So if we set interface to a child interface, things would stop working if you try using the parent interface(s).

What is actually expected is that all of the interfaces should work, e.g.:

  • Sylius\Component\Product\Model\ProductInterface
  • Sylius\Component\Core\Model\ProductInterface
  • App\Model\ProductInterface (for example)

So we need a way to map multiple interfaces.

teohhanhui avatar May 24 '19 16:05 teohhanhui

The handler is invoked when the connection opens. Are you seeing some other behavior? On May 24, 2013 4:40 PM, "Gregory Wieber" [email protected] wrote:

Is it possible to create a handler that will respond to a new websocket connection being opened by a client? From what I can tell, the handlers seem to fire when the client sends a message. I'd like to be able to send some data to the client as soon as they make an initial connection.

Great library.

— Reply to this email directly or view it on GitHubhttps://github.com/ztellman/aleph/issues/94 .

ztellman avatar May 25 '13 01:05 ztellman

Thanks -- you're right, this definitely works.

dreamwieber avatar May 25 '13 03:05 dreamwieber