Skip to content

Bump dependencies #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 41 additions & 67 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,74 +9,48 @@ For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
HEADER;

// Use PHP-CS-Fixer 2+ if it is available
if (\class_exists(PhpCsFixer\Config::class, false)) {
return PhpCsFixer\Config::create()
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules([
'@PHP56Migration' => true,
'@PHP56Migration:risky' => true,
'@PHPUnit57Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'explicit_string_variable' => true,
'global_namespace_import' => ['import_classes' => false],
'header_comment' => [
'header' => $header,
],
'logical_operators' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'multiline_whitespace_before_semicolons' => true,
'no_alternative_syntax' => true,
'no_extra_blank_lines' => true,
'no_null_property_initialization' => true,
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_unset_on_property' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_construct' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
'single_line_throw' => false,
'static_lambda' => true,
'strict_param' => true,
])
->setFinder(
PhpCsFixer\Finder::create()->exclude(['Tests/Functional/cache'])->in(__DIR__)
)
;
}

return Symfony\CS\Config\Config::create()
return PhpCsFixer\Config::create()
->setUsingCache(true)
->fixers([
'combine_consecutive_unsets',
'ereg_to_preg',
'header_comment' => $header,
'newline_after_open_tag',
'ordered_use',
'php_unit_construct',
'php_unit_dedicate_assert',
'php_unit_strict',
'phpdoc_order',
'short_array_syntax',
'short_echo_tag',
'strict_param',
->setRiskyAllowed(true)
->setRules([
'@PHP56Migration' => true,
'@PHP56Migration:risky' => true,
'@PHPUnit57Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'explicit_string_variable' => true,
'global_namespace_import' => ['import_classes' => false],
'header_comment' => [
'header' => $header,
],
'logical_operators' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'multiline_whitespace_before_semicolons' => true,
'no_alternative_syntax' => true,
'no_extra_blank_lines' => true,
'no_null_property_initialization' => true,
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_unset_on_property' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_construct' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
'single_line_throw' => false,
'static_lambda' => true,
'strict_param' => true,
])
->finder(
Symfony\CS\Finder\DefaultFinder::create()
->exclude(['Tests/Functional/cache'])
->in(__DIR__)
->setFinder(
PhpCsFixer\Finder::create()->exclude(['Tests/Functional/cache'])->in(__DIR__)
)
;
25 changes: 10 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: php
warnings_are_errors: false

php:
- 7.1
- 7.2
- 7.3
- 7.4
Expand All @@ -15,25 +14,21 @@ env:
matrix:
fast_finish: true
include:
- php: 5.6
env: SYMFONY_PHPUNIT_VERSION="5.7.27"
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_PHPUNIT_VERSION="5.7.27"
- php: 5.6
env: SYMFONY_VERSION="~2.8.0" SYMFONY_PHPUNIT_VERSION="5.7.27"
- php: 5.6
env: SYMFONY_VERSION="~3.4.0" SYMFONY_PHPUNIT_VERSION="5.7.27"
- php: 5.6
env: INSTALL_VICH_UPLOADER_BUNDLE=true SYMFONY_PHPUNIT_VERSION="5.7.27"
- php: 7.0
env: SYMFONY_PHPUNIT_VERSION="5.7.27"
- php: 7.2
- php: 7.2
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 7.2
env: SYMFONY_VERSION="^4.4.0"
- php: 7.2
env: INSTALL_VICH_UPLOADER_BUNDLE=true
- php: 7.3
- php: 7.4
- php: 7.4
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_PHPUNIT_VERSION="5.7.27"
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 7.4
env: INSTALL_VICH_UPLOADER_BUNDLE=true
allow_failures:
- php: nightly
- env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_PHPUNIT_VERSION="5.7.27"

sudo: false

Expand Down
97 changes: 35 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# Hackzilla Ticket Bundle

Simple ticketing bundle for any project.
Available translations for:

* Dutch
* English
* French
* German
* Italian
* Portuguese
* Russian
* Spanish

[![Build Status](https://travis-ci.org/hackzilla/TicketBundle.png?branch=master)](https://travis-ci.org/hackzilla/TicketBundle)
[![Quality assurance](https://github.com/hackzilla/TicketBundle/workflows/Quality%20assurance/badge.svg)](https://github.com/hackzilla/TicketBundle/actions?query=workflow%3A%22Quality+assurance%22)
Expand All @@ -19,51 +9,36 @@ Available translations for:

## Requirements

* PHP ^5.6\|^7.0
* [Symfony][1] ^2.8|^3.4|^4.0
* [Knp Paginator bundle][2]

## Optional Requirements

* [FOSUserBundle][5]
* [Bootstrap v3][3] (see [http://symfony.com/blog/new-in-symfony-2-6-bootstrap-form-theme][4])

## Version Matrix

| Ticket Bundle | Symfony | PHP |
| --------------| ---------------- | ---------- |
| [3.x][6] | ^2.8\|^3.4\|^4.0 | ^5.6\|^7.0 |
| [2.x][7] | ^2.7\|^3.4 | ^5.3\|^7.0 |
| [1.x][8] | ^2.3 | ^5.3\|^7.0 |
| [0.x][9] | ^2.3 | ^5.3\|^7.0 |

## Demo

See [Ticket Bundle Demo App][10] for an example installation. This can also be used for confirming bugs.
You can see the full requirement definitions for each available version in [Packagist](https://packagist.org/packages/hackzilla/ticket-bundle).

## Setup

* [Installation with FOSUserBundle][11]
* [Generic Installation][12]
* [Installation with FOSUserBundle](Resources/doc/setup/fosuserbundle.md)
* [Generic installation](Resources/doc/setup/other.md)

## Optional Features
## Optional features

These optional features that can be turned on or off.

### Features

* [Attachments][13]
* [Custom Entities][14]
* [Events][15]
* [Attachments](Resources/doc/setup/feature/attachments.md)
* [Custom entities](Resources/doc/setup/feature/custom-entities.md)
* [Events](Resources/doc/setup/feature/events.md)

## 3rd Party Extensions
## Optional integrations

### [Email Notification][16]
* [FOSUserBundle](https://symfony.com/doc/current/bundles/FOSUserBundle/index.html)
* [Bootstrap v3](http://getbootstrap.com/docs/3.3/) (see http://symfony.com/blog/new-in-symfony-2-6-bootstrap-form-theme)

### Custom Templates (Optional)
## 3rd party extensions

### [Email notifications](https://github.com/flodaq/TicketNotificationBundle)

### Custom templates (optional)

```yaml
# config.yml
# config/packages/hackzilla_ticket.yaml

hackzilla_ticket:
templates:
Expand All @@ -74,29 +49,27 @@ hackzilla_ticket:
show_attachment: '@App/Ticket/show_attachment.html.twig'
```

## Migrate a Previous Version
## Translations

Built in translations are available for the following languages:

* Dutch
* English
* French
* German
* Italian
* Portuguese
* Russian
* Spanish

## Demo

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

* [How to migrate][17]
## Migrate a previous version

* [How to migrate](Resources/doc/migrate/index.md)

## Pull Requests
## Pull requests

I'm open to pull requests for additional languages, features and/or improvements.

[1]: https://symfony.com/
[2]: https://github.com/KnpLabs/KnpPaginatorBundle
[3]: http://getbootstrap.com/docs/3.3/
[4]: http://symfony.com/blog/new-in-symfony-2-6-bootstrap-form-theme
[5]: https://symfony.com/doc/current/bundles/FOSUserBundle/index.html
[6]: https://github.com/hackzilla/TicketBundle/tree/3.x
[7]: https://github.com/hackzilla/TicketBundle/tree/2.x
[8]: https://github.com/hackzilla/TicketBundle/tree/1.x
[9]: https://github.com/hackzilla/TicketBundle/tree/0.9.x
[10]: https://github.com/hackzilla/TicketBundleDemoApp
[11]: Resources/doc/setup/fosuserbundle.md
[12]: Resources/doc/setup/other.md
[13]: Resources/doc/setup/feature/attachments.md
[14]: Resources/doc/setup/feature/custom-entities.md
[15]: Resources/doc/setup/feature/events.md
[16]: https://github.com/flodaq/TicketNotificationBundle
[17]: Resources/doc/migrate/index.md
2 changes: 1 addition & 1 deletion Resources/doc/migrate/v1-to-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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```
Expand Down
45 changes: 27 additions & 18 deletions Resources/doc/setup/feature/attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<?php
// config/bundles.php

return [
Vich\UploaderBundle\VichUploaderBundle => ['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
<?php
// app/AppKernel.php

Expand All @@ -54,6 +63,6 @@ public function registerBundles()

## Custom Entity

If you want to implement your own entities then you will want to extend
If you want to implement your own entities then you will want to extend

``` \Hackzilla\Bundle\TicketBundle\Model\TicketFeature\MessageAttachmentInterface ```
Loading