Skip to content
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"require": {
"php": ">=5.3.3",
"sentry/sentry": ">=1.2.0",
"sentry/sentry": ">=1.5.0",
"symfony/symfony": ">=2.4.0"
},
"require-dev": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function getConfigTreeBuilder()
$rootNode
->children()
->scalarNode('app_path')
->defaultValue('%kernel.root_dir%')
->defaultValue('%kernel.root_dir%/..')
->end()
->scalarNode('client')
->defaultValue('Sentry\SentryBundle\SentrySymfonyClient')
Expand All @@ -50,6 +50,11 @@ public function getConfigTreeBuilder()
->treatNullLike(array())
->defaultValue(array('%kernel.root_dir%/..'))
->end()
->arrayNode('excluded_app_paths')
->prototype('scalar')->end()
->treatNullLike(array())
->defaultValue(array('%kernel.root_dir%/../vendor'))
->end()
->end()
;

Expand Down
1 change: 1 addition & 0 deletions src/Sentry/SentryBundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
- [setRelease, ['%sentry.release%']]
- [setEnvironment, ['%sentry.environment%']]
- [setAppPath, ['%sentry.app_path%']]
- [setExcludedAppPaths, ['%sentry.excluded_app_paths%']]
- [setPrefixes, ['%sentry.prefixes%']]
- [install, []]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class ExtensionTest extends \PHPUnit_Framework_TestCase
{
const CONFIG_ROOT = 'sentry';

public function test_that_it_uses_kernel_root_as_app_path_by_default()
public function test_that_it_uses_kernel_root_parent_as_app_path_by_default()
{
$container = $this->getContainer();

$this->assertSame(
'kernel/root',
'kernel/root/..',
$container->getParameter('sentry.app_path')
);
}
Expand All @@ -33,6 +33,16 @@ public function test_that_it_uses_app_path_value()
);
}

public function test_vendor_in_default_excluded_paths()
{
$container = $this->getContainer();

$this->assertContains(
'kernel/root/../vendor',
$container->getParameter('sentry.excluded_app_paths')
);
}

public function test_that_it_uses_defined_class_as_client_class_by_default()
{
$container = $this->getContainer();
Expand Down