Commit Graph

19054 Commits

Author SHA1 Message Date
Fabien Potencier
1367ebb000 updated CHANGELOG for 2.5.6 2014-10-24 08:55:31 +02:00
Fabien Potencier
016b0a9ad2 bumped Symfony version to 2.3.22 2014-10-24 08:50:18 +02:00
Fabien Potencier
0a6e90e091 updated VERSION for 2.3.21 2014-10-24 07:54:08 +02:00
Fabien Potencier
297b704287 update CONTRIBUTORS for 2.3.21 2014-10-24 07:53:52 +02:00
Fabien Potencier
f8bc2b092f updated CHANGELOG for 2.3.21 2014-10-24 07:53:40 +02:00
Fabien Potencier
4a1375586c Merge branch '2.5'
* 2.5:
  enforce memcached version to be 2.1.0
  [PropertyAccess] Simplified code
  [FrameworkBundle] improve server:run feedback
  [Form] no need to add the url listener when it does not do anything
  [Form] Fix #11694 - Enforce options value type check in some form types
  Lithuanian security translations
  [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        | [-]
  [Router] Cleanup
  Fixed UPGRADE-3.0.md markup
  [FrameworkBundle] Fixed ide links
  Add missing argument
  [TwigBundle] do not pass a template reference to twig
  [TwigBundle] show correct fallback exception template in debug mode
  [TwigBundle] remove unused email placeholder from error page
  use meta charset in layouts without legacy http-equiv

Conflicts:
	src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
2014-10-24 07:51:19 +02:00
Fabien Potencier
7b43827b17 Merge branch '2.3' into 2.5
* 2.3:
  enforce memcached version to be 2.1.0
  [FrameworkBundle] improve server:run feedback
  [Form] no need to add the url listener when it does not do anything
  [Form] Fix #11694 - Enforce options value type check in some form types
  Lithuanian security translations
  [Router] Cleanup
  [FrameworkBundle] Fixed ide links
  Add missing argument
  [TwigBundle] do not pass a template reference to twig
  [TwigBundle] show correct fallback exception template in debug mode
  [TwigBundle] remove unused email placeholder from error page
  use meta charset in layouts without legacy http-equiv

Conflicts:
	src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php
	src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig
2014-10-24 07:49:22 +02:00
Fabien Potencier
d009b2b4c3 minor #12297 enforce memcached version to be 2.1.0 (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

enforce memcached version to be 2.1.0

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

The signature of the `Memcached::get()` method changed with 2.2.0.
Therefore, tests fail in Symfony when mocking `Memcached` in the
`MemcachedSessionHandlerTest` of the HttpFoundation component (see
also php-memcached-dev/php-memcached#126 and
https://bugs.php.net/bug.php?id=66331).

Commits
-------

2ac5c86 enforce memcached version to be 2.1.0
2014-10-23 22:52:33 +02:00
Christian Flothmann
2ac5c86e37 enforce memcached version to be 2.1.0
The signature of the `Memcached::get()` method changed with 2.2.0.
Therefore, tests fail in Symfony when mocking `Memcached` in the
`MemcachedSessionHandlerTest` of the HttpFoundation component (see
also php-memcached-dev/php-memcached#126 and
https://bugs.php.net/bug.php?id=66331).
2014-10-23 15:11:04 +02:00
Fabien Potencier
7c5321cab0 minor #12292 [PropertyAccess] Simplified code (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[PropertyAccess] Simplified code

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

Makes implementation of #10882 more readable.

Simplifies `camelize()` as pointed out in #12275.

Commits
-------

b712ac1 [PropertyAccess] Simplified code
2014-10-23 08:36:05 +02:00
Bernhard Schussek
b712ac1174 [PropertyAccess] Simplified code 2014-10-22 19:15:20 +02:00
Bernhard Schussek
d1e246e6b8 minor #12277 [Validator] update allowed variants documentation (xabbuh)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] update allowed variants documentation

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

Commits
-------

4e3b78f update allowed variants documentation
2014-10-22 18:33:02 +02:00
Bernhard Schussek
5839832aca [Form] Fixed usage of "name" variable in form_start block 2014-10-22 18:25:21 +02:00
Nicolas Grekas
ac8efd92d1 [HttpKernel] fix DebugHandlersListener 2014-10-22 17:32:46 +02:00
Nicolas Grekas
5af0f899fe [EventDispatcher] perf optim 2014-10-22 17:32:42 +02:00
Nicolas Grekas
c7cf6cfefe [VarDumper] fix control chars styling 2014-10-22 14:09:12 +02:00
Bernhard Schussek
8838143e6f bug #12156 [OptionsResolver] Merged Options class into OptionsResolver (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[OptionsResolver] Merged Options class into OptionsResolver

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #4500, #9174, #10585, #10202, #11020, makes #7979+#10616 obsolete
| License       | MIT
| Doc PR        | symfony/symfony-docs#4159

#11716 was reverted as preparation of this PR (453882cd03).

The Options class was merged into OptionsResolver. This made it possible to fix several tickets, as indicated above.

**Usage**

See [the updated documentation](https://github.com/webmozart/symfony-docs/blob/issue11705/components/options_resolver.rst).

**Bug Fixes**

Previously, the options weren't validated before the normalizers were called. As a result, the normalizers had to perform validation again:

```php
$resolver->setAllowedTypes(array(
    'choices' => 'array',
));
$resolver->setNormalizers(array(
    'choices' => function (Options $options, $value) {
         array_merge($options['choices'], ...);
    },
));

// fatal error
$resolver->resolve(array('choices' => 'foobar'));
```

This is fixed now.

**BC Breaks**

The `array` type hint was removed from `setRequired()`, `setAllowedValues()`, `addAllowedValues()`, `setAllowedTypes()` and `addAllowedTypes()`. If anybody implemented `OptionsResolverInterface`, they must adapt their code.

The Options class was turned into an interface extending ArrayAccess and Countable. Anybody instantiating Options directly should instantiate OptionsResolver instead. Anybody using any of the methods available in Options (`get()`, `has()`) should use the ArrayAccess interface instead.

Normalizers are not called anymore for undefined options (#9174). People need to set a default value if they want a normalizer to be executed independent of the options passed to `resolve()`.

**Deprecations**

OptionsResolverInterface was deprecated and will be removed in 3.0. OptionsResolver instances are not supposed to be shared between classes, hence an interface does not make sense.

Several other methods were deprecated. See the CHANGELOG and UPGRADE-2.6 files for information.

**Todo**

- [x] Fix PHPDoc
- [x] Adapt CHANGELOG/UPGRADE
- [x] Adapt documentation
- [x] Deprecate OptionsResolver[Interface]

Commits
-------

642c119 [OptionsResolver] Merged Options class into OptionsResolver
2014-10-22 11:09:59 +02:00
Bernhard Schussek
642c119e0c [OptionsResolver] Merged Options class into OptionsResolver 2014-10-22 11:07:34 +02:00
Christian Flothmann
4e3b78f5bb update allowed variants documentation 2014-10-21 17:54:16 +02:00
Fabien Potencier
22d3df8f0f feature #12256 [VarDumper] add meta-data on hover (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[VarDumper] add meta-data on hover

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

This PR adds meta-data on hover to HTML dumps:
- strings length
- constants value
- control chars code
- local refs count

Commits
-------

bef48b3 [VarDumper] add meta-data on hover
2014-10-21 14:25:39 +02:00
Bernhard Schussek
453882cd03 Revert "feature #11716 [OptionsResolver] Added a light-weight, low-level API for basic option resolving (webmozart)"
This reverts commit aa594450d2, reversing
changes made to cc63edbfa8.
2014-10-21 11:07:51 +02:00
Nicolas Grekas
bef48b3bc1 [VarDumper] add meta-data on hover 2014-10-20 21:11:43 +02:00
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