Skip to content

Commit 15a0e90

Browse files
authored
Change include defaults (#311)
* Use empty default for in_app_include * Fix related tests * Add changelog entry
1 parent 486c4cd commit 15a0e90

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ 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-
8+
- Change default of `in_app_include` to empty, due to getsentry/sentry-php#958 (#311)
99

1010
## 3.4.2 (2020-01-29)
1111
- Remove space from classname used with `class_alias` (#313)

src/DependencyInjection/Configuration.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ public function getConfigTreeBuilder(): TreeBuilder
7171
->cannotBeEmpty();
7272
$optionsChildNodes->scalarNode('error_types');
7373
$optionsChildNodes->arrayNode('in_app_include')
74-
->defaultValue([
75-
'%kernel.project_dir%/src',
76-
])
74+
->defaultValue([])
7775
->prototype('scalar');
7876
$optionsChildNodes->arrayNode('in_app_exclude')
7977
->defaultValue([

test/DependencyInjection/ConfigurationTest.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ public function testConfigurationDefaults(): void
5454
'options' => [
5555
'class_serializers' => [],
5656
'environment' => '%kernel.environment%',
57-
'in_app_include' => [
58-
'%kernel.project_dir%/src',
59-
],
57+
'in_app_include' => [],
6058
'in_app_exclude' => [
6159
'%kernel.cache_dir%',
6260
'%kernel.project_dir%/vendor',

test/DependencyInjection/SentryExtensionTest.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,11 @@ public function testOptionsDefaultValues(): void
5959
$container = $this->getContainer();
6060
$options = $this->getOptionsFrom($container);
6161

62-
$vendorDir = '/dir/project/root/vendor';
63-
$this->assertContains('/dir/project/root/src', $options->getInAppIncludedPaths());
62+
$this->assertEmpty($options->getInAppIncludedPaths());
6463

6564
$this->assertNull($options->getDsn());
6665
$this->assertSame('test', $options->getEnvironment());
67-
$this->assertSame([realpath('./var/cache'), $vendorDir], $options->getInAppExcludedPaths());
66+
$this->assertSame([realpath('./var/cache'), '/dir/project/root/vendor'], $options->getInAppExcludedPaths());
6867

6968
$this->assertSame(1, $container->getParameter('sentry.listener_priorities.request'));
7069
$this->assertSame(1, $container->getParameter('sentry.listener_priorities.sub_request'));

0 commit comments

Comments
 (0)