diff --git a/README.md b/README.md index 6bd911a3..0752e77d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Simple ticketing bundle for any project. ## Requirements -[Packagist](https://packagist.org/packages/hackzilla/ticket-bundle) +You can see the full requirement definitions for each available version in [Packagist](https://packagist.org/packages/hackzilla/ticket-bundle). ## Setup diff --git a/Resources/doc/migrate/v1-to-v2.md b/Resources/doc/migrate/v1-to-v2.md index b09ba347..c79e95d7 100644 --- a/Resources/doc/migrate/v1-to-v2.md +++ b/Resources/doc/migrate/v1-to-v2.md @@ -4,7 +4,7 @@ Add your user class into your config. ```yaml hackzilla_ticket: - user_class: AppBundle\Entity\User + user_class: App\Entity\User ``` ```Hackzilla\Bundle\TicketBundle\User\UserInterface``` has been replaced with ```Hackzilla\Bundle\TicketBundle\Manager\UserManagerInterface``` diff --git a/Resources/doc/setup/feature/attachments.md b/Resources/doc/setup/feature/attachments.md index dfafe63d..e3588474 100644 --- a/Resources/doc/setup/feature/attachments.md +++ b/Resources/doc/setup/feature/attachments.md @@ -2,41 +2,50 @@ ## Attachments -Add UploaderBundle in your composer.json: +Add UploaderBundle to your requirements: -```json -{ - "require": { - "hackzilla/ticket-bundle": "~3.0", - "vich/uploader-bundle": "~1.0" - } -} +```bash +composer require vich/uploader-bundle ``` Specify the uploader config, so the bundle knows where to store the files. ```yaml hackzilla_ticket: - user_class: AppBundle\Entity\User - ticket_class: Hackzilla\Bundle\TicketBundle\Entity\TicketWithAttachment - message_class: Hackzilla\Bundle\TicketBundle\Entity\TicketMessageWithAttachment + user_class: App\Entity\User + ticket_class: Hackzilla\Bundle\TicketBundle\Entity\TicketWithAttachment + message_class: Hackzilla\Bundle\TicketBundle\Entity\TicketMessageWithAttachment features: - attachment: true + attachment: true vich_uploader: db_driver: orm mappings: ticket_message_attachment: - uri_prefix: /attachment - upload_destination: %kernel.root_dir%/../var/uploads/attachment/ + uri_prefix: /attachment + upload_destination: '%kernel.root_dir%/../var/uploads/attachment/' ``` See [VichUploaderBundle](https://github.com/dustin10/VichUploaderBundle/blob/master/Resources/doc/index.md) documentation for more details. -Don't forget to register VichUploaderBundle in AppKernel. +If you are not using [Symfony Flex](https://symfony.com/doc/current/setup/flex.html), you must enable the bundles manually in the kernel: + +```php + ['all' => true], + Hackzilla\Bundle\TicketBundle\HackzillaTicketBundle::class => ['all' => true], + // ... + // Your application bundles +]; +``` + +If you are using an older kernel implementation, you must update the `registerBundles()` method: -``` php +```php ['all' => true], + Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], + Hackzilla\Bundle\TicketBundle\HackzillaTicketBundle::class => ['all' => true], + // ... + // Your application bundles +]; ``` -Composer will install the bundle into your project's `vendor/hackzilla` directory. - -## Step 2: Enable the bundle - -Enable the bundle in the kernel: +If you are using an older kernel implementation, you must update the `registerBundles()` method: -``` php +```php