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

Too few arguments to function Symfony\Component\Config\Definition\Builder\TreeBuilder::__construct() #95

Open
smilesrg opened this issue Dec 14, 2022 · 2 comments

Comments

@smilesrg
Copy link

With symfony/config v5.4.11 such error happens:

!!  ArgumentCountError {#16254
!!    #message: "Too few arguments to function Symfony\Component\Config\Definition\Builder\TreeBuilder::__construct(), 0 passed in vendor/pixassociates/sortable-behavior-bundle/Pix/SortableBehaviorBundle/DependencyInjection/Configuration.php on line 30 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/pixassociates/sortable-behavior-bundle/Pix/SortableBehaviorBundle/DependencyInjection/Configuration.php:30 { …}
!!      ./vendor/symfony/config/Definition/Processor.php:46 { …}
!!      ./vendor/symfony/dependency-injection/Extension/Extension.php:111 { …}
!!      ./vendor/pixassociates/sortable-behavior-bundle/Pix/SortableBehaviorBundle/DependencyInjection/PixSortableBehaviorExtension.php:32 { …}
!!      ./vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php:76 { …}
!!      ./vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php:42 { …}
!!      ./vendor/symfony/dependency-injection/Compiler/Compiler.php:82 { …}
!!      ./vendor/symfony/dependency-injection/ContainerBuilder.php:757 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:546 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:787 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:128 { …}
!!      ./vendor/symfony/framework-bundle/Console/Application.php:168 { …}
!!      ./vendor/symfony/framework-bundle/Console/Application.php:74 { …}
!!      ./vendor/symfony/console/Application.php:171 { …}
!!      ./bin/console:43 {
!!        › $application = new SignalableApplication($kernel); // TODO: Remove once migrated to Symfony 5.2
!!        › $application->run($input);
!!        › 
!!        arguments: {
!!          $input: Symfony\Component\Console\Input\ArgvInput {#4 …}
!!        }
!!      }
!!    }
!!  }
@Nincha
Copy link

Nincha commented Dec 17, 2022

Same here. :)

@Nincha
Copy link

Nincha commented Dec 18, 2022

With a little advice of GPT-3 (yea I know, shame on me :p) I could experiment that replacing in \vendor\pixassociates\sortable-behavior-bundle\Pix\SortableBehaviorBundle\DependencyInjection\PixSortableBehaviorExtension.php :

        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('pix_sortable_behavior');

By

        $treeBuilder = new TreeBuilder('pix_sortable_behavior');
        $rootNode = $treeBuilder->getRootNode();

Would resolve access to all the methods in the file (according to IDE), but still throws error:

Attempted to load class "Twig_Extension" from the global namespace. Did you forget a "use" statement?

I won't dig further because everything else would be pure guess, but it case it can help someone who knows best, heh. :)

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

2 participants