[WebProfilerBundle] Fixed js escaping in time.html.twig
bug #9643 [WebProfilerBundle] Fixed js escaping in time.html.twig (hason)

This PR was merged into the 2.2 branch.

Discussion
----------

[WebProfilerBundle] Fixed js escaping in time.html.twig

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

For some event names I received the JavaScript error: ```Uncaught SyntaxError: Unexpected token ILLEGAL```

Commits
-------

4828350 [WebProfilerBundle] Fixed js escaping in time.html.twig
use the correct class name to retrieve mapped class' metadata and repository
Fix `extract` method to avoid recalculating count() for each iteration.

Cache the value of `count($attributes)` to avoid recalculating it for each iteration of the loop.

Since this count will never change during the method execution, this change make the code a bit more efficient.
minor #9651 Fix `extract` method to avoid recalculating count() for each iteration. (fabpot)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9651).

Discussion
----------

Fix `extract` method to avoid recalculating count() for each iteration.

This PR was submitted on the symfony/DomCrawler read-only repository and moved automatically to the main Symfony repository (closes symfony/DomCrawler#16).

Cache the value of `count($attributes)` to avoid recalculating it for each iteration of the loop.

Since this count will never change during the method execution, this change make the code a bit more efficient.

Commits
-------

9ababf4 Fix `extract` method to avoid recalculating count() for each iteration.
bug #9647 use the correct class name to retrieve mapped class' metadata and reposi... (xabbuh)

This PR was merged into the 2.2 branch.

Discussion
----------

use the correct class name to retrieve mapped class' metadata and reposi...

...tory

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9646
| License       | MIT
| Doc PR        |

The validation context isn't necessarily the entity being validated. In case that you added the Unique Entity constraint inside your custom type via the ``constraints`` option the validation context will be the ``Form`` class itself. Thus, not the validation context should be used to get the class metadata and the repository of the validated entity, but the entity itself should be used.

Commits
-------

cd4df11 use the correct class name to retrieve mapped class' metadata and repository
[DoctrineBridge] normalized class names in the ORM type guesser
bug #9656 [DoctrineBridge] normalized class names in the ORM type guesser (fabpot)

This PR was merged into the 2.2 branch.

Discussion
----------

[DoctrineBridge] normalized class names in the ORM type guesser

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5837
| License       | MIT
| Doc PR        | n/a

Commits
-------

a1b9c2e [DoctrineBridge] normalized class names in the ORM type guesser
removed observer pattern, in favour of mediator
[EventDispatcher] tweaked README
minor #9661 Removed observer pattern, in favour of mediator (fabpot)

This PR was merged into the 2.2 branch.

Discussion
----------

Removed observer pattern, in favour of mediator

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | *
| Fixed tickets | #9344

I don't think this is the best tool to implement the observer pattern.

I just have copied the sentence from:
https://github.com/symfony/symfony-docs/edit/2.3/components/event_dispatcher/introduction.rst

but maybe could be improved with something like:

"Symfony Event Dispatcher is a tool that allows to make your projects truly extensible, facilitating the implementation of Mediator pattern and Publish subscribe pattern"

[edit-1]
I think this could be modified also here:
https://github.com/symfony/symfony-marketing/edit/master/views/en/get_started/components.html.twig

Commits
-------

ab3e231 [EventDispatcher] tweaked README
b9ad62e removed observer pattern, in favour of mediator