https://github.com/bacart/symfony-aware
Symfony service awareness library
https://github.com/bacart/symfony-aware
library php symfony
Last synced: 2 months ago
JSON representation
Symfony service awareness library
- Host: GitHub
- URL: https://github.com/bacart/symfony-aware
- Owner: bacart
- License: mit
- Created: 2018-09-17T21:18:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-08-16T10:43:23.000Z (7 months ago)
- Last Synced: 2025-09-20T00:13:17.907Z (6 months ago)
- Topics: library, php, symfony
- Language: PHP
- Homepage:
- Size: 31.3 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Symfony Aware
=============
[](https://packagist.org/packages/bacart/symfony-aware)
[](https://packagist.org/packages/bacart/symfony-aware)
[](https://packagist.org/packages/bacart/symfony-aware)
[](LICENSE)
Symfony service awareness library.
Installation
------------
##### Using command line:
Run the following command, and you will get the latest version by [Packagist][1].
```bash
composer require bacart/symfony-aware
```
##### Using composer.json
To use the newest (maybe unstable) version add following into your composer.json:
```json
{
"require": {
"bacart/symfony-aware": "dev-master"
}
}
```
Usage Example
-------------
```php
use Bacart\SymfonyAware\Interfaces\LoggerAwareInterface;
use Bacart\SymfonyAware\Traits\LoggerAwareTrait;
class SomeService implements LoggerAwareInterface
{
use LoggerAwareTrait;
public function someMethod(): void
{
$this->logger->info('Some information message');
}
}
```
Example assumes that you are using an [autowiring][2].
License
-------
This project is released under the [MIT license](LICENSE).
About
-----
Project development is led by [Alex Bacart][3].
[1]: https://packagist.org/packages/bacart/symfony-aware
[2]: https://symfony.com/doc/current/service_container/autowiring.html
[3]: https://github.com/alex-bacart