Skip to content
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

v4.0 massive refactoring #202

Merged
merged 2 commits into from
Jun 16, 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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ assignees: ''
---

<!--
- Please do not report an issue for a version of DoctrineAuditBundle that is no longer supported. Currently supported versions are listed here: https://github.com/DamienHarper/DoctrineAuditBundle#version-information
- Please do not report an issue for a version of `auditor-bundle` that is no longer supported. Currently supported versions are listed here: https://github.com/DamienHarper/auditor-bundle#version-information
- Please fill in this template according to your issue.
- Please keep the table shown below at the top of your issue.
- You can retrieve DoctrineAuditBundle version by running `composer info | grep "doctrine-audit-bundle"`.
- You can retrieve `auditor-bundle` version by running `composer info | grep "auditor-bundle"`.
- You can retrieve PHP version by running `php -v`.
- Please post code as text (using proper markup). Do not post screenshots of code.
- Please remove this comment before submitting your issue.
-->

| Q | A
| ----------------------------| -----------------------
| DoctrineAuditBundle version | x.y.z
| `auditor-bundle` version | x.y.z
| PHP version | x.y.z
| Database | MySQL / PostgreSQL / SQLite / Other

Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.php_cs.cache
.phpunit.result.cache
/vendor/
/tests/coverage/
composer.lock
/tests/xdebug-filter.php
/tests/coverage/
*.sqlite
var/
42 changes: 30 additions & 12 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,27 @@ $config = PhpCsFixer\Config::create()
'@PHP71Migration:risky' => true,
'@DoctrineAnnotation' => true,
'@PHPUnit75Migration:risky' => true,
'backtick_to_shell_exec' => true,
'blank_line_before_statement' => [
'statements' => [
'break',
// 'case', -> On ne souhaite pas ce cas
'continue',
'declare',
// 'default', -> On ne souhaite pas ce cas
'exit',
'goto',
'include',
'include_once',
'require',
'require_once',
'return',
'switch',
'throw',
'try',
],
],
'date_time_immutable' => false,
'declare_strict_types' => false,
'final_public_method_for_abstract_class' => true,
'final_static_access' => true,
'general_phpdoc_annotation_remove' => [
'annotations' => [
'expectedException',
Expand All @@ -22,21 +38,23 @@ $config = PhpCsFixer\Config::create()
],
],
'global_namespace_import' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'mb_str_functions' => true,
'no_superfluous_phpdoc_tags' => false,
'nullable_type_declaration_for_default_null_value' => true,
'ordered_interfaces' => true,
'phpdoc_line_span' => true,
'simplified_null_return' => false,
// 'phpdoc_to_param_type' => true,
// 'phpdoc_to_return_type' => true,
// 'regular_callable_call' => true,
'self_static_accessor' => true,
// 'simplified_if_return' => true, // Fait bugger le cs-fixer (local principalement) en version < 3
// 'simplified_null_return' => true,
'php_unit_test_class_requires_covers' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->notPath('src/DoctrineAuditBundle/DependencyInjection/Configuration.php')
->notPath('tests/DoctrineAuditBundle/Transaction/TransactionProcessorTest.php')
->notPath('tests/DoctrineAuditBundle/Event/DoctrineSubscriberTest.php')
->in(__DIR__)
->setFinder(PhpCsFixer\Finder::create()
->in(__DIR__)
->notPath('tests/App/var/')
->notPath('src/DependencyInjection/Configuration.php')
)
;

Expand Down
18 changes: 4 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,23 @@ php:
- 7.3
- 7.4

env:
- DB=mysql
- DB=sqlite
- DB=pgsql

before_install:
- if [[ $DB == 'mysql' ]]; then sudo systemctl start mysql && mysql -u root -e 'select version()'; fi
- if [[ $DB == 'pgsql' ]]; then sudo systemctl start postgresql && psql -U postgres -c 'SHOW SERVER_VERSION'; fi
- composer self-update

install:
- COMPOSER_MEMORY_LIMIT=-1 composer update $COMPOSER_FLAGS --prefer-dist

before_script:
- if [ $(phpenv version-name) = "7.3" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
- if [ $(phpenv version-name) = "7.3" ]; then chmod +x ./cc-test-reporter; fi
- if [ $(phpenv version-name) = "7.3" ]; then ./cc-test-reporter before-build; fi
- phpenv config-rm xdebug.ini
- pecl install pcov

script:
- if [ $(phpenv version-name) = "7.2" ]; then ./vendor/bin/phpunit -c tests/travis/$DB.travis.xml --disable-coverage; fi
- if [ $(phpenv version-name) = "7.3" ]; then php -d pcov.enabled=1 ./vendor/bin/phpunit -c tests/travis/$DB.travis.xml --coverage-clover clover.xml; fi
- if [ $(phpenv version-name) = "7.4" ]; then ./vendor/bin/phpunit -c tests/travis/$DB.travis.xml --disable-coverage; fi
- if [ $(phpenv version-name) = "7.2" ]; then ./vendor/bin/phpunit --disable-coverage; fi
- if [ $(phpenv version-name) = "7.3" ]; then ./vendor/bin/phpunit --disable-coverage; fi
- if [ $(phpenv version-name) = "7.4" ]; then php -d pcov.enabled=1 ./vendor/bin/phpunit --coverage-clover clover.xml; fi

after_script:
- if [ $(phpenv version-name) = "7.3" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
- if [ $(phpenv version-name) = "7.4" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then bash <(curl -s https://codecov.io/bash); fi

jobs:
fast_finish: true
Loading