Commit Graph

17485 Commits

Author SHA1 Message Date
Tobias Schultze
da24bc9d13 [HttpFoundation] fix switch statement 2014-06-05 14:50:34 +02:00
Fabien Potencier
0e5468f518 bug #11054 [Serializer] Xml encoder whitespace fix (fieg)
This PR was merged into the 2.5 branch.

Discussion
----------

[Serializer] Xml encoder whitespace fix

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

Hi, after #11044 I'm back with more: A fix for another BC-break issue regarding decoding xml since PR #10668.

The problem is that I was getting more `#cdata-section` keys in deeper levels of the decoded xml:

```php
  'str' =>
      array(2) {
        '#text' =>
        array(2) {
          ...
        }
        '#cdata-section' =>
        string(228) "Some text"
      }
```

//cc @csarrazi

Commits
-------

466a3d7 [serializer] fixed whitespace issue when decoding xml
2014-06-04 19:29:25 +02:00
Fabien Potencier
fe01d10735 bug #11009 [HttpFoundation] smaller fixes for PdoSessionHandler (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] smaller fixes for PdoSessionHandler

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

For both the PdoSessionHandler and DbalSessionHandler
- https://github.com/symfony/symfony/pull/10652#issuecomment-42370425: Transactional DELETE + INSERT does not work as expected
- https://github.com/symfony/symfony/pull/10652#issuecomment-44359784: sqlsrv 2005 does not support the MERGE SQL, and if used it requires an HOLDLOCK
- missing time update for sqlsrv and oracle

Commits
-------

a0e1d4d [Doctrine Bridge] fix DBAL session handler according to PdoSessionHandler
00d707f [HttpFoundation] use different approach for duplicate keys in postgres, fix merge for sqlsrv and oracle
2014-06-04 19:27:41 +02:00
Fabien Potencier
36d144b090 feature #10552 [YAML] Added support for object-maps (polyfractal, nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

 [YAML] Added support for object-maps

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

Proposal for https://github.com/symfony/symfony/pull/10114

Commits
-------

0cee604 [Yaml] Cleanups for object maps
e2d5468 [Yaml] Added support for object maps
2014-06-04 19:22:16 +02:00
fieg
466a3d70b7 [serializer] fixed whitespace issue when decoding xml 2014-06-04 12:17:52 +02:00
Tobias Schultze
a0e1d4d5d7 [Doctrine Bridge] fix DBAL session handler according to PdoSessionHandler 2014-06-04 11:55:45 +02:00
Joseph Bielawski
be652260d1 [WebProfilerBundle] Add simple placeholders into search form 2014-06-04 09:22:48 +02:00
Nicolas Grekas
0cee60429e [Yaml] Cleanups for object maps 2014-06-04 08:43:44 +02:00
Zachary Tong
e2d5468b4a [Yaml] Added support for object maps
Previously, the parser treated maps ( {} ) the same as sets ( [] ).
Both were returned as PHP associative arrays. Since
these are distinct entities, this can cause considerably problems for
the users, especially when YAML is being serialized into another
format such as JSON.

This commit allows the user to enable object-map support via a third
parameter on the Parse method.  It defaults to `false`, which means
that this commit does not break backwards compatibility.

