Commit Graph

18932 Commits

Author SHA1 Message Date
Fabien Potencier
17fcdb8cb8 Merge branch '2.5'
* 2.5:
  fix RegisterListenersPass test
2014-10-04 08:08:58 +02:00
Nicolas Grekas
e383a38763 [VarDumper] encode non-ASCII UTF-8 chars as HTML numeric entities 2014-10-03 18:04:15 +02:00
Christian Flothmann
26b619b337 tests for the TranslatorListener 2014-10-03 17:48:46 +02:00
Fabien Potencier
9b2195c17b minor #12113 [WebProfileBundle], [DebugBundle] Fixed big data in toolbar (hason)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[WebProfileBundle], [DebugBundle] Fixed big data in toolbar

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

| Before | After
| --------- | -------
| ![prev-01](https://cloud.githubusercontent.com/assets/288535/4505427/72bd9d08-4af4-11e4-9aed-be4f868c3dfd.png) | ![post-01](https://cloud.githubusercontent.com/assets/288535/4505432/82583746-4af4-11e4-8052-658d4853cfb4.png)
| ![prev-02](https://cloud.githubusercontent.com/assets/288535/4505426/72bd9bb4-4af4-11e4-88ad-1949b6201684.png) | ![post-02](https://cloud.githubusercontent.com/assets/288535/4505431/824fb85a-4af4-11e4-88f5-5e01f907c580.png)

Commits
-------

febe836 [DebugBundle] Removed unnecessary div in toolbar
513d2d3 [WebProfilerBundle] Showed all ajax calls in toolbar
2014-10-03 15:11:31 +02:00
Fabien Potencier
063826d17f minor #12109 [VarDumper] Improved dump in html (hason)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[VarDumper] Improved dump in html

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | http://www.w3.org/TR/html5/dom.html#the-id-attribute
| License       | MIT
| Doc PR        | -

Commits
-------

f214eda [VarDumper] Added unique id for every single dump in html
2014-10-03 14:41:34 +02:00
Martin Hasoň
f214edac76 [VarDumper] Added unique id for every single dump in html 2014-10-03 14:13:48 +02:00
Martin Hasoň
febe8367e0 [DebugBundle] Removed unnecessary div in toolbar 2014-10-03 14:01:35 +02:00
Martin Hasoň
513d2d3d6e [WebProfilerBundle] Showed all ajax calls in toolbar 2014-10-03 14:01:18 +02:00
Fabien Potencier
3da6fc22c6 feature #12081 [FrameworkBundle] enable ErrorHandler in prod (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] enable ErrorHandler in prod

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

-  a new debug.error_handler service is the registered PHP error handler, with ErrorHandler::register() as factory
- ErrorHandler::register() is patched so that it checks if the currently registered error handler is an instance of ErrorHandler - in which case it returns this instance and don't create a new one.
- DebugHandlersListener now listen to ConsoleEvents and re-injects fatal errors within the $app->renderException code path
- DebugHandlersListener also has a new $scream parameter to control is silenced errors are logged or not

Commits
-------

fac3cc4 [FrameworkBundle] register ErrorHandler at boot time
4acf5d3 [Debug] make screaming configurable
4d0ab7d [FrameworkBundle] enable ErrorHandler in prod
2014-10-03 11:43:16 +02:00
Fabien Potencier
b5c4d54f11 minor #12102 minor [Serializer] Fix CS. Uniformize PHPDoc. (dunglas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

minor [Serializer] Fix CS. Uniformize PHPDoc.

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

Commits
-------

5be84c4 [Serializer] Fix CS. Uniformize PHPDoc.
2014-10-03 07:39:07 +02:00
Fabien Potencier
8a5f8248c9 minor #12065 [DependencyInjection] Tweaked factories (unkind)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DependencyInjection] Tweaked factories

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

There are some issues with new service factories:
 * `ContainerBuilder` cannot instantiate service from factory (i.e. currently it works for dumped code only)
 * Dumped code sometimes is invalid (anonymous services as factories, factories without arguments)

Commits
-------

ee82392 [DependencyInjection] Tweaked factories
2014-10-03 07:32:40 +02:00
Fabien Potencier
8d7cabd39c feature #10931 [HttpFoundation] enhance PdoSessionHandler (Tobion)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[HttpFoundation] enhance PdoSessionHandler

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5483, #2067, #2382, #9029
| License       | MIT

0. [x] Continuation of locking implementation (#10908): Implement different locking strategies
  - `PdoSessionHandler::LOCK_TRANSACTIONAL` (default): Issues a real row lock but requires a transaction
  - `PdoSessionHandler::LOCK_ADVISORY`: app-level lock, safe as long as only the PdoSessionHandler accesses sessions, advantage is it does not require a transaction (not implemented for oracle or sqlsrv yet)
  - `PdoSessionHandler::LOCK_NONE`: basically what is was before, prone to race conditions, means the last session write wins

1. [x] Save session data as binary: Encoding session data was definitely the wrong solution. Session data is binary text (esp. when using other session.serialize_handler) that must stay as-is and thus must also be safed in a binary column. Base64 encoding session data just decreses performance and increases storage costs and is semantically wrong because it does not have a character encoding.
That saving null bytes in Posgres won't work on a character column is also documented

    > First, binary strings specifically allow storing octets of value zero and other "non-printable" octets (usually, octets outside the range 32 to 126). Character strings disallow zero octets, and also disallow any other octet values and sequences of octet values that are invalid according to the database's selected character set encoding.
http://www.postgresql.org/docs/9.1/static/datatype-binary.html#DATATYPE-BINARY-TABLE

2. [x] Implement lazy connections that are only opened when session is used by either passing a dsn string explicitly or falling back to session.save_path ini setting. Fixes #9029

3. [x] add a create table method that creates the correct table depending on database vendor. This makes the class self-documenting and standalone useable.

5. [x] add lifetime column to session table which allows to have different lifetimes for each session

6. [x] add isSessionExpired() method to be able to distinguish between a new session and one that expired due to inactivity, e.g. to display flash message to user

7. [x] added upgrade and changelog notes

Commits
-------

1bc6680 [HttpFoundation] implement different locking strategies for sessions
6f5748e adjust sqlite table definition
5978fcf added upgrade and changelog notes for PdoSessionHandler
182a5d3 [HttpFoundation] add create table method to pdo session handler
e79229d [HttpFoundation] allow different lifetime per session
af1bb1f add test for null byte in session data
251238d [HttpFoundation] implement lazy connect for pdo session handler
7dad54c [HttpFoundation] remove base64 encoding of session data
2014-10-03 07:26:43 +02:00
Jérémy Derussé
b6e29e9f34 Display a nice upload limit message 2014-10-02 22:26:18 +02:00
Kévin Dunglas
5be84c4bf0 [Serializer] Fix CS. Uniformize PHPDoc. 2014-10-02 20:41:27 +02:00
Tobias Schultze
1bc6680928 [HttpFoundation] implement different locking strategies for sessions 2014-10-02 20:16:41 +02:00
Nicolas Grekas
fac3cc4d03 [FrameworkBundle] register ErrorHandler at boot time 2014-10-02 18:47:18 +02:00
Fabien Potencier
d318e09eef feature #11339 [FrameworkBundle] container:debug : list services if no service match exacly the name argument (agallou)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] container:debug : list services if no service match exacly the name argument

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

If we launch the command "container:debug log" and there is no
service nammed log, it will print something like this :

```
[0] logger
[1] monolog.handler.console
[2] monolog.handler.debug
```

After the service has been chosen, usual container:debug informations
are displayed.

Commits
-------

16201b6 [FrameworkBundle] container:debug : list services if no service match exacly the name argument
2014-10-02 12:40:33 +02:00
Nicolas Grekas
4acf5d3d0b [Debug] make screaming configurable 2014-10-02 11:12:20 +02:00
Nicolas Grekas
4d0ab7ddc1 [FrameworkBundle] enable ErrorHandler in prod 2014-10-02 11:12:20 +02:00
Fabien Potencier
0314d7549e feature #12061 [Debug] expose object_handle (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Debug] expose object_handle

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

This is a small enhancement to the symfony debug C extension that allows fetching an object's handle.
This is the `#number` as displayed by var_dump():
`class stdClass**#1** (0) {}`

This is required for VarDumper to be able to expose objects' handles and thus have more precise dumps.
It will allow inspecting "same" relationships between two *different* dumps.

Commits
-------

5f6b676 [Debug] expose object_handle
2014-10-02 10:36:11 +02:00
Adrien Gallou
16201b6d1a [FrameworkBundle] container:debug : list services if no service match exacly the name argument
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11303
| License       | MIT
| Doc PR        |

If we launch the command "container:debug log" and there is no
service nammed log, it will print something like this :

```
[0] logger
[1] monolog.handler.console
[2] monolog.handler.debug
```

After the service has been chosen, usual container:debug informations
are displayed.
2014-10-02 08:18:25 +02:00
Fabien Potencier
adbde8ac7a minor #12093 [EventDispatcher] fix RegisterListenersPass test (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[EventDispatcher] fix RegisterListenersPass test

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

With #12088 being merged, the test needs to be adapted to reflect the 2.5 specific changes.

Commits
-------

9d2120b fix RegisterListenersPass test
2014-10-02 07:56:02 +02:00
Nikita Konstantinov
ee82392074 [DependencyInjection] Tweaked factories 2014-10-02 01:48:53 +04:00
Christian Flothmann
9d2120b562 fix RegisterListenersPass test
With #12088 being merged, the test needs to be adapted to reflect the
2.5 specific changes.
2014-10-01 17:43:05 +02:00
Grégoire Pineau
cfc04a6e8d [TwigBridge] Added form_twitter_bootstrap_layout.html.twig 2014-10-01 16:49:30 +02:00
Fabien Potencier
6acf3e74ae Merge branch '2.5'
* 2.5:
  [Doc] Use Markdown syntax highlighting
  [Finder] tweaked docs
  [Finder] Add info about possibilities offered by SplFileInfo
  fixed CS
  [Security][Http][Authentication] Make a test pass on HHVM
  fix components tests
  [Intl] FIxed failing test
  [Intl] Generated the data for ICU version 54-rc
  [EventDispatcher] fix doc bloc on EventDispatcherInterface
  [Validator] Update validators.zh_CN.xlf, fix translation error
  bumped Symfony version to 2.5.6
  updated VERSION for 2.5.5
  updated CHANGELOG for 2.5.5
  bumped Symfony version to 2.3.21
  updated VERSION for 2.3.20
  update CONTRIBUTORS for 2.3.20
  updated CHANGELOG for 2.3.20
  [Intl] Integrated ICU data into Intl component

Conflicts:
	src/Symfony/Component/Debug/README.md
	src/Symfony/Component/DependencyInjection/README.md
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/OptionsResolver/README.md
2014-10-01 07:53:11 +02:00
Fabien Potencier
cfd1ecfe84 Merge branch '2.3' into 2.5
* 2.3:
  [Doc] Use Markdown syntax highlighting
  [Finder] tweaked docs
  [Finder] Add info about possibilities offered by SplFileInfo
  fix components tests
  [Intl] FIxed failing test
  [Intl] Generated the data for ICU version 54-rc
  [EventDispatcher] fix doc bloc on EventDispatcherInterface
  [Validator] Update validators.zh_CN.xlf, fix translation error
  bumped Symfony version to 2.3.21
  updated VERSION for 2.3.20
  update CONTRIBUTORS for 2.3.20
  updated CHANGELOG for 2.3.20
  [Intl] Integrated ICU data into Intl component

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php
2014-10-01 07:50:18 +02:00
Fabien Potencier
0e7694e5e9 Merge branch 'pull/12053' into 2.3
* pull/12053:
  [Doc] Use Markdown syntax highlighting

Conflicts:
	src/Symfony/Component/Finder/README.md
2014-10-01 07:39:06 +02:00
Laurent Ghirardotti
638ce847b3 [Doc] Use Markdown syntax highlighting 2014-10-01 07:38:33 +02:00
Fabien Potencier
03f3dec065 [Finder] tweaked docs 2014-10-01 07:36:12 +02:00
Fabien Potencier
c8daa9c420 minor #12059 [Finder] Add info about possibilities offered by SplFileInfo (ywarnier)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12059).

Discussion
----------

[Finder] Add info about possibilities offered by SplFileInfo

Minor documentation improvement

Commits
-------

b2219cf [Finder] Add info about possibilities offered by SplFileInfo
2014-10-01 07:33:40 +02:00
Yannick Warnier
b2219cf150 [Finder] Add info about possibilities offered by SplFileInfo 2014-10-01 07:33:40 +02:00
Fabien Potencier
d002f1744a minor #12088 fix components tests (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

fix components tests

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

Since #12006, the `ContainerBuilder` contains the `addExpressionLanguageProvider()` method which references a class from the ExpressionLanguage component. By default, the PHPUnit mock API tries to mock all methods of the class being doubled. Since the ExpressionLanguage component is not required to run the tests, creating the mock objects fails when the mock API fails to mock the `addExpressionLanguageProvider()` method.

Commits
-------

2f2a732 fix components tests
2014-10-01 07:29:49 +02:00
Fabien Potencier
e6bcb1cff4 fixed CS 2014-10-01 07:28:47 +02:00
Fabien Potencier
408c6aa501 minor #12086 [Security][Http][Authentication] Make a test pass on HHVM (AlphaStream)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #12086).

Discussion
----------

[Security][Http][Authentication] Make a test pass on HHVM

The test mocks AuthenticationException mocking all its (and its ancestors') methods. In HHVM's implementation of \Exception, a static method is called upon instantiation. Mock object generator, however, mocks static methods with 'throw' statements. All of these cause the SimpleAuthenticationHandlerTest to fail on HHVM when attempting to instantiate the mock.

The solution is to disable method mocking for AuthenticationException. An instance of this class is merely passed around between the authentication handler and the failure handler, and no methods are invoked on it. Hence, disabling method mocking should not weaken the unit test.

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

Commits
-------

7ff903e [Security][Http][Authentication] Make a test pass on HHVM
2014-10-01 07:27:37 +02:00
Alex Bakhturin
7ff903ed39 [Security][Http][Authentication] Make a test pass on HHVM 2014-10-01 07:27:37 +02:00
Christian Flothmann
2f2a732807 fix components tests
Since #12006, the `ContainerBuilder` contains the
`addExpressionLanguageProvider()` method which references a class from
the ExpressionLanguage component. By default, the PHPUnit mock API
tries to mock all methods of the class being doubled. Since the
ExpressionLanguage component is not required to run the tests,
creating the mock objects fails when the mock API fails to mock
the `addExpressionLanguageProvider()` method.
2014-10-01 00:07:12 +02:00
Bernhard Schussek
b45ebef229 [Intl] FIxed failing test 2014-09-30 23:25:54 +02:00
Bernhard Schussek
40eaa80ef6 bug #11998 [Intl] Integrated ICU data into Intl component #2 (webmozart)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11998).

Discussion
----------

[Intl] Integrated ICU data into Intl component #2

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

Follow-up PR to #11920. This PR contains generated data files only.

Commits
-------

65a8b9f [Intl] Generated the data for ICU version 54-rc
2014-09-30 23:21:32 +02:00
Bernhard Schussek
65a8b9fc93 [Intl] Generated the data for ICU version 54-rc 2014-09-30 23:21:31 +02:00
Bernhard Schussek
1ce0f875be bug #11920 [Intl] Integrated ICU data into Intl component #1 (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Integrated ICU data into Intl component #1

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

This PR is an alternative implementation to #11884. It depends on ~~#11906~~ and ~~#11907~~ being merged first (~~these are included in the diff until after a merge+rebase~~ merged+rebased now).

With this PR, the ICU component becomes obsolete. The ICU data is bundled with Intl in two different formats: JSON and the binary ICU resource bundle format (version 2) readable by PHP's `\ResourceBundle` class. For a performance comparison between the two, see my [benchmark](/webmozart/json-res-benchmark).

~~The data is contained in two zip files: json.zip (2.6MB) and rb-v2.zip (3.8MB). The handler~~

```php
\Symfony\Component\Intl\Composer\ScriptHandler::decompressData()
```

~~needs to be added as Composer hook and decompresses the data after install/update.~~

The data is included as text/binary now. Git takes care of the compression.

Before this PR can be merged, I would like to find out what the performance difference between the two formats is in real applications. For that, I need benchmarks from some real-life applications which use ICU data - e.g. in forms (language drop-downs, country selectors etc.) - for both the JSON and the binary data. You can force either format to be used by hard-coding the return value of `Intl::detectDataFormat()` to `Intl::JSON` and `Intl::RB_V2` respectively. I'll also try to create some more realistic benchmarks.

If JSON is not significantly slower/takes up significantly more memory than the binary format, we can drop the binary format altogether.

Commits
-------

be819c1 [Intl] Integrated ICU data into Intl component
2014-09-30 23:20:37 +02:00
Bernhard Schussek
832c78f47d feature #12050 [Form] Added "label_format" option (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Form] Added "label_format" option

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

This PR replaces #11456. It adds a "label_format" option which allows to configure a format for generating labels. Two placeholders are available: `%name%` and `%id%`.

**Feedback wanted**: Should we change the placeholders to `{{ name }}` and `{{ id }}`?

The option is inherited from the parent form if not set explicitly on a field:

```php
$form = $this->createForm('myform', $data, array('label_format' => 'form.label.%id%'));
```

Follow-up PR: Make the default label format and translation domain configurable in config.yml.

Commits
-------

aad442d [Form] Added "label_format" option
2014-09-30 23:16:13 +02:00
Bernhard Schussek
95d68a1396 feature #12021 [Validator] Added error codes to all constraints with multiple error causes (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Added error codes to all constraints with multiple error causes

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

This PR depends on #12015 and #12016 being merged first. However, a few changes in 52cb7df first must be backported to #12016.

This PR introduces error codes for all constraints with multiple error paths. This lets you determine what exactly the reason was that a constraint failed:

```php
$validator = Validation::createValidator();

$violations = $validator->validate('0-4X19-92619812', new Isbn());

foreach ($violations as $violation) {
    var_dump($violation->getCode());
    // => int(3)
    var_dump(Isbn::getErrorName($violation->getCode()));
    // => string(24) "ERROR_INVALID_CHARACTERS"
    var_dump($violation->getConstraint()->getErrorName($violation->getCode()));
    // => string(24) "ERROR_INVALID_CHARACTERS"
}
```

The `getErrorName()` method is especially helpful for REST APIs, where you can return both an error code and a description of that error now.

**Todos**

- [x] Backport a few structural changes to #12016
- [x] Update constraints outside of the Validator component
- [x] Rebase on master (after merging #12015 and #12016)

Commits
-------

3b50bf2 [Validator] Added error codes to all constraints with multiple error causes
2014-09-30 23:14:38 +02:00
Bernhard Schussek
3b50bf23a1 [Validator] Added error codes to all constraints with multiple error causes 2014-09-30 23:13:20 +02:00
Bernhard Schussek
2f3bb66e43 feature #12054 [Form] The trace of form errors is now displayed in the profiler (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Form] The trace of form errors is now displayed in the profiler

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

This is a follow-up PR for #12052. With this change, the full trace of form errors is now displayed in the web debugger:

![error](https://cloud.githubusercontent.com/assets/176399/4419637/85facd14-456d-11e4-8c70-0e8802a586ec.png)

If a violation was caused by a TransformationFailedException, the exception is now accessible through the `getCause()` method of the violation. Additionally, you can access `Form::getTransformationFailure()` to retrieve the exception.

Commits
-------

8dbe258 [Form] The trace of form errors is now displayed in the profiler
2014-09-30 23:10:18 +02:00
Bernhard Schussek
8dbe25882e [Form] The trace of form errors is now displayed in the profiler 2014-09-30 23:08:39 +02:00
Bernhard Schussek
541f889d9c feature #12052 [Validator] Made it possible to store the cause of a constraint violation (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Made it possible to store the cause of a constraint violation

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

This change makes it possible to store the cause of a violation (e.g. an exception). This way it is possible to follow the trace of violations caused by exceptions up to their root.

```php
try {
    // ...
} catch (Exception $e) {
    $this->context->buildViolation('Error!')
        ->setCause($e)
        ->addViolation();
}
```

This is one step to solve #5607. See #12054.

Commits
-------

499eeb4 [Validator] Made it possible to store the cause of a constraint violation
2014-09-30 23:08:00 +02:00
Fabien Potencier
e24a822c40 minor #12080 [EventDispatcher] fix doc bloc on EventDispatcherInterface (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[EventDispatcher] fix doc bloc on EventDispatcherInterface

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

The doc block says that an array of event names is accepted as input, but no implementation is compliant with that description.

Commits
-------

e3dacbd [EventDispatcher] fix doc bloc on EventDispatcherInterface
2014-09-30 16:01:01 +02:00
Fabien Potencier
6f2e08e32b minor #12078 [HttpKernel] fix composer.json (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[HttpKernel] fix composer.json

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

This fixes the composer.json of HttpKernel

Commits
-------

7bb768d [HttpKernel] fix composer.json
2014-09-30 16:00:26 +02:00
Fabien Potencier
1457e56b74 feature #11496 [MonologBridge] Ignore empty context/extra by default in the ConsoleFormatter (Seldaek)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[MonologBridge] Ignore empty context/extra by default in the ConsoleFormatter

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

This adds support for https://github.com/Seldaek/monolog/pull/388 and turns it on by default since the console output is arguably meant for humans and not for machine readable stuff it makes sense I believe. /cc @Tobion

**Note:** This depends on an unreleased version of monolog and should not be merged until 1.11 is out.

Commits
-------

9b69f56 [MonologBridge] Ignore empty context/extra by default in the ConsoleFormatter
2014-09-30 15:57:56 +02:00