1
1
# SGKBarcodeBundle
2
2
3
- [ ![ Build Status] ( https://travis-ci.org/shangguokan/SGKBarcodeBundle.svg )] ( https://travis-ci.org/shangguokan/SGKBarcodeBundle )
4
- [ ![ Latest Stable Version] ( https://poser.pugx.org/sgk/barcode-bundle/v/stable )] ( https://packagist.org/packages/sgk/barcode-bundle ) [ ![ Total Downloads] ( https://poser.pugx.org/sgk/barcode-bundle/downloads )] ( https://packagist.org/packages/sgk/barcode-bundle ) [ ![ Latest Unstable Version] ( https://poser.pugx.org/sgk/barcode-bundle/v/unstable )] ( https://packagist.org/packages/sgk/barcode-bundle ) [ ![ License] ( https://poser.pugx.org/sgk/barcode-bundle/license )] ( https://packagist.org/packages/sgk/barcode-bundle )
5
-
6
- SGKBarcodeBundle is a Symfony2 / Symfony3 Barcode Generator Bundle.
7
- This README is also available in French ([ Français] ( Resources/doc/README_fr.md ) ) and Chinese ([ 中文] ( Resources/doc/README_zh-CN.md ) ).
3
+ SGKBarcodeBundle is a Symfony3 / 4 Barcode Generator Bundle.
8
4
9
5
Features:
10
6
@@ -19,22 +15,14 @@ Features:
19
15
20
16
Add SGKBarcodeBundle by running the command:
21
17
``` sh
22
- // Symfony version > = 3.0
23
- $ php composer.phar require sgk/barcode-bundle:~ 3.0
24
-
25
- // Symfony version > = 2.7 and < 3.0, use ~ 2.0
26
- // Symfony version < 2.7, use ~ 1.0
18
+ $ php composer.phar require sgk/barcode-bundle:v2.0.0
27
19
```
28
20
29
21
Or, add SGKBarcodeBundle to your `` composer.json `` , then execute `` php composer.phar update ``
30
22
``` json
31
- // Symfony version >= 3.0
32
23
"require" : {
33
- "sgk/barcode-bundle" : " ~3 .0"
24
+ "sgk/barcode-bundle" : " v2.0 .0"
34
25
}
35
-
36
- // Symfony version >= 2.7 and < 3.0, use ~2.0
37
- // Symfony version < 2.7, use ~1.0
38
26
```
39
27
40
28
Composer will install the bundle to your project's vendor/sgk directory.
@@ -53,6 +41,8 @@ public function registerBundles()
53
41
}
54
42
```
55
43
44
+ If you are using Symfony 4 with Flex the line should have automatically been added to ` config/bundles.php `
45
+
56
46
## Generate options
57
47
58
48
To generate one barcode, you have 5 options can be configured.
@@ -70,7 +60,9 @@ To generate one barcode, you have 5 options can be configured.
70
60
> Default color for html, svg is black, for png is array(0, 0, 0)
71
61
72
62
## Usage by service
73
-
63
+
64
+ > This is deprecated in version 3.4 and will break in Symfony 4. See 'usage without service' instead.
65
+
74
66
The bundle registers one service: `` sgk_barcode.generator `` which will allows you to generate barcode:
75
67
76
68
* outpout html
@@ -246,7 +238,7 @@ If there is some problem of requirements, make sure you have install these two e
246
238
247
239
## Tests
248
240
249
- To execute unit tests:
241
+ To execute unit tests, ` composer install ` and run :
250
242
``` sh
251
- $ phpunit --coverage-text
243
+ phpunit --coverage-text
252
244
```
0 commit comments