mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 13:06:22 +00:00
633 B
633 B
date | id | title |
---|---|---|
2020-11-16 | 6ecb0d08-16f6-42c5-ac0d-916b875bc1ff | Deprecate Public Services Into Private Services |
Description
Deprecated public services and turns them into private
Syntax
services:
foo:
# ...
public: true
tags:
- { name: 'container.private', package: 'foo/bar', 'version': '1.2' }
If your application tries to get that service directly from the
container ($container->get('foo'))
you'll see the following error:
Since foo/bar 1.2: Accessing the "foo" service directly from the container
is deprecated, use dependency injection instead.