Skip to content

Commit f79c81e

Browse files
authored
Merge pull request #116 from phansys/dependencies
Update documentation
2 parents 285b69d + 588bbaa commit f79c81e

4 files changed

Lines changed: 86 additions & 64 deletions

File tree

README.md

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Ticketing Bundle v3
22

3-
Simple multilingual ticketing bundle to add to any project.
4-
Languages: English, French, Russian, German and Spanish.
3+
Simple ticketing bundle for any project.
4+
Available translations for:
5+
* English
6+
* French
7+
* German
8+
* Italian
9+
* Portuguese
10+
* Russian
11+
* Spanish
512

613
[![Build Status](https://travis-ci.org/hackzilla/TicketBundle.png?branch=master)](https://travis-ci.org/hackzilla/TicketBundle)
714
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/091d37a9-7862-4365-952c-814ce95c4d6c/mini.png)](https://insight.sensiolabs.com/projects/091d37a9-7862-4365-952c-814ce95c4d6c)
@@ -10,35 +17,34 @@ Languages: English, French, Russian, German and Spanish.
1017
## Requirements
1118

1219
* PHP >= 5.6
13-
* Symfony ~2.8|~3.0
14-
* Knp Paginator
15-
* Bootstrap v3 (optional) see: http://symfony.com/blog/new-in-symfony-2-6-bootstrap-form-theme
20+
* [Symfony][1] ^2.8|^3.0|^4.0
21+
* [Knp Paginator bundle][2]
22+
* [Bootstrap v3][3] (optional) see: [http://symfony.com/blog/new-in-symfony-2-6-bootstrap-form-theme][4]
1623

1724
## Optional Requirements
1825

19-
* FOSUserBundle
26+
* [FOSUserBundle][5]
2027

2128

2229
## Version Matrix
2330

24-
| Ticket Bundle | Symfony | PHP |
25-
| ---------------------------------------------------------------------- | ---------- | ----- |
26-
| [3.x](https://github.com/hackzilla/TicketBundle/tree/master) (master) | ^2.8\|^3.0 | >=5.6 |
27-
| [2.x](https://github.com/hackzilla/TicketBundle/tree/2.x) | ^2.7\|^3.0 | >=5.3 |
28-
| [1.x](https://github.com/hackzilla/TicketBundle/tree/1.x) | ^2.3 | >=5.3 |
29-
| [0.x](https://github.com/hackzilla/TicketBundle/tree/0.9.x) | ^2.3 | >=5.3 |
31+
| Ticket Bundle | Symfony | PHP |
32+
| ------------------| --------------- | ----- |
33+
| [3.x][6] (master) | ^2.8\|^.0\|^4.0 | >=5.6 |
34+
| [2.x][7] | ^2.7\|^3.0 | >=5.3 |
35+
| [1.x][8] | ^2.3 | >=5.3 |
36+
| [0.x][9] | ^2.3 | >=5.3 |
3037

3138

3239
## Demo
3340

34-
See [Ticket Bundle Demo App](https://github.com/hackzilla/TicketBundleDemoApp) for an example installation. This can also be used for confirming bugs.
41+
See [Ticket Bundle Demo App][10] for an example installation. This can also be used for confirming bugs.
3542

3643

3744
## Setup
3845

39-
* [Installation with FOSUserBundle](Resources/doc/setup/fosuserbundle.md)
40-
* [Generic Installation](Resources/doc/setup/other.md)
41-
46+
* [Installation with FOSUserBundle][11]
47+
* [Generic Installation][12]
4248

4349

4450
## Optional Features
@@ -47,22 +53,22 @@ These optional features that can be turned on or off.
4753

4854
### Features
4955

50-
* [Attachments](Resources/doc/setup/feature/attachments.md)
51-
* [Custom Entities](Resources/doc/setup/feature/custom-entities.md)
52-
* [Events](Resources/doc/setup/feature/events.md)
56+
* [Attachments][13]
57+
* [Custom Entities][14]
58+
* [Events][15]
5359

5460
# 3rd Party Extensions
5561

56-
# [Email Notification](https://github.com/flodaq/TicketNotificationBundle)
62+
# [Email Notification][16]
5763

5864

5965
## Custom Templates (Optional)
6066

61-
```
62-
config.yml
67+
```yaml
68+
# config.yml
6369

6470
hackzilla_ticket:
65-
templates:
71+
templates:
6672
index: 'YOURTicketBundle:Ticket:index.html.twig'
6773
new: 'YOURTicketBundle:Ticket:new.html.twig'
6874
prototype: 'YOURTicketBundle:Ticket:prototype.html.twig'
@@ -72,9 +78,27 @@ hackzilla_ticket:
7278
7379
## Migrate a Previous Version
7480
75-
* [Information moved](Resources/doc/migrate/index.md)
81+
* [How to migrate][17]
7682
7783
7884
## Pull Requests
7985
8086
I'm open to pull requests for additional languages, features and/or improvements.
87+
88+
[1]: https://symfony.com/
89+
[2]: https://github.com/KnpLabs/KnpPaginatorBundle
90+
[3]: http://getbootstrap.com/docs/3.3/
91+
[4]: http://symfony.com/blog/new-in-symfony-2-6-bootstrap-form-theme
92+
[5]: https://symfony.com/doc/current/bundles/FOSUserBundle/index.html
93+
[6]: https://github.com/hackzilla/TicketBundle/tree/master
94+
[7]: https://github.com/hackzilla/TicketBundle/tree/2.x
95+
[8]: https://github.com/hackzilla/TicketBundle/tree/1.x
96+
[9]: https://github.com/hackzilla/TicketBundle/tree/0.9.x
97+
[10]: https://github.com/hackzilla/TicketBundleDemoApp
98+
[11]: Resources/doc/setup/fosuserbundle.md
99+
[12]: Resources/doc/setup/other.md
100+
[13]: Resources/doc/setup/feature/attachments.md
101+
[14]: Resources/doc/setup/feature/custom-entities.md
102+
[15]: Resources/doc/setup/feature/events.md
103+
[16]: https://github.com/flodaq/TicketNotificationBundle
104+
[17]: Resources/doc/migrate/index.md

Resources/doc/migrate/v1-to-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Add your user class into your config.
44

55
```yaml
66
hackzilla_ticket:
7-
user_class: AppBundle\Entity\User
7+
user_class: AppBundle\Entity\User
88
```
99
1010
```Hackzilla\Bundle\TicketBundle\User\UserInterface``` has been replaced with ```Hackzilla\Bundle\TicketBundle\Manager\UserManagerInterface```

Resources/doc/migrate/v2-to-v3.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Migration from v2 to v3
22

3-
Any reference to TicketMessage constants will need to use TicketMessageInterface.
3+
Any reference to `TicketMessage` constants will need to use `TicketMessageInterface`.
44

55
Previously:
66

@@ -16,12 +16,12 @@ Hackzilla\Bundle\TicketBundle\Model\TicketMessageInterface::STATUS_OPEN
1616
Hackzilla\Bundle\TicketBundle\Model\TicketMessageInterface::STATUS_CLOSED
1717
```
1818

19-
### TicketManagerInterface Changes
19+
### `TicketManagerInterface` Changes
2020

2121
The interface ```Hackzilla\Bundle\TicketBundle\Manager\TicketManagerInterface``` has been modified.
2222

23-
* Entity Manager needs passing in through setEntityManager()
24-
* Translator needs passing in through setTranslator()
25-
* getTicketStatus and getTicketPriority no longer need translator passing
26-
* added createMessage() and getMessageById()
27-
* updateTicket() now can take an optional message object.
23+
* Entity Manager needs passing in through `setEntityManager()`
24+
* Translator needs passing in through `setTranslator()`
25+
* `getTicketStatus()` and `getTicketPriority()` no longer need translator passing
26+
* added `createMessage()` and `getMessageById()`
27+
* `updateTicket()` now can take an optional message object.

Resources/doc/setup/fosuserbundle.md

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@
22

33
## Step 1: Installation
44

5-
Add HackzillaTicketBundle in your composer.json:
5+
Add HackzillaTicketBundle to your requirements:
66

7-
```json
8-
{
9-
"require": {
10-
"hackzilla/ticket-bundle": "~2.0@dev",
11-
"friendsofsymfony/user-bundle": "~2.0@dev",
12-
}
13-
}
7+
```bash
8+
composer require hackzilla/ticket-bundle:^2.0@dev
9+
composer require friendsofsymfony/user-bundle:^2.0
1410
```
1511

16-
Specify your user class in your config, this will be exactly the same as user_class in FOSUserBundle.
12+
Specify your user class in your config, this will be exactly the same as `user_class` in FOSUserBundle.
1713

1814
```yaml
1915
hackzilla_ticket:
20-
user_class: AppBundle\Entity\User
16+
user_class: AppBundle\Entity\User
2117
```
2218
2319
Your user class needs to implement ```Hackzilla\Bundle\TicketBundle\Model\UserInterface```
@@ -36,29 +32,29 @@ class User extends BaseUser implements \Hackzilla\Bundle\TicketBundle\Model\User
3632
}
3733
```
3834

39-
Follow [FOSUserBundle guide](https://github.com/FriendsOfSymfony/FOSUserBundle)
40-
35+
Follow [FOSUserBundle guide][1]
4136

42-
Install Composer
43-
44-
```
45-
curl -sS https://getcomposer.org/installer | php
46-
mv composer.phar /usr/local/bin/composer
47-
```
37+
## Step 2: Enable the bundle
4838

49-
Now tell composer to download the library by running the command:
39+
Enable the bundle in the kernel:
5040

51-
``` bash
52-
$ composer update hackzilla/ticket-bundle
41+
```php
42+
<?php
43+
// config/bundles.php
44+
45+
return [
46+
FOS\UserBundle\FOSUserBundle::class => ['all' => true],
47+
Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true],
48+
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
49+
Hackzilla\Bundle\TicketBundle\HackzillaTicketBundle::class => ['all' => true],
50+
// ...
51+
// Your application bundles
52+
];
5353
```
5454

55-
Composer will install the bundle into your project's `vendor/hackzilla` directory.
56-
57-
## Step 2: Enable the bundle
58-
59-
Enable the bundle in the kernel:
55+
Or if you are not using Flex:
6056

61-
``` php
57+
```php
6258
<?php
6359
// app/AppKernel.php
6460
@@ -78,25 +74,27 @@ public function registerBundles()
7874

7975
## Step 3: Import the routing
8076

81-
``` yml
77+
```yaml
8278
hackzilla_ticket:
8379
resource: "@HackzillaTicketBundle/Resources/config/routing.yml"
84-
prefix: /
80+
prefix: /
8581
```
8682

8783
or
8884

89-
``` yml
85+
```yaml
9086
hackzilla_ticket:
9187
resource: "@HackzillaTicketBundle/Resources/config/routing/ticket.yml"
92-
prefix: /ticket
88+
prefix: /ticket
9389
```
9490

9591
## Step 4: Roles
9692

9793
All users can create tickets, even anonymous users.
98-
You can assign ROLE_TICKET_ADMIN to any user you want to be able to administer the ticketing system.
94+
You can assign "ROLE_TICKET_ADMIN" to any user you want to be able to administer the ticketing system.
9995

10096
## Step 5: Create tables
10197

10298
```bin/console doctrine:schema:update --force```
99+
100+
[1]: https://github.com/FriendsOfSymfony/FOSUserBundle

0 commit comments

Comments
 (0)