Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Symfony 5 #5

Open
mdawart opened this issue Sep 15, 2021 · 2 comments
Open

Compatibility with Symfony 5 #5

mdawart opened this issue Sep 15, 2021 · 2 comments

Comments

@mdawart
Copy link
Contributor

mdawart commented Sep 15, 2021

Symfony 5.3.6
Environment dev
Debug enabled
PHP version7.4.21

ArgumentCountError {#1571
  #message: "Too few arguments to function Symfony\Component\Config\Definition\Builder\TreeBuilder::__construct(), 0 passed in [local path]/vendor/manasbala/doctrine-log-bundle/src/DependencyInjection/Configuration.php on line 19 and at least 1 expected"
  #code: 0
  #file: "./vendor/symfony/config/Definition/Builder/TreeBuilder.php"
  #line: 26
  trace: {
    ./vendor/symfony/config/Definition/Builder/TreeBuilder.php:26 { …}
    ./vendor/manasbala/doctrine-log-bundle/src/DependencyInjection/Configuration.php:19 { …}
    ./vendor/symfony/config/Definition/Processor.php:50 { …}
    ./vendor/symfony/dependency-injection/Extension/Extension.php:111 { …}
    ./vendor/manasbala/doctrine-log-bundle/src/DependencyInjection/MbDoctrineLogExtension.php:26 { …}
    ./vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php:76 { …}
    ./vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php:39 { …}
    ./vendor/symfony/dependency-injection/Compiler/Compiler.php:91 { …}
    ./vendor/symfony/dependency-injection/ContainerBuilder.php:744 { …}
    ./vendor/symfony/http-kernel/Kernel.php:545 { …}
    ./vendor/symfony/http-kernel/Kernel.php:786 { …}
    ./vendor/symfony/http-kernel/Kernel.php:125 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:168 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:74 { …}
    ./vendor/symfony/console/Application.php:167 { …}
    ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:56 { …}
    ./vendor/autoload_runtime.php:35 { …}
    ./bin/console:11 {
      › 
      › require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
      › 
      arguments: {
        "[local path]/vendor/autoload_runtime.php"
      }
    }
  }
}

This is because Symfony\Component\Config\Definition\Builder\TreeBuilder is modified.

I'll add a fix I found here KnpLabs/DoctrineBehaviors#431

@Fabian-Heinrich
Copy link

Symfony: 5.3.12
Enviroment: Dev
Debug: enabled
PHP version: 8.0.14

Fork: https://github.com/Fabian-Heinrich/doctrine-log-bundle
composer.json: compose.json as txt

This bundle looks nice and i really want to use it in a project with Symfony 5.3.12 and PHP 8. Using composer i required a fork implementing the here mentioned changes in src/DependencyInjection/Configuration.php.

I was not enable to get this bundle to work. The bundle was enabled correctly in bundles.php. I created the table mb_entity_log. Then I added the @Loggable annotation to my entitites. Creating, updating or deleting entities doesn't create any entries in mb_entity_log.
In addition breakpoints set on the first line of each function in src\EventListener\Logger.php aren't trigged on creating, updating or deleting entities.

@BooleanType
Copy link

Symfony: 5.3.12 Enviroment: Dev Debug: enabled PHP version: 8.0.14

Fork: https://github.com/Fabian-Heinrich/doctrine-log-bundle composer.json: compose.json as txt

This bundle looks nice and i really want to use it in a project with Symfony 5.3.12 and PHP 8. Using composer i required a fork implementing the here mentioned changes in src/DependencyInjection/Configuration.php.

I was not enable to get this bundle to work. The bundle was enabled correctly in bundles.php. I created the table mb_entity_log. Then I added the @Loggable annotation to my entitites. Creating, updating or deleting entities doesn't create any entries in mb_entity_log. In addition breakpoints set on the first line of each function in src\EventListener\Logger.php aren't trigged on creating, updating or deleting entities.

Same for me, it doesn't work at all: no entries in mb_entity_log.
My Symfony version is 5.3.16, PHP version is 7.4.33.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants