Commit Graph

10442 Commits

Author SHA1 Message Date
Bart van den Burg 1fa22d91ae [Form] Output a more usable error when PropertyPath has tried to find adders and getters, but failed to find them 2012-07-09 15:59:56 +02:00
Fabien Potencier 7f9fd11fd0 merged branch asm89/refactor-authentication-success-handling (PR #4599)
Commits
-------

bb138da [Security] Fix regression after rebase. Target url should be firewall dependent
eb19f2c [Security] Add note to CHANGELOG about refactored authentication failure/success handling [Security] Various CS + doc fixes [Security] Exception when authentication failure/success handlers do not return a response [Security] Add authors + fix docblock
f9d5606 [Security] Update AuthenticationFailureHandlerInterface docblock. Never return null
915704c [Security] Move default authentication failure handling strategy to seperate class [Security] Update configuration for changes regarding default failure handler [Security] Fixes + add AbstractFactory test for failure handler
c6aa392 [Security] Move default authentication success handling strategy to seperate class [Security] Update configuration for changes regarding default success handler [Security] Fix + add AbstractFactory test

Discussion
----------

[Security] Refactor authentication success handling

Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=refactor-authentication-success-handling)](http://travis-ci.org/asm89/symfony)
License of the code: MIT

This PR extracts the default authentication success handling to its own class as discussed in #4553. In the end the PR will basically revert #3183 (as suggested by @schmittjoh) and fix point one of #838.

There are a few noticeable changes in this PR:
- This implementation changes the constructor signature of the `AbstractAuthentictionListener` and `UsernamePasswordFormAuthenticationListener` by making the `AuthenticationSuccessHandler` mandatory (BC break). If this WIP is approved I will refactor the failure handling logic too and then this will also move one place in the constructor
- This PR reverts the change of making the returning of a `Response` optional in the `AuthenticationSuccessHandlerInterface`. Developers can now extend the default behavior themselves

@schmittjoh Any suggestions? Or a +1 to do the failure logic too?

---------------------------------------------------------------------------

by schmittjoh at 2012-06-17T23:53:07Z

+1 from me

@fabpot, what so you think?

---------------------------------------------------------------------------

by fabpot at 2012-06-19T08:15:48Z

Can you add a note in the CHANGELOG? Thanks.

---------------------------------------------------------------------------

by asm89 at 2012-06-19T10:22:20Z

I will, but I'll first do the same for the failure logic.

---------------------------------------------------------------------------

by travisbot at 2012-06-21T08:03:14Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1671555) (merged 17c8f66f into 55c6df99).

---------------------------------------------------------------------------

by asm89 at 2012-06-21T08:45:38Z

👍 thank you @stof. I think this is good to go now.

---------------------------------------------------------------------------

by travisbot at 2012-06-21T08:50:28Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1671817) (merged 8982c769 into 55c6df99).

---------------------------------------------------------------------------

by asm89 at 2012-06-21T14:23:58Z

@schmittjoh @fabpot The `LogoutListener` currently throws an exception when the successhandler doesn't return a `Response` ([link](9e9519913d/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php (L101))). Should this code check for this too?

---------------------------------------------------------------------------

by schmittjoh at 2012-06-21T14:26:49Z

Yes, this code was removed, but needs to be re-added here as well.

---------------------------------------------------------------------------

by travisbot at 2012-06-21T15:08:59Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1674437) (merged 5afa240d into 55c6df99).

---------------------------------------------------------------------------

by asm89 at 2012-06-26T06:01:02Z

@fabpot Can you make a final decision on this? If you decide on point 3, this code can be merged.  I agree with the arguments of @stof about the option handling and it 'only' being a BC break for direct users of the security component. I even think these direct users should be really careful anyway, since the behavior of the success and failurehandlers now change back to how they acted in 2.0.

Now I am thinking about it, can't the optional parameters of this class move to setters anyway? That will make it cleaner to extend.

---------------------------------------------------------------------------

by asm89 at 2012-06-28T10:29:50Z

ping @fabpot

---------------------------------------------------------------------------

by fabpot at 2012-06-28T17:23:02Z

I'm ok with option 1 (the BC break). After doing the last changes, can you squash your commits before I merge? Thanks.

---------------------------------------------------------------------------

by asm89 at 2012-07-06T21:59:54Z

@fabpot I rebased the PR, added the authors and also ported the fix that was done in 8ffaafa867 to be contained in the default success handler. I also squashed all the CS and 'small blabla fix' commits. Is it ok now?

Edit: travisbot will probably say that the tests in this PR fail, but that is because current master fails on form things

