JMSDiExtraBundle icon indicating copy to clipboard operation
JMSDiExtraBundle copied to clipboard

add support for multiple service annotations

Open wodka opened this issue 9 years ago • 5 comments
trafficstars

this only adds the ability to define multipe service annotations on a class

to fully implement https://github.com/schmittjoh/JMSDiExtraBundle/issues/232 we need to define how to add injections based on different service notations.

wodka avatar Feb 14 '16 18:02 wodka

perhaps something like:

@Service(
  "first.service", 
  initMethod="setup", 
  initMethodInject=@InjectParams({
    "system" =@Inject("%first%)
  })
)
@Service(
  "second.service", 
  initMethod = "setup", 
  initMethodInject = @InjectParams({
    "system" = @Inject("%second%)
  })
)

Ideas?

wodka avatar Feb 14 '16 18:02 wodka

@Ener-Getick I just added the support for AfterSetup services

wodka avatar Feb 16 '16 15:02 wodka

I'm wondering if we should not create a new ServiceMetadata class or just use the Definition class directly...

GuilhemN avatar Feb 18 '16 20:02 GuilhemN

@schmittjoh What do you think about having a new metadata class ? something like ServiceMetadata which would contain all the linked fields instead of having an array.

GuilhemN avatar Feb 21 '16 21:02 GuilhemN

as this is a big stuff, I think it will wait for 1.8.

GuilhemN avatar Feb 21 '16 21:02 GuilhemN