Commit Graph

15489 Commits

Author SHA1 Message Date
Fabien Potencier
f2b60e9c68 [Console] changed an exception class 2013-10-08 08:39:58 +02:00
Fabien Potencier
5bed1cd6d2 bumped Symfony version to 2.4.0 2013-10-08 08:33:45 +02:00
Fabien Potencier
911b328dc1 bug #9216 [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator (bschussek)
This PR was merged into the master branch.

Discussion
----------

[Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator

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

This is a follow-up PR of #6554 that splits the CsrfTokenGenerator into two separate classes for generating and managing CSRF tokens. As a consequence, it is now possible to explicitly remove or refresh CSRF tokens if they should be used only once. See #9210 for more information.

Commits
-------

d4bb5f4 [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator
2013-10-07 15:08:26 +02:00
Bernhard Schussek
d4bb5f4e3c [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator 2013-10-07 14:50:43 +02:00
Fabien Potencier
4f19105604 updated VERSION for 2.4.0-BETA1 2013-10-07 12:36:58 +02:00
Fabien Potencier
f4bb91f1c7 updated CHANGELOG for 2.4.0-BETA1 2013-10-07 12:36:51 +02:00
Fabien Potencier
937d908c43 fixed test side effects 2013-10-07 12:30:10 +02:00
Fabien Potencier
405a7c15fe feature #9199 [FrameworkBundle] Adds the possibility to register Commands via the DIC (fabpot)
This PR was squashed before being merged into the master branch (closes #9199).

Discussion
----------

[FrameworkBundle] Adds the possibility to register Commands via the DIC

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | don't now
| Fixed tickets | #8166
| License       | MIT
| Doc PR        | symfony/symfony-docs#3031

Todo:

* [x] Documentation
* [x] Clean code (add type hinting)
* [x] Add tests

Commits
-------

cabb1fa [FrameworkBundle] Adds the possibility to register Commands via the DIC
2013-10-04 16:09:28 +02:00
Grégoire Pineau
cabb1fa8bb [FrameworkBundle] Adds the possibility to register Commands via the DIC 2013-10-04 16:09:28 +02:00
Fabien Potencier
678e1de289 skipped some tests on PHP 5.3 2013-10-04 15:17:50 +02:00
Fabien Potencier
e18bd76dd8 [ExpressionLanguage] fixed typo 2013-10-04 11:41:51 +02:00
Fabien Potencier
86ef58c771 fixed some tests 2013-10-04 11:41:28 +02:00
Fabien Potencier
600f3bb5db [Console] fixed tests 2013-10-04 11:08:13 +02:00
Fabien Potencier
5130c0317b feature #9208 [Form] Add a 'submitted' attribute to the form view (egeloen)
This PR was merged into the master branch.

Discussion
----------

[Form] Add a 'submitted' attribute to the form view

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

Basically, the use case of this PR is to determine in the view if a form has been validated by the validator. By default, the valid attribute is true and we can't know if the form has been submitted. Now, we can use `form.vars.submitted && form.vars.valid`.

Commits
-------

a386c74 [Form] Add a 'submitted' attribute to the form view
2013-10-04 07:57:02 +02:00
Eric GELOEN
a386c74153 [Form] Add a 'submitted' attribute to the form view 2013-10-04 00:18:53 +02:00
Fabien Potencier
2d983b5caf removed obsolete code 2013-10-03 09:18:41 +02:00
Fabien Potencier
c6b3ec2729 minor #9201 [ExpressionLanguage] replaced the =~ operator by matches (removed the != operator) (fabpot)
This PR was merged into the master branch.

Discussion
----------

[ExpressionLanguage] replaced the =~ operator by matches (removed the != operator)

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

To be consistent with fabpot/Twig#1209

Commits
-------

4c2d2e2 [ExpressionLanguage] replaced the =~ operator by matches (removed the != operator)
2013-10-02 21:37:33 +02:00
Fabien Potencier
4c2d2e287a [ExpressionLanguage] replaced the =~ operator by matches (removed the != operator) 2013-10-02 20:16:09 +02:00
Fabien Potencier
96fb922e67 bug #9197 [FrameworkBundle] updated XML route description (jfsimon)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] updated XML route description

This PR turns

```xml
<route name="route_1" path="/hello/{name}" class="Symfony\Component\Routing\Route" path_regex="#^/hello(?:/(?P&lt;name&gt;[a-z]+))?$#s">
```

into

```xml
<route name="route_1" class="Symfony\Component\Routing\Route">
    <path regex="#^/hello(?:/(?P&lt;name&gt;[a-z]+))?$#s">/hello/{name}</path>
```

in XML routing description.

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

Commits
-------

7b99ede [FrameworkBundle] updated XML route description
2013-10-02 16:57:54 +02:00
Fabien Potencier
4b094e2b12 bug #9195 [WIP] [FrameworkBundle] fixed container:debug and router:debug commands (fabpot)
This PR was merged into the master branch.

Discussion
----------

[WIP] [FrameworkBundle] fixed container:debug and router:debug commands

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

#7887 is buggy as hell :(

Commits
-------

fe5961a [FrameworkBundle] moved router:debug and container:debug to use the compact layout
bd16157 [FrameworkBundle] changed JSON descriptors to be more readable on PHP 5.4+
1d210f8 [FrameworkBundle] changed the router:debug to use the shortcut notation for the controller
d997dfa [FrameworkBundle] fixed container:debug and router:debug commands
2013-10-02 16:44:28 +02:00
Fabien Potencier
fe5961a6cd [FrameworkBundle] moved router:debug and container:debug to use the compact layout 2013-10-02 16:43:14 +02:00
Fabien Potencier
bd16157e98 [FrameworkBundle] changed JSON descriptors to be more readable on PHP 5.4+ 2013-10-02 16:42:10 +02:00
Fabien Potencier
1d210f86a6 [FrameworkBundle] changed the router:debug to use the shortcut notation for the controller 2013-10-02 16:42:09 +02:00
Fabien Potencier
d997dfa556 [FrameworkBundle] fixed container:debug and router:debug commands 2013-10-02 16:42:09 +02:00
Fabien Potencier
5bd18c01a3 feature #9196 [Console] added a compact layout for the table helper (fabpot)
This PR was merged into the master branch.

Discussion
----------

[Console] added a compact layout for the table helper

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

That helps with large tables like the ones we have in container:debug and router:debug.

Commits
-------

da9bee0 [Console] added a compact layout for the table helper
e9ea733 [Console] added an exception when the padding char is empty to avoid a PHP error in the table helper
2013-10-02 14:11:08 +02:00
Fabien Potencier
da9bee08e4 [Console] added a compact layout for the table helper 2013-10-02 09:34:37 +02:00
Fabien Potencier
e9ea73311f [Console] added an exception when the padding char is empty to avoid a PHP error in the table helper 2013-10-02 09:34:00 +02:00
Jean-François Simon
7b99ede0dc [FrameworkBundle] updated XML route description 2013-10-02 09:30:07 +02:00
Fabien Potencier
04d767db56 fixed CS 2013-10-01 19:34:40 +02:00
Fabien Potencier
e47677edd5 minor #8487 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper (saro0h)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no

Commits
-------

31c6c62 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper
2013-10-01 19:32:30 +02:00
Fabien Potencier
f8f8816e4b Merge branch '2.3'
* 2.3:
  Fix: duplicate usage of Symfony\Component\HttpFoundation\Response
  [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
  Revert "merged branch Tobion/flattenexception (PR #9111)"
  [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied

Conflicts:
	src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
2013-10-01 16:17:10 +02:00
Fabien Potencier
82f6a62bb3 Merge branch '2.2' into 2.3
* 2.2:
  Fix: duplicate usage of Symfony\Component\HttpFoundation\Response
2013-10-01 16:16:42 +02:00
Fabien Potencier
ffe2fb9993 bug #9190 Fix: duplicate usage of Symfony\Component\HttpFoundation\Response (realsim)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9190).

Discussion
----------

Fix: duplicate usage of Symfony\Component\HttpFoundation\Response

Duplicate usage of Symfony\Component\HttpFoundation\Response causes an error:
> PHP Fatal error:  Cannot use Symfony\Component\HttpFoundation\Response as Response because the name is already in use in src/Symfony/Component/Security/Http/Authorization/AccessDeniedHandlerInterface.php on line 17

Commits
-------

e602c09 Fix: duplicate usage of Symfony\Component\HttpFoundation\Response
2013-10-01 16:15:08 +02:00
simpson
70cbfc3180 Fix: duplicate usage of Symfony\Component\HttpFoundation\Response 2013-10-01 16:15:07 +02:00
Fabien Potencier
31fb8c7cc3 feature #7887 [FrameworkBundle] adds routing/container descriptors (jfsimon)
This PR was squashed before being merged into the master branch (closes #7887).

Discussion
----------

[FrameworkBundle] adds routing/container descriptors

The goal of this PR is to add descriptors (as in #7454) for routing and container. This will permit add a `--format` option to `router:debug` and `container:debug` commands (with `txt`, `json`, `xml` and `md` formats).

Commits
-------

22f9bc8 [FrameworkBundle] adds routing/container descriptors
2013-10-01 16:13:14 +02:00
Jean-François Simon
22f9bc887e [FrameworkBundle] adds routing/container descriptors 2013-10-01 16:13:13 +02:00
Fabien Potencier
47d080dbd6 feature #8835 [Console] Fixed verbose option when passing verbosity level as option value (deguif)
This PR was squashed before being merged into the master branch (closes #8835).

Discussion
----------

[Console] Fixed verbose option when passing verbosity level as option value

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

Currently passing a verbosity level to verbose option on console doesn't work unless using the shotcuts _-v_, _-vv_, _-vvv_.

This also fix _accept_value_ in the xml generated by __console help --xml__ for people using the xml output ;)

Commits
-------

a28eb8b [Console] Fixed verbose option when passing verbosity level as option value
2013-10-01 15:40:57 +02:00
François-Xavier de Guillebon
a28eb8b561 [Console] Fixed verbose option when passing verbosity level as option value 2013-10-01 15:34:25 +02:00
Fabien Potencier
b0687c8d81 Merge branch '2.2' into 2.3
* 2.2:
  [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
  [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
2013-10-01 14:47:27 +02:00
Fabien Potencier
a2d6419762 bug #9188 [2.2][Form] add support for Length and Range constraint in ValidatorTypeGuesser (franek)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Form] add support for Length and Range constraint in ValidatorTypeGuesser

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

MaxLength, MinLength, Min and Max constraints are deprecated on 2.2. Will be removed in 2.3.

Add support for type guessing of Length and Range constraints.

fix #9132 on 2.2 branch

Commits
-------

89a0404 [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
2013-10-01 14:45:50 +02:00
Fabien Potencier
abb765f135 minor #8927 [Templating] fix logic regarding template references and many phpdocs (Tobion)
This PR was squashed before being merged into the master branch (closes #8927).

Discussion
----------

[Templating] fix logic regarding template references and many phpdocs

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

this clarifies the expected types and exceptions by much. and it fixes some logic flaws.
- missing info/methods in interfaces
- respecting Twig_LoaderInterface only accepting strings, not objects

related to fabpot/Twig#1183 but does not depend on it

Commits
-------

f6c12bd [Templating] fix logic regarding template references and many phpdocs
2013-10-01 14:37:06 +02:00
Tobias Schultze
f6c12bd6de [Templating] fix logic regarding template references and many phpdocs 2013-10-01 14:37:05 +02:00
franek
89a040434e [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3) 2013-10-01 14:21:02 +02:00
Fabien Potencier
10a88cd2cd feature #9186 [Console] Throw an exception if the command does not contain aliases (lyrixx)
This PR was merged into the master branch.

Discussion
----------

[Console] Throw an exception if the command does not contain aliases

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

It can only happend if the constructor has been overridden

Commits
-------

7e5c901 [Console] Throw an exception if the command does not contain aliases
2013-10-01 12:30:10 +02:00
Grégoire Pineau
7e5c9011c9 [Console] Throw an exception if the command does not contain aliases
It can only happend if the constructor has been overridden
2013-10-01 12:29:09 +02:00
Fabien Potencier
554d57b399 bug#9146 [RC][Form] Let null values clear fields in PATCH requests (alex88)
This PR was merged into the master branch.

Discussion
----------

[RC][Form] Let null values clear fields in PATCH requests

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

I've changed the way form checks wherever or not to submit childs by checking submitted data with array_key_exists and not with just isset.

This way in PATCH requests values are not processed when they are not in array and not also when the value is null. Currently there is no way to null a value with a PATCH request, even passing it null.

This can lead to some BC breaks depending on how users used form in their code.

Commits
-------

f5812c5 [Form] Let null values to unset fields in PATCH requests
2013-10-01 10:38:18 +02:00
Fabien Potencier
112fa5eeed feature#8637 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled (pylebecq)
This PR was squashed before being merged into the master branch (closes #8637).

Discussion
----------

[DomCrawler] Allowed internal validation of ChoiceFormField to be disabled

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

Hi,

Here is a quite basic attempt to be able to disable the internal validation of the ChoiceFormField. It's pretty basic.
Feel free to tell me what you think guys. Maybe I should check the `validationDisabled` property at the beginning of the `containsOption()` method ?
I'll make the documentation PR as soon as the implementation will be validated.

Regards.

Commits
-------

739bf71 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled
2013-10-01 10:36:55 +02:00
Pierre-Yves LEBECQ
739bf715c7 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled 2013-10-01 10:36:54 +02:00
Alessandro Tagliapietra
f5812c5e40 [Form] Let null values to unset fields in PATCH requests 2013-10-01 10:31:32 +02:00
Fabien Potencier
b85b78f24a bug#9183 [Security] Fixed test cases of the Csrf sub-component (bschussek)
This PR was merged into the master branch.

Discussion
----------

[Security] Fixed test cases of the Csrf sub-component

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

Commits
-------

7c7d86e [Security] Fixed test cases of the Csrf sub-component
2013-10-01 10:20:34 +02:00