Skip to content

Symfony service awareness library

License

Notifications You must be signed in to change notification settings

bacart/symfony-aware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symfony Aware

PHP from Packagist Latest Stable Version Total Downloads License

Symfony service awareness library.

Installation

Using command line:

Run the following command, and you will get the latest version by Packagist.

composer require bacart/symfony-aware
Using composer.json

To use the newest (maybe unstable) version add following into your composer.json:

{
    "require": {
        "bacart/symfony-aware": "dev-master"
    }
}

Usage Example

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.

License

This project is released under the MIT license.

About

Project development is led by the Alex Bacart.