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 .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.* export-ignore
/Tests export-ignore
/tests export-ignore
/phpunit.xml.dist export-ignore
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Unreleased

## 3.11.0 unreleased

* Reorganize files to match the "Reusable Bundles" structure
* Migrate services configuration to PHP

## 3.10.0 (2023-11-06)

* Add configuration support for SamplingHandler
Expand Down
11 changes: 3 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@
"symfony/yaml": "^5.4 || ^6.0 || ^7.0"
},
"autoload": {
"psr-4": { "Symfony\\Bundle\\MonologBundle\\": "" },
"exclude-from-classmap": [
"/Tests/"
]
"psr-4": { "Symfony\\Bundle\\MonologBundle\\": "src" }
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
"autoload-dev": {
"psr-4": { "Symfony\\Bundle\\MonologBundle\\Tests\\": "tests" }
}
}
File renamed without changes.
File renamed without changes.
19 changes: 6 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit colors="true" bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="MonologBundle for the Symfony Framework">
<directory>./Tests</directory>
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>.</directory>
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
<coverage>
<include>
<directory>./src/</directory>
</include>
</coverage>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function load(array $configs, ContainerBuilder $container)
$config = $this->processConfiguration($configuration, $configs);

if (isset($config['handlers'])) {
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../config'));
$loader->load('monolog.php');

if (!class_exists(DebugLoggerConfigurator::class)) {
Expand Down Expand Up @@ -149,7 +149,7 @@ public function load(array $configs, ContainerBuilder $container)
*/
public function getXsdValidationBasePath()
{
return __DIR__.'/../Resources/config/schema';
return __DIR__.'/../../config/schema';
}

public function getNamespace()
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testHandlerProcessors()
public function testFailureOnHandlerWithoutPushProcessor()
{
$container = new ContainerBuilder();
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../Resources/config'));
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../config'));
$loader->load('monolog.php');

$service = new Definition(NullHandler::class);
Expand All @@ -68,7 +68,7 @@ public function testFailureOnHandlerWithoutPushProcessor()
protected function getContainer()
{
$container = new ContainerBuilder();
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../Resources/config'));
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../config'));
$loader->load('monolog.php');

$definition = $container->getDefinition('monolog.logger_prototype');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function testChannelsConfigurationOptionSupportsAppChannel()
private function getContainer()
{
$container = new ContainerBuilder();
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../Resources/config'));
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../config'));
$loader->load('monolog.php');
$definition = $container->getDefinition('monolog.logger_prototype');
$container->set('monolog.handler.test', new Definition('%monolog.handler.null.class%', [100, false]));
Expand Down Expand Up @@ -189,7 +189,7 @@ private function getContainer()
private function getContainerWithSetter()
{
$container = new ContainerBuilder();
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../Resources/config'));
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../config'));
$loader->load('monolog.php');
$definition = $container->getDefinition('monolog.logger_prototype');
$container->set('monolog.handler.test', new Definition('%monolog.handler.null.class%', [100, false]));
Expand Down Expand Up @@ -222,7 +222,7 @@ private function getFunctionalContainer()
$container->setParameter('monolog.handlers_to_channels', []);
$container->setParameter('monolog.use_microseconds', true);

$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../Resources/config'));
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../../../config'));
$loader->load('monolog.php');

$container->addCompilerPass(new LoggerChannelPass());
Expand Down