Skip to content

Service creates as private #55

Open
@glembus

Description

@glembus

Hello,
A have received deprecation message The "neo4j.entity_manager" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0.. As I understood when sets alias for default manager it sets with private true but default service creates as not private.
Message fires from Neo4jBundle::boot(). Here it is private.
Maybe I doing something wrong.

I have changed $container->setAlias('neo4j.entity_manager', 'neo4j.entity_manager.default')` to

$id = new Alias($container->normalizeId('neo4j.entity_manager.default'), true);
$container->setAlias('neo4j.entity_manager', $id);

that help to set Alias as not private. But debug still tell that service is private..

 php bin/console debug:container neo4j.entity_manager

 // This service is an alias for the service neo4j.entity_manager.default                                               

Information for Service "neo4j.entity_manager.default"
======================================================

 ---------------- ------------------------------------ 
  Option           Value                               
 ---------------- ------------------------------------ 
  Service ID       neo4j.entity_manager.default        
  Class            GraphAware\Neo4j\OGM\EntityManager  
  Tags             -                                   
  Public           no                                  
  Synthetic        no                                  
  Lazy             no                                  
  Shared           yes                                 
  Abstract         no                                  
  Autowired        no                                  
  Autoconfigured   no                                  
 ---------------- ------------------------------------ 

Maybe I'm doing something wrong? I just add it and all tests fired deprecations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions