Skip to content

Commit b905d3c

Browse files
authored
Merge pull request #73 from getsentry/stable-release
Preparations for stable release
2 parents c2493d7 + 689553c commit b905d3c

23 files changed

+776
-962
lines changed

.php_cs

Lines changed: 77 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,79 @@
11
<?php
22

3-
$finder = Symfony\CS\Finder\DefaultFinder::create()
4-
->in(__DIR__ . '/src')
5-
->in(__DIR__ . '/test');
6-
7-
return Symfony\CS\Config\Config::create()
8-
->setUsingCache(true)
9-
->setUsingLinter(true)
10-
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
11-
->fixers(array(
12-
'-psr0',
13-
))
14-
->finder($finder);
3+
$config = PhpCsFixer\Config::create();
4+
$config->setRiskyAllowed(true);
5+
$config->setRules([
6+
'@PSR2' => true,
7+
'array_syntax' => [
8+
'syntax' => 'short',
9+
],
10+
'binary_operator_spaces' => [
11+
'align_double_arrow' => false,
12+
'align_equals' => false,
13+
],
14+
'blank_line_after_namespace' => true,
15+
'blank_line_after_opening_tag' => true,
16+
'blank_line_before_statement' => ['statements' => ['return']],
17+
'concat_space' => ['spacing' => 'one'],
18+
'function_typehint_space' => true,
19+
'lowercase_cast' => true,
20+
'method_separation' => true,
21+
'native_function_casing' => true,
22+
'new_with_braces' => true,
23+
'no_empty_comment' => true,
24+
'no_empty_phpdoc' => true,
25+
'no_empty_statement' => true,
26+
'no_extra_consecutive_blank_lines' => [
27+
'tokens' => [
28+
'curly_brace_block',
29+
'extra',
30+
'parenthesis_brace_block',
31+
'square_brace_block',
32+
'throw',
33+
'use',
34+
],
35+
],
36+
'no_leading_import_slash' => true,
37+
'no_leading_namespace_whitespace' => true,
38+
'no_multiline_whitespace_around_double_arrow' => true,
39+
'no_short_bool_cast' => true,
40+
'no_singleline_whitespace_before_semicolons' => true,
41+
'no_trailing_comma_in_singleline_array' => true,
42+
'no_unneeded_control_parentheses' => true,
43+
'no_unused_imports' => true,
44+
'no_whitespace_before_comma_in_array' => true,
45+
'no_whitespace_in_blank_line' => true,
46+
'normalize_index_brace' => true,
47+
'not_operator_with_successor_space' => true,
48+
'object_operator_without_whitespace' => true,
49+
'ordered_imports' => true,
50+
'php_unit_construct' => true,
51+
'php_unit_dedicate_assert' => true,
52+
'phpdoc_single_line_var_spacing' => true,
53+
'phpdoc_trim' => true,
54+
'pre_increment' => true,
55+
'psr4' => true,
56+
'random_api_migration' => true,
57+
'self_accessor' => true,
58+
'short_scalar_cast' => true,
59+
'single_blank_line_before_namespace' => true,
60+
'single_class_element_per_statement' => true,
61+
'single_quote' => true,
62+
'space_after_semicolon' => true,
63+
'standardize_not_equals' => true,
64+
'ternary_operator_spaces' => true,
65+
'trailing_comma_in_multiline_array' => true,
66+
'trim_array_spaces' => true,
67+
'unary_operator_spaces' => true,
68+
'whitespace_after_comma_in_array' => true,
69+
]);
70+
71+
$finder = PhpCsFixer\Finder::create();
72+
$finder->in([
73+
'src',
74+
'test',
75+
]);
76+
77+
$config->setFinder($finder);
78+
79+
return $config;

.travis.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,47 @@
11
language: php
22
sudo: false
3+
dist: trusty
34

45
php:
5-
- 5.3
6-
- 5.4
7-
- 5.5
86
- 5.6
97
- 7.0
108
- 7.1
119
- 7.2
12-
- hhvm
13-
14-
matrix:
15-
include:
16-
- php: 5.3
17-
env: COMPOSER_OPTIONS="--prefer-lowest"
18-
- php: 7.0
19-
env: COMPOSER_OPTIONS="--prefer-lowest"
20-
- php: 7.1
21-
env: TEST_COVERAGE=true
22-
allow_failures:
23-
- php: hhvm
24-
fast_finish: true
2510

2611
cache:
2712
directories:
2813
- $HOME/.composer/cache/files
2914

3015
before_install:
3116
- composer self-update
32-
- if [[ $TEST_COVERAGE ]]; then PHPUNIT_FLAGS="--coverage-clover clover.xml"; fi
17+
- composer global require hirak/prestissimo
18+
- if [[ $TRAVIS_PHP_VERSION = '7.2' ]]; then composer remove --dev friendsofphp/php-cs-fixer --no-update --no-interaction; fi
3319

34-
install: travis_retry composer update --no-interaction --prefer-dist --prefer-stable $COMPOSER_OPTIONS
20+
install: travis_wait travis_retry composer update --no-interaction --prefer-dist --prefer-stable $COMPOSER_OPTIONS
3521

3622
script:
37-
- vendor/bin/phpunit -v $PHPUNIT_FLAGS
38-
- vendor/bin/php-cs-fixer fix --config-file=.php_cs --verbose --diff --dry-run
23+
- vendor/bin/phpunit -v
3924

