diff --git a/.gitignore b/.gitignore index 25fe3e9a..48e8e05b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ package.xml .idea .php_cs.cache docs/_build +var diff --git a/CHANGELOG.md b/CHANGELOG.md index 801d43df..dfc04df9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased - ... +## 3.4.4 (2020-03-16) + - Improve `release` option default value (#325) + ## 3.4.3 (2020-02-03) - Change default of `in_app_include` to empty, due to getsentry/sentry-php#958 (#311) - Improve class_alias robustness (#315) diff --git a/composer.json b/composer.json index f907e6dc..add30202 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,6 @@ "require": { "php": "^7.1", "jean85/pretty-package-versions": "^1.0", - "ocramius/package-versions": "^1.3.0", "sentry/sdk": "^2.1", "symfony/config": "^3.4||^4.0||^5.0", "symfony/console": "^3.4||^4.0||^5.0", diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 198f0394..af1326dc 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -2,6 +2,7 @@ namespace Sentry\SentryBundle\DependencyInjection; +use Jean85\PrettyVersions; use PackageVersions\Versions; use Sentry\Options; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; @@ -111,7 +112,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->prototype('scalar'); $optionsChildNodes->scalarNode('project_root'); $optionsChildNodes->scalarNode('release') - ->defaultValue(Versions::getVersion(Versions::ROOT_PACKAGE_NAME)) + ->defaultValue(PrettyVersions::getVersion(Versions::ROOT_PACKAGE_NAME)->getPrettyVersion()) ->info('Release version to be reported to sentry, see https://docs.sentry.io/workflow/releases/?platform=php') ->example('my/application@ff11bb'); $optionsChildNodes->floatNode('sample_rate') diff --git a/test/DependencyInjection/ConfigurationTest.php b/test/DependencyInjection/ConfigurationTest.php index c0f644de..0c7f6629 100644 --- a/test/DependencyInjection/ConfigurationTest.php +++ b/test/DependencyInjection/ConfigurationTest.php @@ -2,7 +2,7 @@ namespace Sentry\SentryBundle\Test\DependencyInjection; -use PackageVersions\Versions; +use Jean85\PrettyVersions; use Sentry\Options; use Sentry\SentryBundle\DependencyInjection\Configuration; use Sentry\SentryBundle\Test\BaseTestCase; @@ -63,7 +63,7 @@ public function testConfigurationDefaults(): void 'excluded_exceptions' => [], 'prefixes' => $defaultSdkValues->getPrefixes(), 'tags' => [], - 'release' => Versions::getVersion('sentry/sentry-symfony'), + 'release' => PrettyVersions::getVersion('sentry/sentry-symfony')->getPrettyVersion(), ], 'monolog' => [ 'error_handler' => [ diff --git a/test/DependencyInjection/SentryExtensionTest.php b/test/DependencyInjection/SentryExtensionTest.php index c8233e29..e6f5e2f5 100644 --- a/test/DependencyInjection/SentryExtensionTest.php +++ b/test/DependencyInjection/SentryExtensionTest.php @@ -63,7 +63,7 @@ public function testOptionsDefaultValues(): void $this->assertNull($options->getDsn()); $this->assertSame('test', $options->getEnvironment()); - $this->assertSame([realpath('./var/cache'), '/dir/project/root/vendor'], $options->getInAppExcludedPaths()); + $this->assertSame([$container->getParameter('kernel.cache_dir'), '/dir/project/root/vendor'], $options->getInAppExcludedPaths()); $this->assertSame(1, $container->getParameter('sentry.listener_priorities.request')); $this->assertSame(1, $container->getParameter('sentry.listener_priorities.sub_request')); diff --git a/var/cache/.gitignore b/var/cache/.gitignore deleted file mode 100644 index 9daeafb9..00000000 --- a/var/cache/.gitignore +++ /dev/null @@ -1 +0,0 @@ -test