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>

wti
  • 494
  • 4
  • 19

1 Answers1

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

Community
  • 1
  • 1
Yassine Guedidi
  • 1,695
  • 11
  • 12
  • You should also update the BootstrapBundle version. Check [bundle compaibility section](https://github.com/braincrafted/bootstrap-bundle#compatibility), you should use v1.4.* with bootstrap 2, not dev-master. – Yassine Guedidi Jul 28 '15 at 14:59