Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit c008b70

Browse files
Merge pull request #4 from Regenerys/master
Add Symfony 4 support
2 parents f714c6c + c48a355 commit c008b70

File tree

8 files changed

+25
-533
lines changed

8 files changed

+25
-533
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vendor/
2+
composer.lock

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: php
22
php:
3-
- "5.5"
3+
- "7.1"
44

55
install: composer install

README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# SGKBarcodeBundle
22

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.
84

95
Features:
106

@@ -19,22 +15,14 @@ Features:
1915

2016
Add SGKBarcodeBundle by running the command:
2117
```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
2719
```
2820

2921
Or, add SGKBarcodeBundle to your ``composer.json``, then execute ``php composer.phar update``
3022
```json
31-
// Symfony version >= 3.0
3223
"require": {
33-
"sgk/barcode-bundle": "~3.0"
24+
"sgk/barcode-bundle": "v2.0.0"
3425
}
35-
36-
// Symfony version >= 2.7 and < 3.0, use ~2.0
37-
// Symfony version < 2.7, use ~1.0
3826
```
3927

4028
Composer will install the bundle to your project's vendor/sgk directory.
@@ -53,6 +41,8 @@ public function registerBundles()
5341
}
5442
```
5543

44+
If you are using Symfony 4 with Flex the line should have automatically been added to `config/bundles.php`
45+
5646
## Generate options
5747

5848
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.
7060
> Default color for html, svg is black, for png is array(0, 0, 0)
7161
7262
## 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+
7466
The bundle registers one service: ``sgk_barcode.generator`` which will allows you to generate barcode:
7567

7668
* outpout html
@@ -246,7 +238,7 @@ If there is some problem of requirements, make sure you have install these two e
246238

247239
## Tests
248240

249-
To execute unit tests:
241+
To execute unit tests, `composer install` and run:
250242
```sh
251-
$ phpunit --coverage-text
243+
phpunit --coverage-text
252244
```

Resources/doc/README_fr.md

Lines changed: 0 additions & 252 deletions
This file was deleted.

0 commit comments

Comments
 (0)