8000 Merge branch '4.0' into 4.1 · symfony/symfony-docs@4924ac3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4924ac3

Browse files
committed
Merge branch '4.0' into 4.1
* 4.0: Update bootstrap.rst Fix PHPUnit versions
2 parents 339cb7c + 7566c54 commit 4924ac3

File tree

2 files changed

+17
-46
lines changed

2 files changed

+17
-46
lines changed

components/phpunit_bridge.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ its ``bin/simple-phpunit`` command. It has the following features:
448448

449449
* Does not embed ``symfony/yaml`` nor ``prophecy`` to prevent any conflicts with
450450
these dependencies;
451-
* Uses PHPUnit 4.8 when run with PHP <=5.5 and PHPUnit 5.3 when run with PHP >=5.6;
451+
* Uses PHPUnit 4.8 when run with PHP <=5.5, PHPUnit 5.7 when run with PHP >=5.6
452+
and PHPUnit 6.5 when run with PHP >=7.2;
452453
* Collects and replays skipped tests when the ``SYMFONY_PHPUNIT_SKIPPED_TESTS``
453454
env var is defined: the env var should specify a file name that will be used for
454455
storing skipped tests on a first run, and replay them on the second run;

frontend/encore/bootstrap.rst

Lines changed: 15 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Using Bootstrap CSS & JS
2-
========================
2+
============================
33

44
Want to use Bootstrap (or something similar) in your project? No problem!
55
First, install it. To be able to customize things further, we'll install
6-
``bootstrap-sass``:
6+
``bootstrap``:
77

88
.. code-block:: terminal
99
10-
$ yarn add bootstrap-sass --dev
10+
$ yarn add bootstrap --dev
1111
12-
Importing Bootstrap Sass
13-
------------------------
12+
Importing Bootstrap Styles
13+
--------------------------
1414

15-
Now that ``bootstrap-sass`` lives in your ``node_modules`` directory, you can
15+
Now that ``bootstrap`` lives in your ``node_modules/`` directory, you can
1616
import it from any Sass or JavaScript file. For example, if you already have
1717
a ``global.scss`` file, import it from there:
1818

@@ -21,46 +21,18 @@ a ``global.scss`` file, import it from there:
2121
// assets/css/global.scss
2222
2323
// customize some Bootstrap variables
24-
$brand-primary: darken(#428bca, 20%);
24+
$primary: darken(#428bca, 20%);
2525
2626
// the ~ allows you to reference things in node_modules
27-
@import '~bootstrap-sass/assets/stylesheets/bootstrap';
27+
@import "~bootstrap/scss/bootstrap";
2828
29-
That's it! This imports the ``node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss``
29+
That's it! This imports the ``node_modules/bootstrap/scss/bootstrap.scss``
3030
file into ``global.scss``. You can even customize the Bootstrap variables first!
3131

3232
.. tip::
3333

3434
If you don't need *all* of Bootstrap's features, you can include specific files
35-
in the ``bootstrap`` directory instead - e.g. ``~bootstrap-sass/assets/stylesheets/bootstrap/alerts``.
36-
37-
After including ``bootstrap-sass``, your Webpack builds might become slow. To fix
38-
this, you can use the ``resolveUrlLoader`` option:
39-
40-
.. code-block:: diff
41-
42-
// webpack.config.js
43-
Encore
44-
+ .enableSassLoader(function(sassOptions) {}, {
45-
+ resolveUrlLoader: false
46-
+ })
47-
;
48-
49-
This disables the ``resolve-url-loader`` in Webpack, which means that any
50-
``url()`` paths in your Sass files must now be relative to the original source
51-
entry file instead of whatever file you're inside of (see `Problems with url()`_).
52-
To load Bootstrap, you'll need to override the path to its icons:
53-
54-
.. code-block:: diff
55-
56-
// assets/css/global.scss
57-
58-
+ $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
59-
60-
+ // set if you're also including font-awesome
61-
+ // $fa-font-path: "~font-awesome/fonts";
62-
63-
@import '~bootstrap-sass/assets/stylesheets/bootstrap';
35+
in the ``bootstrap`` directory instead - e.g. ``~bootstrap/scss/alert``.
6436

6537
Importing Bootstrap JavaScript
6638
------------------------------
@@ -86,16 +58,16 @@ variable. Now, require bootstrap from any of your JavaScript files:
8658

8759
.. code-block:: javascript
8860
89-
// main.js
61+
// app.js
9062
91-
var $ = require('jquery');
63+
const $ = require('jquery');
9264
// JS is equivalent to the normal "bootstrap" package
9365
// no need to set this to a variable, just require it
94-
require('bootstrap-sass');
66+
require('bootstrap');
9567
9668
// or you can include specific pieces
97-
// require('bootstrap-sass/javascripts/bootstrap/tooltip');
98-
// require('bootstrap-sass/javascripts/bootstrap/popover');
69+
// require('bootstrap/js/dist/tooltip');
70+
// require('bootstrap/js/dist/popover');
9971
10072
$(document).ready(function() {
10173
$('[data-toggle="popover"]').popover();
@@ -113,5 +85,3 @@ plugins in a similar way:
11385
// require 2 CSS files needed
11486
require('bootstrap-star-rating/css/star-rating.css');
11587
require('bootstrap-star-rating/themes/krajee-svg/theme.css');
116-
117-
.. _`Problems with url()`: https://github.com/webpack-contrib/sass-loader#problems-with-url

0 commit comments

Comments
 (0)
0