Commit Graph

9229 Commits

Author SHA1 Message Date
Jakub Zalas
a91e200db7 [Filesystem] Added unit tests for touch method. 2012-04-06 19:22:22 +01:00
Jakub Zalas
7e297dbead [Filesystem] Added unit tests for mkdir method. 2012-04-06 19:10:23 +01:00
Bernhard Schussek
658472193d [Form] Improved labels generated by default from form names 2012-04-06 19:50:06 +02:00
Bernhard Schussek
6e0b03a6e2 [Form] Fixed label of prototype in CollectionType 2012-04-06 19:45:42 +02:00
Bernhard Schussek
fc342d1a5b Merge remote branch 'umpirsky/collection-name' into issue3738 2012-04-06 19:34:40 +02:00
Fabien Potencier
38e17c2e87 merged branch Seldaek/termwidth (PR #3805)
Commits
-------

7ce22f0 [Console] Add docblocks
8a2b115 [Console] Mock terminal size to prevent formatting errors on small terminals

Discussion
----------

[Console] Fixes terminal width in tests

This fixes the [tests that broke on travis-ci](http://travis-ci.org/#!/symfony/symfony/jobs/1031109) (which seems to advertise a terminal width of ~34, not sure why).
2012-04-06 19:14:31 +02:00
Jakub Zalas
6ac5486672 [Filesystem] Added unit tests for copy method. 2012-04-06 17:48:54 +01:00
Jakub Zalas
1c833e7d78 [Filesystem] Added missing docblock comment. 2012-04-06 17:48:01 +01:00
Jordi Boggiano
7ce22f0cef [Console] Add docblocks 2012-04-06 18:25:51 +02:00
Jordi Boggiano
8a2b115824 [Console] Mock terminal size to prevent formatting errors on small terminals 2012-04-06 18:24:40 +02:00
Fabien Potencier
20a9961711 merged branch jjbohn/feature/property-path-hasser (PR #3549)
Commits
-------

b6ac1aa [FORM] Give PropertyPath ability to read hassers

Discussion
----------

[Form] Give PropertyPath ability to read hassers

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

Using a `hasser` instead of `isser` for Boolean values is pretty common. I've found myself using `issers` a handful of times just to make an interface play nice with the form component, but the code reads funny now. I don't think we should be accounting for every possible `getter` variation, but I think this one is common enough that it warrants a discussion.

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

by fabpot at 2012-03-11T08:25:31Z

I tend to agree with with. What do you think @bschussek?

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

by kriswallsmith at 2012-03-16T22:42:28Z

I'm not so sure. There are lots of reasons to write a *hasser* that accepts an argument (i.e. `User::hasRole($role)`). Doesn't seem as clean as *issers* and *getters*.

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

by vicb at 2012-03-16T22:49:14Z

> There are lots of reasons to write a hasser that accepts an argument

May be can check for 0 args as we are already using reflexion ?

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

by kriswallsmith at 2012-03-16T22:55:43Z

In that case we should check that there are either 0 arguments or only optional arguments and also consider adding the same logic to the other varieties.

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

by jjbohn at 2012-03-16T23:37:47Z

Passing arguments seems like a pretty big departure for PropertyPath. How would you annotate that? I'm not sure I see a common use case for needing arguments when mapping data to and from forms.

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

by stof at 2012-03-16T23:50:22Z

@jjbohn it is not about passing arguments but about using the hasser only if it does not have required arguments

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

by jjbohn at 2012-03-17T01:54:18Z

Ah. I see. I have a tendency to read @kriswallsmith comments wrong :D. I could see that but iirc, there's not any current check like this on the other accessors. Happy to add it though if there's a consensus.

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

by fabpot at 2012-03-17T11:24:34Z

What's the point is checking the hasser/getter/isser arguments. It's up to the developer to check if he can use them or not. Let's not complexify the code for this.

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

by kriswallsmith at 2012-03-17T15:37:39Z

My concern is that someone writes a hasser method on their model that is not intended for use with the form component but it's called anyway, leading to WTFs.

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

by stof at 2012-04-03T22:28:21Z

@fabpot what's your decision about this ?

@jjbohn you need to rebase your PR. It conflicts with master as tests have been moved

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

by bschussek at 2012-04-05T14:53:55Z

@kriswallsmith is right. The check for 1 === $method->getNumberOfRequiredParameters() can (and should) easily be added to all of the if-clauses here.

Apart from that, I'm okay with adding this.
2012-04-06 15:09:38 +02:00
Fabien Potencier
85535de74b moved a fixture file 2012-04-06 14:27:17 +02:00
Fabien Potencier
245a7b7eec merged branch ruimarinho/icu-48-fix (PR #3748)
Commits
-------

8689e9c [WIP] [Locale] Fixes NumberFormatter tests failing when using ICU 4.8 or 4.8.1

Discussion
----------

[WIP] [Locale] Fixes NumberFormatter tests failing when using ICU 4.8 or 4.8.1.1

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

The ICU CLDR 2.0 data has been updated on ICU 4.8 and the same data set is used on version 4.8.1.1. The problem is related to [this commit](http://bugs.icu-project.org/trac/changeset?reponame=&new=31307%40icu%2Ftrunk%2Fsource%2Fdata%2Fcurr%2Fen.txt&old=31074%40icu%2Ftrunk%2Fsource%2Fdata%2Fcurr%2Fen.txt) which has since been updated with new data and subsequently shipped with version 49.

The `DateFormatter` tests are still failing - see this [gist](https://gist.github.com/2004d40e5167286028ea). Suggestions are welcomed on how to handle this part.

Test results with PHP 5.4.0 with ICU 4.8.1.1 on OSX:

````
FAILURES!
Tests: 5917, Assertions: 12749, Failures: 26, Incomplete: 11, Skipped: 47.
```

with this WIP patch:

```
FAILURES!
Tests: 5917, Assertions: 12749, Failures: 13, Incomplete: 11, Skipped: 47.
```
2012-04-06 14:24:19 +02:00
Fabien Potencier
1387415ec3 merged branch hhamon/route_collection_better_exception_message (PR #3801)
Commits
-------

04ae7cc [Routing] fixed exception message.
f7647f9 [Routing] improved exception message when giving an invalid route name.

Discussion
----------

Route collection better exception message

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-04-06 14:22:10 +02:00
Fabien Potencier
b9daae2847 merged 2.0 2012-04-06 14:21:18 +02:00
Fabien Potencier
f2398f61a6 merged branch Seldaek/console_ex_20 (PR #3802)
Commits
-------

595cc11 [Console] Wrap exception messages to the terminal width to avoid ugly output
97f7b29 [Console] Avoid outputing \r's in exception messages

Discussion
----------

[Console] Exception rendering fixes

This fixes two things:

- `\r`'s in exception messages were output (in case of `\r\n` newlines), creating really weird results on windows.
- long exception messages were wrapping and then the "red" block was completely messed up, with half black/half red lines, now it's wrapped before output if the terminal width can be detected.

If you don't care about merging this for 2.0, you can also merge the `console_ex` branch which applies on master. Due to moving tests and renaming of some normalize stuff in the tests, the two test patches are kind of different.

RFC: I am really not sure where to put those getTerminalWidth/Height methods. I guess this is not the best place.
2012-04-06 14:15:48 +02:00
Fabien Potencier
c140386957 merged branch ruimarinho/http_digest (PR #3781)
Commits
-------

fc41d4f [Security] [HttpDigest] Fixes a configuration error caused by an invalid 'key' child node configuration

Discussion
----------

[Security] [HttpDigest] Fixes a configuration error caused by an invalid "key" child node configuration

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: ![Build status](https://secure.travis-ci.org/ruimarinho/symfony.png?branch=http_digest)
2012-04-06 14:14:53 +02:00
Fabien Potencier
37c9fe9a2b merged branch Seldaek/validator_yaml (PR #3794)
Commits
-------

8ceb569 Fix typo
8702ea5 [Validator] Allow empty keys in the validation config

Discussion
----------

[Validator] Allow empty keys in the validation config

This allows you to just list fields that don't have validation rules (yet), for future reference it's kinda helpful. Right now if they're not commented out a fatal is thrown because null isn't an array.

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

by bschussek at 2012-04-05T15:34:09Z

Could you add a test please?

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

by Seldaek at 2012-04-05T15:34:48Z

The dummy key I added in the test makes it fail without the fix.

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

by bschussek at 2012-04-05T15:46:54Z

Ah, that's perfect, I overlooked that. Thanks!
2012-04-06 14:14:01 +02:00
Fabien Potencier
c392f747b8 merged branch drak/ismethod (PR #3800)
Commits
-------

33881dd [HttpFoundation] Add more tests for casing
aec1339 [HttpFoundation] Coding standards.
bf33bd4 update changelog
3dc72cd Add isMethod() to Request object

Discussion
----------

[HttpFoundation] Add isMethod() to Request object.

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

Justification is for convenience.

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

by hhamon at 2012-04-06T07:14:44Z

+1
2012-04-06 14:11:35 +02:00
Jordi Boggiano
595cc11251 [Console] Wrap exception messages to the terminal width to avoid ugly output 2012-04-06 13:54:54 +02:00
Jordi Boggiano
97f7b29783 [Console] Avoid outputing \r's in exception messages 2012-04-06 13:51:32 +02:00
Drak
33881ddd30 [HttpFoundation] Add more tests for casing 2012-04-06 17:10:55 +05:45
Hugo Hamon
04ae7cc605 [Routing] fixed exception message. 2012-04-06 11:45:36 +02:00
Hugo Hamon
f7647f9325 [Routing] improved exception message when giving an invalid route name. 2012-04-06 10:49:41 +02:00
Drak
aec133996e [HttpFoundation] Coding standards. 2012-04-06 07:29:37 +00:00
Drak
bf33bd469d update changelog 2012-04-06 06:51:39 +00:00
Drak
3dc72cdf21 Add isMethod() to Request object 2012-04-06 12:35:12 +05:45
Konrad Mohrfeldt
f617e02a96 [Validator] added less-strict email host verification
New checkHost attribute in email constraint will
make the validator check for only one of MX, A or AAAA
DNS resource records to verify it as a valid
email address.
2012-04-06 02:33:41 +02:00
Jordi Boggiano
8ceb569b52 Fix typo 2012-04-05 19:10:13 +02:00
Jordi Boggiano
8702ea5f6d [Validator] Allow empty keys in the validation config 2012-04-05 17:21:24 +02:00
Markus Lanthaler
0ccb6fa48d [Yaml] fixed phpdoc (closes symfony/Yaml#3) 2012-04-05 15:34:56 +02:00
Johannes
0024ddce9c Fix for using route name as check_path. 2012-04-05 12:20:11 +03:00
Fabien Potencier
6bcd0a2d40 merged branch drak/caed (PR #3783)
Commits
-------

d04638a [EventDispatcher] More logical positions for classes.

Discussion
----------

[EventDispatcher] More logical positions for classes.

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

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

by stof at 2012-04-04T18:59:02Z

ah sorry, I looked at the patch too fast. Only the interface is moved
2012-04-05 08:11:42 +02:00
Fabien Potencier
fec3d29ea8 merged branch marcw/feat-patch-changelog (PR #3788)
Commits
-------

f5bc208 Updates CHANGELOG for commit f718859.

Discussion
----------

Updates CHANGELOG for commit f718859.
2012-04-05 08:10:14 +02:00
Fabien Potencier
404e58fdef merged branch excelwebzone/hebrew_translations (PR #3787)
Commits
-------

bec2f0f Fix hebrew grammar
1b48abb Hebrew translation update

Discussion
----------

Hebrew translation update
2012-04-05 08:10:03 +02:00
marc.weistroff
f5bc20800c Updates CHANGELOG for commit f718859. 2012-04-05 07:18:00 +02:00
excelwebzone
bec2f0f70a Fix hebrew grammar 2012-04-04 19:12:09 -07:00
excelwebzone
1b48abbfa2 Hebrew translation update 2012-04-04 19:07:45 -07:00
Drak
d04638a9b5 [EventDispatcher] More logical positions for classes. 2012-04-04 22:03:00 +05:45
Fabien Potencier
b4a44fecc9 merged branch stof/en_translations (PR #3782)
Commits
-------

a2f65f7 [FrameworkBundle] Added the translation file for the en locale

Discussion
----------

[FrameworkBundle] Added the translation file for the en locale

This fixes the translation when the fallback is set to another language.
This new file can be used as reference by translators to find missing keys
in their translations as every contributor will be able to update it when
adding new keys.

See the discussion on #3773
2012-04-04 17:34:36 +02:00
Christophe Coevoet
a2f65f7dfa [FrameworkBundle] Added the translation file for the en locale
This fixes the translation when the fallback is set to another language.
This new file can be used as reference by translators to find missing keys
in their translations as every contributor will be able to update it when
adding new keys.
2012-04-04 17:23:03 +02:00
John Bohn
b6ac1aa912 [FORM] Give PropertyPath ability to read hassers 2012-04-04 09:49:16 -05:00
Thomas Chmielowiec (chmielot)
a430f3d8a6 [#3446] [Form] Fix getChoicesForValues of EntityChoiceList on empty values 2012-04-04 15:46:22 +02:00
Rui Marinho
fc41d4f223 [Security] [HttpDigest] Fixes a configuration error caused by an invalid 'key' child node configuration 2012-04-04 14:28:24 +01:00
Fabien Potencier
e4ebffb01b Revert "merged branch ruimarinho/http_digest (PR #3778)"
This reverts commit eb6a26f572, reversing
changes made to a10fee16c1.
2012-04-04 13:13:39 +02:00
Fabien Potencier
eb6a26f572 merged branch ruimarinho/http_digest (PR #3778)
Commits
-------

fd1ea69 [Security] [HttpDigest] Fixes a configuration error caused by an invalid key child node configuration

Discussion
----------

[Security] [HttpDigest] Fixes a configuration error caused by an invalid "key" child node configuration

```
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
```
2012-04-04 12:56:30 +02:00
Rui Marinho
fd1ea69b78 [Security] [HttpDigest] Fixes a configuration error caused by an invalid key child node configuration 2012-04-04 11:36:25 +01:00
Fabien Potencier
71c9dc31f4 merged branch stof/routing_options_import (PR #3775)
Commits
-------

3c32569 [Routing] Added the possibility to define options for imported resources

Discussion
----------

[Routing] Added the possibility to define options for imported resources

Closes #2772
2012-04-04 08:59:44 +02:00
Fabien Potencier
479d808e6e Revert "merged branch jfsimon/master (PR #3613)"
This reverts commit 959158f9b9, reversing
changes made to b9de0be349.
2012-04-04 08:53:58 +02:00
Fabien Potencier
97fd965b70 merged branch stloyd/patch-3 (PR #3771)
Commits
-------

1456e1e Polish translations sync

Discussion
----------

[Validators] Polish translations sync
2012-04-04 08:00:11 +02:00