Skip to content

Commit 2731967

Browse files
committed
Merge remote-tracking branch 'origin/4.4' into 4.4
* origin/4.4: (23 commits) Use .yaml instead of .yml Show DomCrawler results consistent Update mailer.rst auth_basic is a scalar type Update mailer.rst Remvove space before self-closing xml tag Update symfony 4 project structure fixes missing "use" declaration for the ClockMock Clarifying that you can't override real env vars [HttpClient] Documented the cancel() method Fixed typos fix constraint reference YAML config syntax [HttpClient] improve doc again Fixing docs about switch_user and custom voters [Mailer] Sort providers alphabetically Reword Typo Remove chrome debug since it's no longer present fix(DI): service name Fix several typos ...
2 parents 6925804 + 4027518 commit 2731967

File tree

18 files changed

+363
-164
lines changed

18 files changed

+363
-164
lines changed

bundles/best_practices.rst

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -306,26 +306,15 @@ following standardized instructions in your ``README.md`` file.
306306
### Step 2: Enable the Bundle
307307
308308
Then, enable the bundle by adding it to the list of registered bundles
309-
in the `app/AppKernel.php` file of your project:
309+
in the `config/bundles.php` file of your project:
310310
311311
```php
312-
// app/AppKernel.php
313-
314-
// ...
315-
class AppKernel extends Kernel
316-
{
317-
public function registerBundles()
318-
{
319-
$bundles = [
320-
// ...
321-
new <vendor>\<bundle-name>\<bundle-long-name>(),
322-
];
323-
324-
// ...
325-
}
312+
// config/bundles.php
326313
314+
return [
327315
// ...
328-
}
316+
<vendor>\<bundle-name>\<bundle-long-name>::class => ['all' => true],
317+
];
329318
```
330319
331320
.. code-block:: rst
@@ -362,26 +351,14 @@ following standardized instructions in your ``README.md`` file.
362351
~~~~~~~~~~~~~~~~~~~~~~~~~
363352
364353
Then, enable the bundle by adding it to the list of registered bundles
365-
in the ``app/AppKernel.php`` file of your project::
366-
367-
// app/AppKernel.php
368-
369-
// ...
370-
class AppKernel extends Kernel
371-
{
372-
public function registerBundles()
373-
{
374-
$bundles = [
375-
// ...
376-
377-
new <vendor>\<bundle-name>\<bundle-long-name>(),
378-
];
354+
in the ``config/bundles.php`` file of your project::
379355
380-
// ...
381-
}
356+
// config/bundles.php
382357
358+
return [
383359
// ...
384-
}
360+
<vendor>\<bundle-name>\<bundle-long-name>::class => ['all' => true],
361+
];
385362
386363
.. _`installation chapter`: https://getcomposer.org/doc/00-intro.md
387364

components/dom_crawler.rst

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -362,30 +362,34 @@ This behavior is best illustrated with examples::
362362
$crawler->addHtmlContent($html);
363363

364364
$crawler->filterXPath('//span[contains(@id, "article-")]')->evaluate('substring-after(@id, "-")');
365-
/* array:3 [
366-
0 => "100"
367-
1 => "101"
368-
2 => "102"
369-
]
365+
/* Result:
366+
[
367+
0 => '100',
368+
1 => '101',
369+
2 => '102',
370+
];
370371
*/
371372

372373
$crawler->evaluate('substring-after(//span[contains(@id, "article-")]/@id, "-")');
373-
/* array:1 [
374-
0 => "100"
374+
/* Result:
375+
[
376+
0 => '100',
375377
]
376378
*/
377379

378380
$crawler->filterXPath('//span[@class="article"]')->evaluate('count(@id)');
379-
/* array:3 [
380-
0 => 1.0
381-
1 => 1.0
382-
2 => 1.0
381+
/* Result:
382+
[
383+
0 => 1.0,
384+
1 => 1.0,
385+
2 => 1.0,
383386
]
384387
*/
385388

386389
$crawler->evaluate('count(//span[@class="article"])');
387-
/* array:1 [
388-
0 => 3.0
390+
/* Result:
391+
[
392+
0 => 3.0,
389393
]
390394
*/
391395

0 commit comments

Comments
 (0)