---------------------------------------------------------------------------

by asm89 at 2012-07-08T18:53:05Z

I rebased the PR, tests are green now: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=refactor-authentication-success-handling)](http://travis-ci.org/asm89/symfony).
2012-07-09 15:29:00 +02:00
Fabien Potencier d100ffaf76 fixed CS 2012-07-09 14:54:20 +02:00
Fabien Potencier d15faad7cd Merge branch '2.0'
* 2.0:
  fixed CS (mainly method signatures)
2012-07-09 14:46:19 +02:00
Fabien Potencier 03d22b74ec fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
Fabien Potencier d6d1d91766 fixed markup 2012-07-09 14:19:00 +02:00
Fabien Potencier 6e1e49e3d6 bumped Symfony version to 2.1.0-DEV 2012-07-09 11:39:24 +02:00
Fabien Potencier 70bb756cd8 updated VERSION for 2.1.0 2012-07-09 09:52:38 +02:00
Fabien Potencier 07a6ef5d68 [Locale] re-activated a test now that the bug is fixed 2012-07-09 09:45:48 +02:00
Fabien Potencier c16de9bc30 merged branch gajdaw/issue_4719_appendix (PR #4795)
Commits
-------

d1a142e Issue #4719 - (Redis and Memcached fixes and test)

Discussion
----------

Issue #4719 - (Redis and Memcached fixes and test)

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/gajdaw/symfony.png?branch=issue_4719_appendix)](http://travis-ci.org/gajdaw/symfony)
Fixes the following tickets: 4719
Todo:
License of the code: MIT
Documentation PR: -

The same problem concerns `RedisProfilerStorage` and `BaseMemcacheProfilerStorage`.
Solution is similar.
2012-07-09 09:36:40 +02:00
Włodzimierz Gajda d1a142ebe8 Issue #4719 - (Redis and Memcached fixes and test) 2012-07-09 09:18:22 +02:00
Fabien Potencier 5def75101e merged 2.0 2012-07-09 08:31:54 +02:00
Fabien Potencier 7a91cace9e merged branch Tobion/patch-1 (PR #4790)
Commits
-------

413e0ae fix another '0' problem

Discussion
----------

[HttpFoundation] fix another '0' problem
2012-07-09 08:31:25 +02:00
Fabien Potencier fd1d5e8c10 merged branch eriksencosta/issue-4718 (PR #4794)
Commits
-------

28f002d [Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix :) (closes #4718)

Discussion
----------

[Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4718
License of the code: MIT

[![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=issue-4718)](http://travis-ci.org/eriksencosta/symfony)

Tests pass on PHP 5.3.3, 5.3.14 and 5.4.4 with ICU 4.2, 4.4 and 4.6 on 32 and 64 bit environments.
2012-07-09 08:28:53 +02:00
Eriksen Costa 28f002d978 [Locale] fixed bug on the parsing of TYPE_INT64 integers in 32 bit and 64 bit environments, caused by PHP bug fix :) (closes #4718) 2012-07-08 22:15:42 -03:00
Bilal Amarni 6c9c2ec1f3 [ClassCollectionLoader] fixed comment striping on classes in global namespace 2012-07-09 00:35:27 +02:00
Tobias Schultze 413e0ae6e6 fix another '0' problem 2012-07-09 00:24:52 +03:00
Alexander bb138dadb3 [Security] Fix regression after rebase. Target url should be firewall dependent 2012-07-08 19:59:10 +02:00
Alexander eb19f2c9e3 [Security] Add note to CHANGELOG about refactored authentication failure/success handling
[Security] Various CS + doc fixes
[Security] Exception when authentication failure/success handlers do not return a response
[Security] Add authors + fix docblock
2012-07-08 19:59:10 +02:00
Alexander f9d5606f3f [Security] Update AuthenticationFailureHandlerInterface docblock. Never return null 2012-07-08 19:59:10 +02:00
Alexander 915704c071 [Security] Move default authentication failure handling strategy to seperate class
[Security] Update configuration for changes regarding default failure handler
[Security] Fixes + add AbstractFactory test for failure handler
2012-07-08 19:59:10 +02:00
Alexander c6aa392df7 [Security] Move default authentication success handling strategy to seperate class
[Security] Update configuration for changes regarding default success handler
[Security] Fix + add AbstractFactory test
2012-07-08 19:59:10 +02:00
Fabien Potencier b34bdd4639 merged branch bschussek/testfix (PR #4787)
Commits
-------

2e1941f [Form] Fixed failing test in AbstractLayoutTest

Discussion
----------

[Form] Fixed failing test in AbstractLayoutTest

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-08 19:29:11 +02:00
Bernhard Schussek 2e1941fe55 [Form] Fixed failing test in AbstractLayoutTest 2012-07-08 16:56:41 +02:00
Fabien Potencier 97b017bf3f merged branch gajdaw/kernel_test_fix (PR #4766)
Commits
-------

6de6806 [Component][HttpKernel] fixed testGetRootDir() on Win

Discussion
----------

[Component][HttpKernel] fixed testGetRootDir() on Win

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/gajdaw/symfony.png?branch=kernel_test_fix)](http://travis-ci.org/gajdaw/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

Method `getRootDir()` returns path containing slashes. On Windows machine `__DIR__` and `DIRECTORY_SEPARATOR` are backslashes. To pass the test on win machine we have to translate `\` into `/`.
2012-07-08 12:14:29 +02:00
Fabien Potencier dd4235ad38 merged branch yanoosh/ticket_4719 (PR #4779)
Commits
-------

74aa502 [HttpKernel] Fix #4719. Added condition which verify existence of profiler dump file. If file does not exists script inserts record to csv file.

Discussion
----------

[HttpKernel] Ticket #4719. Each call of FileProfilerStorage->write method adds row to index file.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

Each call of FileProfilerStorage->write method adds row to index file even if profiler dump is only updated. Event dispatcher in kernel call several times write method to save fresh profiler info. I add condition which checks if profiler file already exist then ignore add row to index file.

---------------------------------------------------------------------------

by fabpot at 2012-07-08T08:04:33Z

Can you squash your commits before I merge? Thanks.

---------------------------------------------------------------------------

by yanoosh at 2012-07-08T10:08:48Z

Ready to merge.
2012-07-08 12:11:25 +02:00
Janusz Jablonski 74aa5021df [HttpKernel] Fix #4719. Added condition which verify existence of profiler dump file. If file does not exists script inserts record to csv file. 2012-07-08 12:07:05 +02:00
Fabien Potencier b8f99ee19e merged branch arnaud-lb/memory-example-fix (PR #4769)
Commits
-------

8997853 [Security] fixed in_memory provider example

Discussion
----------

[Security] fixed in_memory provider example

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

This fixes the in_memory provider configuration example shown by config:dump-reference

---------------------------------------------------------------------------

by stof at 2012-07-06T11:07:50Z

👍
2012-07-08 10:05:28 +02:00
Fabien Potencier 443d70463c merged branch peterkokot/translations (PR #4784)
Commits
-------

df66d90 slovenian validators translations updated

Discussion
----------

Slovenian validators translations updated

Updated Slovenian validators translations for master branch.
2012-07-08 10:05:08 +02:00
Fabien Potencier ea6fbba787 merged branch adrienbrault/patch-1 (PR #4780)
Commits
-------

0a4fd43 [Security] Fix typo in docblock

Discussion
----------

[Security] Fix typo in docblock

Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass:
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:
2012-07-08 10:03:49 +02:00
Peter Kokot df66d90196 slovenian validators translations updated 2012-07-08 09:37:00 +02:00
Francesc Rosàs 6d94f3eaa8 Ensure there is a session before getting the session id 2012-07-07 20:30:29 +02:00
Adrien Brault 0a4fd43e0e [Security] Fix typo in docblock 2012-07-07 20:42:10 +03:00
Fabien Potencier 22470fdb2c merged branch bschussek/issue4732 (PR #4773)
Commits
-------

c09bad8 [Form] Clarified how to adapt forms that inherited from FieldType for Symfony 2.1

Discussion
----------

[Form] Clarified how to adapt forms that inherited from FieldType for Symfony 2.1

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: comments in #4732
Todo: -
2012-07-06 19:45:36 +02:00
Fabien Potencier 0a3436d105 merged branch bschussek/issue4693 (PR #4772)
Commits
-------

d6e1f39 [Form] Fixed FormBuilder to maintain order of its children

Discussion
----------

[Form] Fixed FormBuilder to maintain order of its children

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4693
Todo: -
2012-07-06 19:44:07 +02:00
Fabien Potencier 9146aded18 merged branch bschussek/issue4715 (PR #4771)
Commits
-------

5fe3f39 [Form] Made data mappers completely responsible for dealing with empty values. Removed duplication of code.
9bf6e8b [Form] Compound forms now always need a data mapper. Otherwise an exception is thrown.

Discussion
----------

[Form] Made requirements for data mappers stricter

Bug fix: no
Feature addition: no
Backwards compatibility break: (yes)
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

This cleanup was done while trying to fix #4715, which is not easily fixable right now. It breaks BC for those people who do not extend `FormType` and manually construct `Form` instances, which hopefully nobody does as it is absolutely *not* recommended at this time.
2012-07-06 19:43:23 +02:00
Fabien Potencier 98b6fc7f01 merged branch Adel-E/patch-1 (PR #4775)
Commits
-------

dbb63ae Fix typo change String to string

Discussion
----------

Fix typo change "String" to "string"

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: N/A
Todo: N/A
License of the code: MIT
Documentation PR: N/A
2012-07-06 19:42:36 +02:00
Bernhard Schussek c09bad8aea [Form] Clarified how to adapt forms that inherited from FieldType for Symfony 2.1 2012-07-06 19:15:07 +02:00
Adel dbb63aee9c Fix typo change String to string 2012-07-06 19:52:14 +03:00
Bernhard Schussek d6e1f39d09 [Form] Fixed FormBuilder to maintain order of its children 2012-07-06 17:32:57 +02:00
Bernhard Schussek 5fe3f39ebc [Form] Made data mappers completely responsible for dealing with empty values. Removed duplication of code. 2012-07-06 16:46:24 +02:00
Fabien Potencier 1cb9a74057 [Security] fixed automatic registration of the response listener when creating the listener
This is not a problem with Symfony, but when using the component
standalone (Silex for instance), the context listener might be
instantiated even if the firewall does not need to be fired. In that
case, the handle() method is not called, but the response listener is
called, which means that en empty token is stored in the session.

For Silex, it means that when authenticated, if you visit a 404 page,
you would be disconnected automatically.
2012-07-06 15:59:19 +02:00
Bernhard Schussek 9bf6e8ba59 [Form] Compound forms now always need a data mapper. Otherwise an exception is thrown. 2012-07-06 15:33:06 +02:00
Fabien Potencier 57581193d3 merged branch Inori/refactor-naming (PR #4767)
Commits
-------

819fe34 [Form] refactored variable name to be more consistent with rest of the naming

Discussion
----------

[Form] Refactored config variable naming to be more consistent

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

Since `clientTransformer` is renamed to `viewTransformer` everywhere, I think for consistency reasons config variable name should be changed too..

---------------------------------------------------------------------------

by stloyd at 2012-07-06T07:31:39Z

Maybe also rename of `normTransformers` to `modelTransformers` ? As this were changed too.

---------------------------------------------------------------------------

by Inori at 2012-07-06T07:40:53Z

@stloyd makes sense, done

---------------------------------------------------------------------------

by bschussek at 2012-07-06T08:24:43Z

Thanks for the cleanup. Can you squash the commits and prefix the message with "[Form]" please?

---------------------------------------------------------------------------

by Inori at 2012-07-06T08:43:49Z

@bschussek done

---------------------------------------------------------------------------

by bschussek at 2012-07-06T09:31:04Z

Thanks! @fabpot 👍
2012-07-06 12:00:31 +02:00
Arnaud Le Blanc 8997853dbd [Security] fixed in_memory provider example 2012-07-06 11:40:37 +02:00
Roman Marintsenko 819fe346e0 [Form] refactored variable name to be more consistent with rest of the naming 2012-07-06 11:41:38 +03:00
Włodzimierz Gajda 6de6806123 [Component][HttpKernel] fixed testGetRootDir() on Win 2012-07-06 08:26:06 +02:00
Fabien Potencier a7ad32bde1 merged branch merk/patch-3 (PR #4765)
Commits
-------

0a43d7d Add missing include in OptionsResolver README.md

Discussion
----------

Add missing include in OptionsResolver README.md

There was a missing interface in the readme.
2012-07-06 08:19:23 +02:00
Tim Nagel 0a43d7d27c Add missing include in OptionsResolver README.md 2012-07-06 10:26:35 +10:00
Fabien Potencier 6b5be0b971 merged branch Divi/patch-1 (PR #4762)
Commits
-------

b9c5182 Fix error variable name.

Discussion
----------

Fix error variable name.

If a user has a custom charset (not UTF-8), a message should appear, but the variable name is wrong, and we got this message :

```
Notice: Undefined variable: messages in C:\Work\Project\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration.php line 57
```

---------------------------------------------------------------------------

by 12k at 2012-07-05T12:28:03Z

![Not bad](http://29.media.tumblr.com/tumblr_lltzgnHi5F1qzib3wo1_400.jpg)
2012-07-05 14:43:07 +02:00