40-
after_success:
41-
- if [[ $TEST_COVERAGE ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi
25+
jobs:
26+
include:
27+
- stage: test
28+
php: 5.6
29+
env: COMPOSER_OPTIONS="--prefer-lowest"
30+
- stage: Test
31+
php: 7.0
32+
env: COMPOSER_OPTIONS="--prefer-lowest"
33+
- stage: codestyle and SCA
34+
php: 7.1
35+
script:
36+
- phpenv config-rm xdebug.ini
37+
- composer require --dev phpstan/phpstan symfony/expression-language --no-interaction --prefer-dist --prefer-stable
38+
- vendor/bin/phpstan analyse src --level 7
39+
env: PHPSTAN=true
40+
- script: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
41+
env: CS-FIXER=true
42+
- stage: coverage
43+
php: 7.1
44+
script:
45+
- phpdbg -qrr vendor/bin/phpunit --coverage-clover clover.xml
46+
after_success:
47+
- vendor/bin/ocular code-coverage:upload --format=php-clover clover.xml --revision=$TRAVIS_COMMIT

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,37 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
9+
## 1.0.0 - [Unreleased]
810
### Added
911
- Add official support to PHP 7.2 (#71)
12+
### Changed
13+
- Changed source folder from `src/Sentry/SentryBundle` to just `src/` (thanks to PSR-4 and Composer this doesn't affect you)
14+
- Re-sort the constructor's arguments of `ExceptionListener`
15+
- The `SentrySymfonyClient` is no longer an optional argument of `ExceptionListener`; it's now required
1016
### Fixed
1117
- Remove usage of create_function to avoid deprecations (#71)
18+
- Fix a possible bug that could make Sentry crash if an error is triggered before loading a console command
19+
### Removed
20+
- Drop deprecated fields from configuration; the same options can be used (since 0.8.3) under `sentry.options`
21+
- Dropped the third argument from the `SentrySymfonyClient` constructor; `error_types` are now fetched from the second argument, the options array
22+
- Remove support for PHP versions lower than 5.6, since they are now EOL
23+
- Remove support for HHVM
24+
25+
## 0.8.6 - 2017-08-24
26+
### Changed
27+
- Migrate service definitions to non-deprecated option configuration values
28+
### Fixed
29+
- Fix expected type of the `options.error_types` config value (scalar instead of array, discovered in #72)
30+
- Fix handling of deprecated options value
31+
32+
## 0.8.5 - 2017-08-22
33+
### Fixed
34+
- `trim()` DSN value from config, to avoid issues with .env files on BitBucket (see https://github.com/getsentry/sentry-symfony/pull/21#issuecomment-323673938)
35+
36+
## 0.8.4 - 2017-08-08
37+
### Fixed
38+
- Fix exception being thrown when both deprecated and new options are used.
1239

1340
## 0.8.3 - 2017-08-07
1441
### Changed

composer.json

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,34 @@
99
{
1010
"name": "David Cramer",
1111
"email": "dcramer@gmail.com"
12+
},
13+
{
14+
"name": "Alessandro Lai",
15+
"email": "alessandro.lai85@gmail.com"
1216
}
1317
],
18+
"config": {
19+
"sort-packages": true
20+
},
1421
"require": {
15-
"php": ">=5.3.3",
16-
"sentry/sentry": ">=1.5.0",
22+
"php": "^5.6|^7.0",
23+
"sentry/sentry": "^1.7",
1724
"symfony/config": "^2.7|^3.0",
1825
"symfony/console": "^2.7|^3.0",
1926
"symfony/dependency-injection": "^2.7|^3.0",
2027
"symfony/event-dispatcher": "^2.7|^3.0",
2128
"symfony/http-kernel": "^2.7|^3.0",
22-
"symfony/security-core": "^2.7|^3.0"
29+
"symfony/security-core": "^2.7|^3.0",
30+
"symfony/yaml": "^2.7|^3.0"
2331
},
2432
"require-dev": {
25-
"friendsofphp/php-cs-fixer": "^1.8.0",
26-
"phpunit/phpunit": "^4.6.6"
33+
"friendsofphp/php-cs-fixer": "^2.5",
34+
"phpunit/phpunit": "^5.7|^6.0",
35+
"scrutinizer/ocular": "^1.4"
2736
},
2837
"autoload": {
2938
"psr-4" : {
30-
"Sentry\\SentryBundle\\": "src/Sentry/SentryBundle"
39+
"Sentry\\SentryBundle\\": "src/"
3140
}
3241
},
3342
"autoload-dev": {
@@ -37,7 +46,7 @@
3746
},
3847
"extra": {
3948
"branch-alias": {
40-
"dev-master": "0.8.x-dev"
49+
"dev-master": "1.0.x-dev"
4150
}
4251
}
4352
}

examples/symfony-3/bin/symfony_requirements

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4-
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
4+
require_once __DIR__ .'/../var/SymfonyRequirements.php';
55

66
$lineSize = 70;
77
$symfonyRequirements = new SymfonyRequirements();

examples/symfony-3/web/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
exit('This script is only accessible from localhost.');
2323
}
2424

25-
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
25+
require_once __DIR__ .'/../var/SymfonyRequirements.php';
2626

2727
$symfonyRequirements = new SymfonyRequirements();
2828

phpunit.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@
1212
</testsuite>
1313
</testsuites>
1414

15+
<filter>
16+
<whitelist>
17+
<directory>./src</directory>
18+
</whitelist>
19+
</filter>
1520
</phpunit>

0 commit comments

Comments
 (0)