1

I am trying to use twitter bootstrap in my symfony2.7 project. This is the content on my composer.json file:

"require": {   
    ...
    "braincrafted/bootstrap-bundle": "dev-master",
    "leafo/lessphp": "0.4.0",
    "twbs/bootstrap": "3.0.*",
    "jquery/jquery":  "1.11.*"
},

Then I configure assetic as follows:

    lessphp:
         file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php
         apply_to: "\.less$"
    cssrewrite: ~
braincrafted_bootstrap:
    less_filter: lessphp

Then the console response is this one when I do the assetic:dump:

PS D:\Web\job-bid> php app/console assetic:dump --force web

Dumping all dev assets. Debug mode is on.

10:17:49 [file+] web/css/bootstrap.css [Exception] Failed to assign arg @list: line: 50

assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [--] [] PS D:\Web\job-bid

What could the problem be?

Edit: Well I have changed to the latest version of bootstrap 2 and it gives me a different error:

PS D:\Web\job-bid> php app/console assetic:dump web --force Dumping all dev assets. Debug mode is on.

16:43:18 [file+] web/css/bootstrap.css 16:43:19 [file+] web/css/bootstrap_bootstrap_1.css 16:43:21 [file+] web/css/bootstrap_form_2.css 16:43:21 [file+] web/js/bootstrap.js

[RuntimeException] The source file "D:\Web\job-bid\app/../vendor/twbs/bootstrap/js/transition.js" does not exist.

assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [--] []

PS D:\Web\job-bid>

1 Answer 1

0

AFAIK http://leafo.net/lessphp/ is not compatible with Boostrap 3 > 3.0.0, see https://github.com/leafo/lessphp/issues/503

see this more complete answer: https://stackoverflow.com/a/20914166/4989952

Sign up to request clarification or add additional context in comments.

1 Comment

You should also update the BootstrapBundle version. Check bundle compaibility section, you should use v1.4.* with bootstrap 2, not dev-master.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.