If the user enables object-map support, maps are represented
by stdClass() objects.  Sets remain as arrays.
2014-06-04 08:30:39 +02:00
Fabien Potencier
0a177805bc bug #11047 #10862 loadClassMetadata vs loadValidatorMetadata: revert default config (phramz)
This PR was squashed before being merged into the 2.5 branch (closes #11047).

Discussion
----------

#10862 loadClassMetadata vs loadValidatorMetadata: revert default config

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

Commits
-------

3bde718 #10862 loadClassMetadata vs loadValidatorMetadata: revert default config
2014-06-03 23:45:50 +02:00
Maximilian Reichel
3bde718411 #10862 loadClassMetadata vs loadValidatorMetadata: revert default config 2014-06-03 23:45:48 +02:00
Fabien Potencier
4c12b7b9ff feature #9990 [SecurityBundle] added acl:set command (dunglas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[SecurityBundle] added acl:set command

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

This new command allows to set ACL directly from the command line. This useful to quickly set up an environment and for debugging / maintenance purpose.

This PR also includes a functional test system for the ACL component. As an example, it is used to test the `acl:set` command.
The provided entity class is not mandatory (tests will still be green without it) but can be useful to test other ACL related things. I can remove it if necessary.

The instantiation of the `MaskBuilder` object is done in a separate method to be easily overridable to use a custom one (e.g. the SonataAdmin one).

Commits
-------

a702124 [SecurityBundle] added acl:set command
2014-06-03 23:19:40 +02:00
Fabien Potencier
e8146810e7 feature #10667 [HttpFoundation] Add a way to match a specific scheme in RequestMatcher #10556 (ProPheT777)
This PR was squashed before being merged into the 2.6-dev branch (closes #10667).

Discussion
----------

[HttpFoundation] Add a way to match a specific scheme in RequestMatcher #10556

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

Commits
-------

787ae07 [HttpFoundation] Add a way to match a specific scheme in RequestMatcher #10556
2014-06-03 23:09:10 +02:00
prophet777
787ae070ae [HttpFoundation] Add a way to match a specific scheme in RequestMatcher #10556 2014-06-03 23:09:07 +02:00
Fabien Potencier
4b7e7ad271 feature #10699 [DomCrawler] Added support for slicing nodes (Berat Doğan, beratdogan)
This PR was squashed before being merged into the 2.6-dev branch (closes #10699).

Discussion
----------

[DomCrawler] Added support for slicing nodes

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

There are no easy way to slice nodes in specific range. I created a method using \LimitIterator. Works fine for me.

An example using is:
```php
     $crawler->filter('h1')->slice(5, 10)->each(function ($node, $i) {
         return $node->text();
     });

Commits
-------

1181bdc [DomCrawler] Added support for slicing nodes
2014-06-03 23:06:30 +02:00
Berat Doğan
1181bdc63b [DomCrawler] Added support for slicing nodes 2014-06-03 23:05:08 +02:00
Fabien Potencier
be6aac252e feature #10792 [Security] Allow overloading ContextListener::refreshUser() (lstrojny)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Security] Allow overloading ContextListener::refreshUser()

Allow overloading refreshUser() for the use case of doing something special with user providers.

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

Commits
-------

b67ed43 Allow overloading ContextListener::refreshUser()
2014-06-03 22:56:38 +02:00
Fabien Potencier
df3d3f70d3 minor #10980 error.html.twig should contain a email value (clemens-tolboom)
This PR was squashed before being merged into the 2.3-dev branch (closes #10980).

Discussion
----------

error.html.twig should contain a email value

When getting an exception on env PROD it would be nice to have an email to report to.

Current code has [email] instead of a value.

I'm not sure how to fix this as the email value should come from exception.html.twig

```html
<div id="logs">
    {% include 'TwigBundle:Exception:logs.html.twig' with { 'logs': logger.logs } only %}
</div>
```

Some hints are welcome.

Commits
-------

030b8c0 error.html.twig should contain a email value
2014-06-03 22:41:36 +02:00
Clemens Tolboom
030b8c05ea error.html.twig should contain a email value 2014-06-03 22:41:34 +02:00
Fabien Potencier
ceb4e0e369 fixed previous merge 2014-06-03 22:40:26 +02:00
Fabien Potencier
636f0d5d99 minor #10974 [HttpFoundation] Added PHPDoc for Cache-Control directives methods (tony-co)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10974).

Discussion
----------

[HttpFoundation] Added PHPDoc for Cache-Control directives methods

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

Commits
-------

58b0aef Added phpdoc for Cache-Control directives methods
2014-06-03 22:39:50 +02:00
Tony Cosentino
58b0aefa16 Added phpdoc for Cache-Control directives methods 2014-06-03 22:39:50 +02:00
Fabien Potencier
f2721ddace bug #11042 [Debug] fix debug handlers config (nicolas-grekas)
This PR was merged into the 2.5 branch.

Discussion
----------

[Debug] fix debug handlers config

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

Commits
-------

e1ba70e [Debug] fix debug handlers config
2014-06-03 22:37:38 +02:00
Fabien Potencier
2eedd43ca2 bug #11043 [Console] OutputFormatter Unset Bold has wrong id (DZunke)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #11043).

Discussion
----------

[Console] OutputFormatter Unset Bold has wrong id

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

The Unsetter for Bold in *nix Console is the 22 not the 21. Problem is that the 21 is invalid and so no style will be unsetted. Don't look very nice. Also fixed small Typo with Vars in apply()

Commits
-------

724bb50 [Console] OutputFormatter Unset Bold has wrong id
2014-06-03 22:33:46 +02:00
Denis Zunke
724bb50942 [Console] OutputFormatter Unset Bold has wrong id 2014-06-03 22:33:46 +02:00
Nicolas Grekas
e1ba70ecb9 [Debug] fix debug handlers config 2014-06-03 17:24:49 +02:00
Fabien Potencier
dac3305979 feature #11034 [Debug] enhanced error messages for uncaught exceptions (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Debug] enhanced error messages for uncaught exceptions

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

Before:

![capture du 2014-06-02 10 56 42](https://cloud.githubusercontent.com/assets/243674/3145281/3f8c4d24-ea34-11e3-948c-78898fb79a75.png)

After:

![capture du 2014-06-02 10 55 57](https://cloud.githubusercontent.com/assets/243674/3145283/44167a86-ea34-11e3-9786-f77f2f001638.png)

A double-click on the file name switches between short/full path name.

Commits
-------

ce66442 [Debug] enhanced error messages for uncaught exceptions
2014-06-03 17:19:38 +02:00
Fabien Potencier
315c3e50d8 bug #11033 [Debug] fix wrong case mismatch exception (nicolas-grekas)
This PR was merged into the 2.5 branch.

Discussion
----------

[Debug] fix wrong case mismatch exception

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

Commits
-------

8e9cc35 [Debug] fix wrong case mismatch exception
2014-06-03 17:09:24 +02:00
Fabien Potencier
4086ab57c5 bug #11044 [Serializer] Fix BC break since 2.5 (fieg)
This PR was merged into the 2.5 branch.

Discussion
----------

[Serializer] Fix BC break since 2.5

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

We spotted a BC break after upgrading to 2.5. The break seems to originate from PR #10668 and I hereby submit a test that passes if I revert the XmlEncoder.php back to before the PR.

The result of the given decode call currently is (notice the "#cdata-section"):

```php
array(1) {
  'firstname' =>
  array(1) {
    '#cdata-section' =>
    string(12) "Paul <or Me>"
  }
}
```

I am looking for help fixing the issue, because so far I wasn't able to come up with a fix. @csarrazi as an author of the PR, do you perhaps have any thoughts on this matter?

Commits
-------

48d9f36 [Serializer] fixed bc-break with cdata-section nodes
2014-06-03 14:29:40 +02:00
fieg
48d9f36ea0 [Serializer] fixed bc-break with cdata-section nodes 2014-06-03 14:01:38 +02:00
Nicolas Grekas
ce6644280e [Debug] enhanced error messages for uncaught exceptions 2014-06-03 08:31:36 +00:00
Fabien Potencier
eafabfaea9 bug #11041 Remove undefined variable $e (skydiablo)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11041).

Discussion
----------

Remove undefined variable $e

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

Commits
-------

637c6e1 Remove undefined variable $e
2014-06-03 03:40:41 +02:00
Volker
637c6e1c69 Remove undefined variable $e 2014-06-03 03:40:41 +02:00
Fabien Potencier
38bdcf141c minor #11026 [Validator] Fix a parameter name in a test (elnur)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fix a parameter name in a test

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

Commits
-------

069e925 Fix a parameter name in a test
2014-06-02 16:55:16 +02:00
Nicolas Grekas
8e9cc350c2 [Debug] fix wrong case mismatch exception 2014-06-02 09:03:03 +02:00
Fabien Potencier
9c60a8582e bumped Symfony version to 2.5.1 2014-06-01 17:15:34 +02:00
Fabien Potencier
1fc8a82f35 bumped Symfony version to 2.4.7 2014-06-01 17:15:23 +02:00
Fabien Potencier
1793292ae9 bumped Symfony version to 2.3.17 2014-06-01 17:15:00 +02:00
Elnur Abdurrakhimov
069e925ae8 Fix a parameter name in a test 2014-06-01 01:16:29 +04:00
Fabien Potencier
59365832a0 updated VERSION for 2.5.0 2014-05-31 20:45:50 +02:00
Fabien Potencier
0df6ebf595 updated CHANGELOG for 2.5.0 2014-05-31 20:45:43 +02:00
Fabien Potencier
ebf1be8a92 updated VERSION for 2.4.6 2014-05-31 20:42:13 +02:00
Fabien Potencier
f094476d07 updated CHANGELOG for 2.4.6 2014-05-31 20:41:51 +02:00
Fabien Potencier
069683a14e updated VERSION for 2.3.16 2014-05-31 04:04:21 +02:00
Fabien Potencier
bea602eaa5 update CONTRIBUTORS for 2.3.16 2014-05-31 04:04:18 +02:00
Fabien Potencier
9d4eaabfb0 updated CHANGELOG for 2.3.16 2014-05-31 04:04:13 +02:00
Fabien Potencier
5c782607ad Merge branch '2.5'
* 2.5:
  [Validator] Remove property and method targets from the optional and required constraints.
  fixed CHANGELOG for 2.5
  bumped Symfony version to 2.5.0
  updated VERSION for 2.5.0-RC1
  updated CHANGELOG for 2.5.0-RC1
  [DomCrawler] Fixed charset detection in html5 meta charset tag
2014-05-31 04:03:04 +02:00
Fabien Potencier
af10b106b4 Merge branch '2.4' into 2.5
* 2.4:
  [Validator] Remove property and method targets from the optional and required constraints.
  [DomCrawler] Fixed charset detection in html5 meta charset tag
2014-05-31 04:02:56 +02:00
Fabien Potencier
f1970a76ae Merge branch '2.3' into 2.4
* 2.3:
  [Validator] Remove property and method targets from the optional and required constraints.
  [DomCrawler] Fixed charset detection in html5 meta charset tag
2014-05-31 04:02:48 +02:00
Fabien Potencier
b8247a3fc6 bug #11014 [Validator] Remove property and method targets from the optional and required constraints (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Remove property and method targets from the optional and required constraints

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

At the moment both constraints can only be defined on other annotations. Both constraints are [only mentioned in the docs in the context of the Collection](http://symfony.com/doc/current/reference/constraints/Collection.html#required-and-optional-field-constraints).

Defining the required or optional annotation directly on a field or method
throws a ClassNotFoundException, since the constraint validator factory tries to load the validator (which does not exist):

```
ClassNotFoundException: Attempted to load class "OptionalValidator"
from namespace "Symfony\Component\Validator\Constraints"
in /var/www/server/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php line 71.
Do you need to "use" it from another namespace?
```

By applying this patch the end user will get a more helpful error message:

```
[Semantical Error] Annotation @Assert\Optional is not allowed to be declared on property Acme\DemoBundle\Entity\Contact::$message.
You may only use this annotation on these code elements: ANNOTATION.
```

Commits
-------

9c2616e [Validator] Remove property and method targets from the optional and required constraints.
2014-05-31 03:59:25 +02:00