Skip to content

Commit 0c414ca

Browse files
committed
Added badges
1 parent 7ef04e2 commit 0c414ca

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

README.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,44 @@
22
[![Software License][ico-license]](LICENSE)
33
[![UnitTests](https://github.com/renakdup/simple-wordpress-dic/actions/workflows/phpunit.yaml/badge.svg)](https://github.com/renakdup/simple-wordpress-dic/actions/workflows/phpunit.yaml)
44
[![PHPStan](https://github.com/renakdup/simple-wordpress-dic/actions/workflows/phpstan.yaml/badge.svg)](https://github.com/renakdup/simple-wordpress-dic/actions/workflows/phpstan.yaml)
5+
[![PHP Version Require](http://poser.pugx.org/renakdup/simple-php-dic/require/php)](https://packagist.org/packages/renakdup/simple-php-dic)
6+
[![Dependents](http://poser.pugx.org/renakdup/simple-php-dic/dependents)](https://packagist.org/packages/renakdup/simple-php-dic)
57

68

9+
Simple DI Container with **autowiring** in a single file **with NO dependencies** allows you to easily use it in your PHP applications and especially convenient for **WordPress** plugins and themes.
710

8-
Simple DI Container with **autowiring** in a single file **without dependencies** allows you to easily use it in your PHP applications and especially convenient for **WordPress** plugins and themes.
9-
10-
## Why choose Simple DI Container?
11-
1. Easy to integrate into your PHP Application or WordPress project, just copy one file.
12-
2. Simple PHP DI Container hasn't any dependencies on other scripts or libraries.
11+
## Why choose Simple DI Container
12+
1. Easy to integrate in your WordPress project - just copy one file or install via Composer.
13+
2. No dependencies on other scripts or libraries.
1314
3. Supports auto-wiring `__constructor` parameters for classes as well as for scalar types that have default values.
14-
4. Supports PHP ^8 and PHP 7.4.
15-
5. Supports Lazy Load class instantiating.
16-
6. Allow you following the best practices for developing your code.
17-
7. Supports PSR11 (read more about below).
18-
8. No phpcs conflicts.
15+
4. Supports PHP ^7.4|^8.
16+
5. Allow you following the best practices for developing your code.
17+
6. No PHPCS conflicts.
18+
7. Supports Lazy Load class instantiating.
19+
8. Lightweight and fast.
1920

20-
## How to integrate it in a project?
21+
## How to install in a project
2122

22-
1. Just copy the file `./src/Container.php` to your plugin directory or theme.
23-
2. Rename `namespace` in the file from `Renakdup\SimpleDIC` to `<Your_Plugin_Name>\SimpleDIC`
24-
3. Require this file.
23+
There are several ways, you can choose what you more prefer:
2524

26-
## How to use it in code
25+
### Install via Composer
26+
```bash
27+
composer require renakdup/simple-php-dic
28+
```
2729

28-
### Get started:
30+
### Copy and paste file
31+
1. Just copy the file `./src/Container.php` to your plugin directory or theme.
32+
2. Rename `namespace` in the file
33+
from `Renakdup\SimpleDIC` to `<Your_Plugin_Name>\SimpleDIC`
34+
3. Include the file.
2935

30-
1. Add file to your application and `include`.
31-
2. Create a container.
32-
3. Set a service
33-
4. Get a service
34-
5. Use object
36+
## How to use it
37+
38+
### Get started:
39+
1. Create container instance.
40+
2. Set a service
41+
3. Get a service
42+
4. Use object
3543
```php
3644
use Renakdup\SimpleDIC\Container;
3745

0 commit comments

Comments
 (0)