Closed kingkero closed 8 years ago
I have the same thing, anyone can help?
php bin/console braincrafted:bootstrap:generate
assetic:
filters:
less:
node: /usr/local/bin/node
node_paths: [/usr/local/lib/node_modules]
apply_to: '\.less$'
cssrewrite: ~
assets:
bootstrap_css:
inputs:
- "%kernel.root_dir%/../web/less/bootstrap.less"
filters:
- less
- cssrewrite
output: "css/style.css"
braincrafted_bootstrap:
auto_configure:
assetic: false
assets_dir: "%kernel.root_dir%/../web/vendor/bootstrap"
css_preprocessor: less
icon_prefix: fa
fontawesome_dir: "%kernel.root_dir%/../web/vendor/font-awesome"
fonts_dir: "%kernel.root_dir%/../web/vendor/bootstrap/fonts"
auto_configure:
assetic: true
twig: true
knp_menu: true
knp_paginator: true
customize:
variables_file: "%kernel.root_dir%/../web/less/variable.less"
bootstrap_output: "%kernel.root_dir%/../web/less/bootstrap.less"
Thanks
Same here.
bin/console braincrafted:bootstrap:generate
Found custom variables file. Generating...
PHP Fatal error: Call to undefined method appDevDebugProjectContainer::enterScope() in /home/eric/nobackup/bytes/bytes-web/vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Command/GenerateCommand.php on line 108
Fatal error: Call to undefined method appDevDebugProjectContainer::enterScope() in /home/eric/nobackup/bytes/bytes-web/vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Command/GenerateCommand.php on line 108
[Symfony\Component\Debug\Exception\UndefinedMethodException]
Attempted to call an undefined method named "enterScope" of class "appDevDebugProjectContainer".
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"symfony/assetic-bundle": "^2.8",
"symfony/twig-bundle": "^3.0",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"friendsofsymfony/user-bundle":"~2.0.0-dev",
"knplabs/knp-menu-bundle": "^2.1",
"braincrafted/bootstrap-bundle": "dev-master",
"twbs/bootstrap": "3.2.*",
"jquery/jquery": "1.11.*",
"twig/twig": "^1.24"
},
using dev-master, also tried with v2.1.*
For me the fix (although temporary of course) was changing line 107 of GenerateCommand.php from
if (Kernel::VERSION_ID >= 20500) {
to
if (Kernel::VERSION_ID >= 20500 && Kernel::VERSION_ID < 30000) {
Was enough to at least get me back to developing.
@sikofitt thanks, it's a dirty solution but now I can work.
I had to comment entire if, my VERSION_ID = 30006;
cause symfony update:
Line 107 in vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Command/GenerateCommand.php
if (Kernel::VERSION_ID >= 20500) {
//$container->enterScope('request');
//$container->set('request', new Request(), 'request');
}
composer.json
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"symfony/intl": "^3.0",
"braincrafted/bootstrap-bundle": "dev-master",
"vectorface/whip": "^0.3.1",
"symfony/assetic-bundle": "^2.8",
"symfony/translation": "^3.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
Thanks again
Same here also - same issue but from running on windows so only thing different from above in config.yml is path for assetic node and node_paths. Symfony 3
I wanted to add a custom variables.less. However,
braincrafted:bootstrap:generate
returns this errorI use braincrafted/bootstrap-bundle v2.2.0, twbs/bootstrap v3.3.6, symfony/assetic-bundle v2.8.0 config as follows
(I know getting started suggests to use
apply_to: "\.less$"
, this will breakassetic:dump
whereasapply_to: "\\.less$"
does work fine for me). I tried with multiple variables.less files, also copied the bootstrap.less from twbs, none changed a thing.Complete error message/trace