Commit Graph

18932 Commits

Author SHA1 Message Date
Fabien Potencier
3fb5ad4d0c minor #12164 [TwigBridge] Replace default list style to icon (Macsch15)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[TwigBridge] Replace default list style to icon

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

Replaces default list style in **bootstrap_3_layout.html.twig** to icon.
Requires Glyphicons from Bootstrap 3.

Before:
![2014-10-07 11-55-50](https://cloud.githubusercontent.com/assets/1592053/4540807/d6f8eb46-4e0b-11e4-82bf-77b56fd1d17c.png)

After:
![2014-10-07 11-55-07](https://cloud.githubusercontent.com/assets/1592053/4540810/e02fe048-4e0b-11e4-9f3b-69902c0ae32b.png)

Commits
-------

9a0b2cc [TwigBridge] Replace default list style to icon
2014-10-20 15:54:32 +02:00
Bernhard Schussek
91fde699aa minor #12242 [Form] no need to add the url listener when it does not do anything (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] no need to add the url listener when it does not do anything

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

In line with #11696

Commits
-------

7aea1c9 [Form] no need to add the url listener when it does not do anything
2014-10-20 12:59:59 +02:00
Bernhard Schussek
bf006f5202 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns 2014-10-20 12:47:44 +02:00
Fabien Potencier
a05379eab0 feature #12098 [Serializer] Handle circular references (dunglas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Serializer] Handle circular references

| Q             | A
| ------------- | ---
| Bug fix?      | Yes: avoid infinite loops. Allows to improve #5347
| New feature?  | yes (circular reference handler)
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | symfony/symfony-docs#4299

This PR adds handling of circular references in the `Serializer` component.
The number of allowed iterations is configurable (one by default).
The behavior when a circular reference is detected is configurable. By default an exception is thrown. Instead of throwing an exception, it's possible to register a custom handler (e.g.: a Doctrine Handler returning the object ID).

Usage:
```php
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
use Symfony\Component\Serializer\Serializer;

class MyObj
{
    private $id = 1312;

    public function getId()
    {
        return $this->getId();
    }

    public function getMe()
    {
        return $this;
    }
}

$normalizer = new GetSetMethodNormalizer();
$normalizer->setCircularReferenceLimit(3);
$normalizer->setCircularReferenceHandler(function ($obj) {
    return $obj->getId();
});

$serializer = new Serializer([$normalizer]);
$serializer->normalize(new MyObj());
```

Commits
-------

48491c4 [Serializer] Handle circular references
2014-10-20 11:20:49 +02:00
Fabien Potencier
269e27fb49 feature #12251 [Bridge][Doctrine][Form] Add entity manager instance support for em option (egeloen)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Bridge][Doctrine][Form] Add entity manager instance support for em option

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10157
| License       | MIT
| Doc PR        | symfony/symfony-docs#4336

This PR allows to pass an explicit entity manager instance as em option.

Commits
-------

d84e3a8 [Bridge][Doctrine][Form] Add entity manager instance support for em option
2014-10-20 11:17:48 +02:00
Fabien Potencier
e1d1832443 minor #12257 [FrameworkBundle] improve server:run feedback (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] improve server:run feedback

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

In #12253, improved feedback was added to the `server:run` command
instructing the user how to terminate the built-in web server. This
is hereby backported to the `2.3` branch.

Commits
-------

264c37a [FrameworkBundle] improve server:run feedback
2014-10-20 11:15:22 +02:00
Christian Flothmann
264c37ab96 [FrameworkBundle] improve server:run feedback
In #12253, improved feedback was added to the `server:run` command
instructing the user how to terminate the built-in web server. This
is hereby backported to the `2.3` branch.
2014-10-19 20:55:06 +02:00
Eric GELOEN
d84e3a8382 [Bridge][Doctrine][Form] Add entity manager instance support for em option 2014-10-19 19:05:36 +02:00
Fabien Potencier
4fe8eda417 bug #12253 [FrameworkBundle] improve server commands feedback (xabbuh)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] improve server commands feedback

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

* display a message when `server:start` is executed and the PCNTL
  extension is not loaded
* print instructions about how to terminate the `server:run` command

Commits
-------

bf174cf [FrameworkBundle] improve server commands feedback
2014-10-19 18:32:38 +02:00
Christian Flothmann
bf174cf292 [FrameworkBundle] improve server commands feedback
* display a message when `server:start` is executed and the PCNTL
  extension is not loaded
* print instructions about how to terminate the `server:run` command
2014-10-18 21:00:49 +02:00
Fabien Potencier
8487ef2c0c minor #12230 [Security] Lithuanian security translations (tadcka)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Lithuanian security translations

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

Commits
-------

2e573f1 Lithuanian security translations
2014-10-17 11:15:13 +02:00
Fabien Potencier
0e6465aeb9 bug #12202 [VarDumper] enhance dumping refs (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[VarDumper] enhance dumping refs

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | nicolas-grekas/Patchwork-Dumper#39
| License       | MIT
| Doc PR        | -

This makes dumps prettier:
- VarCloner now exposes the "isref" state of a PHP variable
- on hard refs, `#n` suffix is replaced by `&n` prefix
- `#n`/`@n` (object/resource refs) are moved inside the `{ }`
- all repetitive dumps of the same object are toggle-able
- all repetitive dumps of the same object / hard ref are *visually* identical
- dumps expose local ref counts and object's handle

I also simplified the `Cloner\DumperInterface`.

For the same (circumvoluted) variable:

Before:
![before](https://cloud.githubusercontent.com/assets/243674/4595026/f6b2a98c-5094-11e4-9fe0-dc6d24da3f14.png)

After:
![after](https://cloud.githubusercontent.com/assets/243674/4595035/07e04980-5095-11e4-9e45-54a1e7453547.png)

Commits
-------

3c401af [VarDumper] enhance dumping refs
2014-10-17 11:13:21 +02:00
Nicolas Grekas
3c401af023 [VarDumper] enhance dumping refs 2014-10-17 09:38:59 +02:00
Tobias Schultze
7aea1c9808 [Form] no need to add the url listener when it does not do anything 2014-10-17 01:39:03 +02:00
Bernhard Schussek
7a13556443 bug #11696 [Form] Fix #11694 - Enforce options value type check in some form types (kix)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11696).

Discussion
----------

[Form] Fix #11694 - Enforce options value type check in some form types

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

`Symfony\Component\Form\Extension\Core\Type\RepeatedType` allowed passing strings as options, which caused problems as in #11694.

Commits
-------

0af6467 [Form] Fix #11694 - Enforce options value type check in some form types
2014-10-16 11:06:53 +02:00
Stepan Anchugov
0af6467757 [Form] Fix #11694 - Enforce options value type check in some form types 2014-10-16 11:06:53 +02:00
Tadas Gliaubicas
2e573f1c81 Lithuanian security translations 2014-10-15 16:10:58 +03:00
Fabien Potencier
27d717e7f0 bug #12225 [SecurityBundle] Add trust_resolver variable into expression (zulus)
This PR was merged into the 2.5 branch.

Discussion
----------

[SecurityBundle] Add trust_resolver variable into expression

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

Commits
-------

2822fdb [SecurityBundle] Add trust_resolver variable into expression | Q             | A | ------------- | --- | Bug fix?      | [yes] | New feature?  | [no] | BC breaks?    | [no] | Deprecations? | [no] | Tests pass?   | [yes] | Fixed tickets | [#12224] | License       | MIT | Doc PR        | [-]
2014-10-14 19:21:03 +02:00
Dawid Pakuła
2822fdb39e [SecurityBundle] Add trust_resolver variable into expression
| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| Fixed tickets | [#12224]
| License       | MIT
| Doc PR        | [-]
2014-10-14 16:08:15 +02:00
Tobias Schultze
63b8c07e5b [DependencyInjection] use inheritdoc for loaders 2014-10-13 21:10:53 +02:00
Tobias Schultze
ddd2fe2032 [Config] fix filelocator with empty name 2014-10-13 20:50:59 +02:00
Fabien Potencier
7dd842ced4 minor #12183 [Router] Cleanup (nkt)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12183).

Discussion
----------

[Router] Cleanup

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |
Removed unused imports, variables, arguments.

Commits
-------

5a6677d [Router] Cleanup
2014-10-13 14:38:31 +02:00
Nikita Gusakov
5a6677d216 [Router] Cleanup 2014-10-13 14:38:27 +02:00
Fabien Potencier
2ad0642c1b bug #12209 [FrameworkBundle] Fixed ide links (hason)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fixed ide links

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

Commits
-------

baf5f47 [FrameworkBundle] Fixed ide links
2014-10-13 14:25:14 +02:00
Fabien Potencier
a27de3d048 minor #12215 Fixed UPGRADE-3.0.md markup (lyrixx)
This PR was merged into the 2.5 branch.

Discussion
----------

Fixed UPGRADE-3.0.md markup

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

Commits
-------

eb5f60c Fixed UPGRADE-3.0.md markup
2014-10-13 14:23:40 +02:00
Christophe Coevoet
c9cd76c98e bug #12208 Add missing argument (WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

Add missing argument

`->dump` has 5 arguments (the 3th argument, the indent, was not provided in the twig extension).

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

Commits
-------

ac696b8 Add missing argument
2014-10-13 14:11:46 +02:00
Grégoire Pineau
eb5f60cabc Fixed UPGRADE-3.0.md markup 2014-10-12 18:47:29 +02:00
Martin Hasoň
baf5f47dbc [FrameworkBundle] Fixed ide links 2014-10-11 00:07:52 +02:00
Wouter J
ac696b835e Add missing argument 2014-10-11 00:07:13 +02:00
Fabien Potencier
8e42756c37 minor #12191 [Security] More accurate docblocks for AbstractVoter (johnkary)
This PR was squashed before being merged into the 2.6-dev branch (closes #12191).

Discussion
----------

[Security] More accurate docblocks for AbstractVoter

| Q             | A
| ------------- | ---
| Fixed tickets | none
| License       | MIT

Two fixes for docblocks in AbstractVoter:

1. Previously the example return value for a few methods used PHP's short array syntax (>= PHP 5.4). Symfony minimum PHP is 5.3 so the docblock examples should be compatible with that.

2. Previously getSupportedClasses() docblock had an example return value showing a FQCN using a leading slash. AbstractVoter looks for `get_class($object)` in the array of getSupportedClasses() returned values, and `get_class()` returns the FQCN without a leading slash.

Commits
-------

ed226ec [Security] More accurate docblocks for AbstractVoter
2014-10-10 18:59:55 +02:00
John Kary
ed226ec258 [Security] More accurate docblocks for AbstractVoter 2014-10-10 18:59:52 +02:00
Fabien Potencier
fb31e47949 minor #12193 [TwigBundle] remove unused email placeholder from error page (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] remove unused email placeholder from error page

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

remove unused email placeholder from error page

Commits
-------

a64bd03 [TwigBundle] remove unused email placeholder from error page
2014-10-10 18:57:08 +02:00
Fabien Potencier
e38ceff231 bug #12197 [TwigBundle] do not pass a template reference to twig (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] do not pass a template reference to twig

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

twig does not know about template references and only expects a string.
this commit also fixes that name parsing and locating was called twice for nonexistent templates.

Commits
-------

7fe33e3 [TwigBundle] do not pass a template reference to twig
2014-10-10 18:51:35 +02:00
Fabien Potencier
b409b4b473 bug #12196 [TwigBundle] show correct fallback exception template in debug mode (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] show correct fallback exception template in debug mode

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

In debug mode, the exception controller did not show the correct template in case the format is unknown.
It falls back to html but the logic for `exception_full` was not applied there. So it was just returning the partial html.

Commits
-------

b97acd9 [TwigBundle] show correct fallback exception template in debug mode
2014-10-10 18:48:12 +02:00
Tobias Schultze
7fe33e3b1d [TwigBundle] do not pass a template reference to twig
twig does not know about template references and only expects a string.
this commit also fixes that name parsing and locating was called twice for nonexistent templates
2014-10-10 01:37:49 +02:00
Tobias Schultze
b97acd99f1 [TwigBundle] show correct fallback exception template in debug mode 2014-10-10 01:08:09 +02:00
Tobias Schultze
a64bd039b9 [TwigBundle] remove unused email placeholder from error page 2014-10-09 22:00:23 +02:00
Kévin Dunglas
48491c4441 [Serializer] Handle circular references 2014-10-09 19:55:06 +02:00
Fabien Potencier
e19680f31a feature #9073 [Routing] unify RequestContext as fluent class (Tobion)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Routing] unify RequestContext as fluent class

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

- [x] <del>some methods were tagged with `@api` which makes no sense since the class is already tagged as stable. this automatically includes all methods. also our bc promise is only about `@api` on classes</del>
- [x] setParameters the only fluent method! I made them all fluent which makes sense for this class

Commits
-------

41412f9 [Routing] unify fluent interface in RequestContext
2014-10-09 19:36:19 +02:00
Fabien Potencier
60d006df43 minor #12192 use meta charset in layouts without legacy http-equiv (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

use meta charset in layouts without legacy http-equiv

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

`<meta charset="UTF-8" />` is now the recommended approach

Commits
-------

96e7b01 use meta charset in layouts without legacy http-equiv
2014-10-09 19:34:46 +02:00
Tobias Schultze
96e7b01602 use meta charset in layouts without legacy http-equiv 2014-10-09 18:42:17 +02:00
Tobias Schultze
41412f99f0 [Routing] unify fluent interface in RequestContext 2014-10-09 18:12:58 +02:00
Fabien Potencier
8203c66e3a Merge branch '2.5'
* 2.5:
  [Routing] add tests for RequestContext
  [Routing] fix inconsistencies in RequestContext
  don't raise warnings when exception is thrown
  [Framework][DX] Set the proper validator class according to the configured api version
2014-10-09 18:00:19 +02:00
Fabien Potencier
b4ed800529 Merge branch '2.3' into 2.5
* 2.3:
  [Routing] add tests for RequestContext
  [Routing] fix inconsistencies in RequestContext
  don't raise warnings when exception is thrown
2014-10-09 18:00:03 +02:00
Fabien Potencier
4dad67e104 minor #12190 [Routing] fix type inconsistencies in RequestContext (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] fix type inconsistencies in RequestContext

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

Fixed inconsistencies in RequestContext:

- [x] port setters and getters inconsistent with constructor (string vs int)
- [x] host should be lowercased for easier case-insensitivity, see #9072
- [x] fix setQueryString with null
- [x] fix return phpdoc typehint

Commits
-------

676c4a0 [Routing] add tests for RequestContext
f61607f [Routing] fix inconsistencies in RequestContext
2014-10-09 17:56:46 +02:00
Tobias Schultze
676c4a0253 [Routing] add tests for RequestContext 2014-10-09 17:28:58 +02:00
Tobias Schultze
f61607f5cb [Routing] fix inconsistencies in RequestContext 2014-10-09 17:27:10 +02:00
Fabien Potencier
a45c187132 bug #12187 [CssSelector] don't raise warnings when exception is thrown (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[CssSelector] don't raise warnings when exception is thrown

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

`array_map()` raises a warning when an exception is thrown inside the
callback (see https://bugs.php.net/bug.php?id=55416). To avoid these
warnings, `selectorToXPath()` is applied inside the loop.

Commits
-------

38e9623 don't raise warnings when exception is thrown
2014-10-09 16:28:21 +02:00
Christian Flothmann
38e9623ca4 don't raise warnings when exception is thrown
`array_map()` raises a warning when an exception is thrown inside the
callback (see https://bugs.php.net/bug.php?id=55416). To avoid these
warnings, `selectorToXPath()` is applied inside the loop.
2014-10-09 14:30:02 +02:00
Fabien Potencier
cf3cd9578c minor #12184 [FrameworkBundle] add changelog entry for web server commands (xabbuh)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] add changelog entry for web server commands

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

I just noticed that I forgot to add a changelog entry in #11311.

Commits
-------

292088f add changelog entry for web server commands
2014-10-09 12:58:32 +02:00