Commit Graph

17297 Commits

Author SHA1 Message Date
Dariusz Ruminski 464b67ed09 fix CS 2015-07-05 16:01:47 +02:00
Tobias Schultze 8a8a929d5c minor #15198 [HttpFoundation] Remove unused var (Dave Hulbert)
This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #15198).

Discussion
----------

[HttpFoundation] Remove unused var

Minor. Looks like the var `$content` got introduced in aa5e6165, then in 8982c324 the early return meant it wasn't needed.

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

Commits
-------

da5218f Remove var not used due to returning early (introduced in 8982c32)
2015-07-04 00:45:57 +02:00
Dave Hulbert da5218f2ae Remove var not used due to returning early (introduced in 8982c32) 2015-07-04 00:45:56 +02:00
Fabien Potencier 9fcad381be minor #15187 Enhance hhvm test skip message (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Enhance hhvm test skip message

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

Reading our blog about hhvm (http://symfony.com/blog/symfony-2-3-achieves-100-hhvm-compatibility)
I'd like to improve the only single test skip in our code base that exists for hhvm.

HHVM does not trigger strict notices. This is a missing feature of the HHVM parser (https://github.com/facebook/hhvm/issues/5583). But this does not affect in any way the behavior of any PHP app. Strict notices are only for the dev stage.

There is some FUD-friendliness in the article and in the comments (no offence @javiereguiluz ☮):
100% hhvm compat is 100% honest. We did not skip any single tests because of errors, issues nor bugs. And the single missing "feature" of hhvm is this one: strict notices. Kudos to hhvm for what they did: parity is close enough so that the delta can be handled in exactly the same way as we handle deltas between PHP versions.

Commits
-------

5f4015c Enhance hhvm test skip message
2015-07-03 08:43:12 +02:00
Nicolas Grekas 5f4015c3cd Enhance hhvm test skip message 2015-07-03 07:54:45 +02:00
Nicolas Grekas 7c36f0b9a0 [travis] start hhvm first 2015-07-02 08:16:05 +02:00
Fabien Potencier 6bcdee057e minor #15166 Mock microtime() and time() in transient tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Mock microtime() and time() in transient tests

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

Commits
-------

8319ca3 Mock microtime() and time() in transient tests
2015-07-01 19:11:21 +02:00
Fabien Potencier f082cd323b minor #15164 Move HHVM tests out of the allowed failures (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Move HHVM tests out of the allowed failures

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

2.3, 2.6 and 2.7 are now green on HHVM, let's ensure this remains always true!

Commits
-------

ff2ead1 Move HHVM tests out of the allowed failures
2015-07-01 19:07:52 +02:00
Fabien Potencier bace7aeb0b bug #15163 Update DateTimeToArrayTransformer.php (zhil)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15163).

Discussion
----------

Update DateTimeToArrayTransformer.php

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

php have annoying bug with timezone handling. Some timezones (like US/Eastern, US/Central, US/Mountain) are considered "not standard" and not parsed in some cases.
For example, code
```
php -r '$d = new \DateTime("2015-07-01 16:11", new \DateTimeZone("US/Eastern")); print $d->format("r");'
```
return output
```
Wed, 01 Jul 2015 16:11:00 -0400
```

However, code
```
php -r '$d = new \DateTime("2015-07-01 16:11 US/Eastern"); print $d->format("r");'
```
throw exception
```
Exception' with message 'DateTime::__construct(): Failed to parse time string (2015-07-01 16:11 US/Eastern) at position 17 (U): The timezone could not be found in the database'
```

Thats why timezone US/Eastern works in some cases and didnt work in other cases.
This PR fix usage of US/Eastern in code like

```
$formBuilder->add("createdTimestamp", "datetime", ['view_timezone'=$user->timezone])
```

Commits
-------

27b824a Update DateTimeToArrayTransformer.php
2015-07-01 19:05:18 +02:00
zhil 27b824a6b7 Update DateTimeToArrayTransformer.php 2015-07-01 19:05:17 +02:00
Nicolas Grekas 8319ca3b05 Mock microtime() and time() in transient tests 2015-07-01 18:07:08 +02:00
Fabien Potencier 2c0c232f21 bug #15150 [Translation] Azerbaijani language pluralization rule is wrong (shehi)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15150).

Discussion
----------

[Translation] Azerbaijani language pluralization rule is wrong

In AZ, as in TR, pluralization is always 0:

0 kitab (zero books)
1 kitab (1 book)
3 kitab (3 books)
104 kitab (104 books)

Apparently ZF ruleset was wrong in the first place :)

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

Commits
-------

efd927a Azerbaijani language pluralization rule
2015-07-01 16:29:21 +02:00
Şəhriyar İmanov efd927a660 Azerbaijani language pluralization rule
In AZ, as in TR, pluralization is always 0: 

0 kitab (zero books)
1 kitab (1 book)
3 kitab (3 books)
104 kitab (104 books)

Apparently ZF ruleset was wrong in the first place :)
2015-07-01 16:29:20 +02:00
Nicolas Grekas ff2ead17f9 Move HHVM tests out of the allowed failures 2015-07-01 15:03:16 +02:00
Nicolas Grekas 9de0d60b2c [Stopwatch] Fix test 2015-06-30 18:34:54 +02:00
Nicolas Grekas 6e1ae53fea Minor fixes 2015-06-30 18:05:31 +02:00
Fabien Potencier 0020680d92 bug #15146 Towards 100% HHVM compat (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Towards 100% HHVM compat

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

Failing components:
- [x] Debug
- [x] DependencyInjection
- [x] Filesystem
- [x] Form
- [x] HttpFoundation
- [x] Process
- [x] Routing

Related HHVM issues:
- https://github.com/facebook/hhvm/issues/5562
- https://github.com/facebook/hhvm/issues/5561
- https://github.com/facebook/hhvm/issues/5330
- https://github.com/facebook/hhvm/issues/3558
- https://github.com/facebook/hhvm/issues/4901

Commits
-------

b9a76ba Towards 100% HHVM compat
2015-06-30 17:31:35 +02:00
Nicolas Grekas b9a76bab5c Towards 100% HHVM compat 2015-06-30 15:39:12 +02:00
Fabien Potencier 38c08d1fb3 bug #15069 [Form] Fixed: Data mappers always receive forms indexed by their names (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed: Data mappers always receive forms indexed by their names

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

This PR facilitates writing domain-specific data mappers, since it guarantees that you can access forms by name in the data mapper methods. Currently, `Form::add()` does not set the index of the array passed to the data mapper to the form's name.

Commits
-------

86b7fe5 [Form] Fixed: Data mappers always receive forms indexed by their names
2015-06-30 07:54:26 +02:00
Fabien Potencier f28ee56b67 bug #15137 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser (Rvanlaak, xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Initialize SwitchUserEvent::targetUser on attemptExitUser

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

Commits
-------

f999217 trigger event with right user (add test)
01ee3f6 [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
2015-06-30 07:51:24 +02:00
Christian Flothmann f999217a96 trigger event with right user (add test) 2015-06-28 20:33:21 +02:00
Richard van Laak 01ee3f6cda [Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
The `SwitchUserEvent` is triggered in case an account is switched. This works okay while switching to the user, but on exit the `SwitchUserEvent` is triggered again with the original User. That User was not initialized by the provider yet.

load user by UserInterface instead of username
2015-06-28 20:33:21 +02:00
Fabien Potencier 7e418fd954 minor #15129 Fix quoting style consistency. (ogizanagi)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix quoting style consistency.

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

This is a really minor change with reference to [this comment](https://github.com/symfony/symfony/pull/15002#discussion_r32536303).

If it's fine, [those changes](https://github.com/symfony/symfony/compare/symfony:2.7...ogizanagi:fix_quoting_style/2.7) for 2.7 will follow up too.

Commits
-------

57d30f9 Fix quoting style consistency.
2015-06-28 19:07:35 +02:00
ogizanagi 57d30f9746 Fix quoting style consistency. 2015-06-28 12:13:08 +02:00
Fabien Potencier e93a3d7896 bug #15083 [DependencyInjection] Fail when dumping a Definition with no class nor factory (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Fail when dumping a Definition with no class nor factory

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

I tried creating an anonymous inline service with a DefinitionDecorator, but that did not work.
Here is the fix.

Commits
-------

23ad4ad [DependencyInjection] Fail when dumping a Definition with no class nor factory
2015-06-28 09:25:22 +02:00
Nicolas Grekas 23ad4ad133 [DependencyInjection] Fail when dumping a Definition with no class nor factory 2015-06-28 09:23:14 +02:00
Fabien Potencier 77da994658 bug #15127 [Validator] fix validation for Maestro UK card numbers (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] fix validation for Maestro UK card numbers

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

The issue with the fix in #15086 was, that the `[56-69]` part of the regular expression did not cover the numbers from 56 to 69 but only matched one number if it was 5, 6 or 9 which means that the regular expression itself was not only invalid, but also covered only a total maximum length of 18 digits.

Commits
-------

f24532a fix validation for Maestro UK card numbers
2015-06-28 09:11:08 +02:00
Fabien Potencier 0cd30622d3 bug #15128 DbalLogger: Small nonutf8 array fix (vpetrovych, weaverryan)
This PR was merged into the 2.3 branch.

Discussion
----------

DbalLogger: Small nonutf8 array fix

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

Hi guys!

Just a small triage of #9096. Actually, @vpetrovych did all the work, and I was able to rebase and keep his original commit for authorship :).

This is obviously a very minor, edge issue - but the patch is simple. The new `normalizeParams` function is an exact copy-and-paste except for the changes in sha: 1882a2ae47

Thanks!

Commits
-------

1882a2a Normalizing recursively - see #9096
8edd4c6 No change - the normalizeParams is a copy-and-paste of the earlier logic
eae907c fixes issue with logging array of non-utf8 data
2015-06-28 09:09:31 +02:00
Ryan Weaver 1882a2ae47 Normalizing recursively - see #9096 2015-06-27 18:20:43 -04:00
Ryan Weaver 8edd4c6ffb No change - the normalizeParams is a copy-and-paste of the earlier logic 2015-06-27 18:19:06 -04:00
Vladyslav Petrovych eae907c4ed fixes issue with logging array of non-utf8 data 2015-06-27 18:14:41 -04:00
Christian Flothmann f24532a04e fix validation for Maestro UK card numbers 2015-06-27 23:20:18 +02:00
Tobias Schultze d270bdc952 bug #15048 [Translation][Form][choice] empty_value shouldn't be translated when it has an empty value (Restless-ET)
This PR was squashed before being merged into the 2.3 branch (closes #15048).

Discussion
----------

[Translation][Form][choice] empty_value shouldn't be translated when it has an empty value

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

The same fix provided at #14997 but against ```2.3``` branch.

@webmozart As requested. :)

Commits
-------

1a5c4c6 [Translation][Form][choice] empty_value shouldn't be translated when it has an empty value
2015-06-27 19:53:03 +02:00
Restless-ET 1a5c4c6c93 [Translation][Form][choice] empty_value shouldn't be translated when it has an empty value 2015-06-27 19:52:55 +02:00
Fabien Potencier 3ef7a1f6d6 bug #15117 [Form] fixed sending non array data on submit to ResizeListener (BruceWouaigne)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] fixed sending non array data on submit to ResizeListener

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

I agree with @Tobion that #13851 is a bug fix and therefore should be applied on the `2.3` branch too.

Commits
-------

0f185c9 [Form] [EventListener] fixed sending non array data on submit to ResizeListener
2015-06-27 16:14:07 +02:00
Fabien Potencier 06b8e0a068 minor #15107 Fix typo in Italian translation (garak)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15107).

Discussion
----------

Fix typo in Italian translation

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

Commits
-------

26c4413 Fix typo in Italian translation
2015-06-26 20:04:19 +02:00
Massimiliano Arione 26c4413f29 Fix typo in Italian translation 2015-06-26 20:04:19 +02:00
BruceWouaigne 0f185c9fef [Form] [EventListener] fixed sending non array data on submit to ResizeListener 2015-06-26 19:11:54 +02:00
Nicolas Grekas 058bacda10 minor #15077 [HttpFoundation] Use convention to allow throwing from __toString() (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Use convention to allow throwing from __toString()

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

Corollary to #15076, works without it.

Commits
-------

8982c32 [HttpFoundation] Use convention to allow throwing from __toString()
2015-06-25 11:05:04 +02:00
Fabien Potencier ba4a5ebc52 bug #15086 Fixed the regexp for the validator of Maestro-based credit/debit cards (javiereguiluz)
This PR was squashed before being merged into the 2.3 branch (closes #15086).

Discussion
----------

Fixed the regexp for the validator of Maestro-based credit/debit cards

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

Commits
-------

d37962f Fixed the regexp for the validator of Maestro-based credit/debit cards
2015-06-24 16:17:30 +02:00
Javier Eguiluz d37962fb03 Fixed the regexp for the validator of Maestro-based credit/debit cards 2015-06-24 16:17:28 +02:00
Fabien Potencier 18716153ee bug #15058 [Console] Fix STDERR output text on IBM iSeries OS400 (johnkary)
This PR was squashed before being merged into the 2.3 branch (closes #15058).

Discussion
----------

[Console] Fix STDERR output text on IBM iSeries OS400

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

Prior to this PR a Symfony Console command would output error text as random symbols when executed via the IBM console program QSH. Affected error text output such as when a required InputArgument is missing, or when explicitly using `$output->getErrorOutput()->writeln('Some error text here')`.

![Example error output](http://i.imgur.com/PQplK1p.png)

This PR fixes error text so it properly prints to IBM console programs such as QSH and QP2SHELL.

I previously fixed STDOUT for PHP running on IBM iSeries OS400 (Zend Server) using the same approach. Since that PR was merged ConsoleOutput class began using its own output for STDERR which exhibits the same issue STDOUT did.

The following commits and previous Symfony PRs have our relevant discussion about ASCII vs EBCDIC character encoding to fix this issue:

* [Original IBM STDOUT reported in #1434](https://github.com/symfony/symfony/issues/1434)
* [My PR #4152 that fixes #1434](https://github.com/symfony/symfony/pull/4152)

Thanks!
🚀

Commits
-------

23c42ca [Console] Fix STDERR output text on IBM iSeries OS400
2015-06-23 19:48:55 +02:00
John Kary 23c42ca333 [Console] Fix STDERR output text on IBM iSeries OS400 2015-06-23 19:48:52 +02:00
Nicolas Grekas 8982c3246c [HttpFoundation] Use convention to allow throwing from __toString() 2015-06-23 13:38:55 +02:00
Bernhard Schussek 86b7fe590b [Form] Fixed: Data mappers always receive forms indexed by their names 2015-06-22 21:00:03 +02:00
Fabien Potencier 92b0283f49 bug #15065 [Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern) (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern)

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

Commits
-------

5571caa [Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern)
2015-06-22 18:40:03 +02:00
Bernhard Schussek 5571caa305 [Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern) 2015-06-22 17:14:39 +02:00
Fabien Potencier 25a50f5b55 bug #15039 [Translation][update cmd] taken account into bundle overrides path. (aitboudad)
This PR was merged into the 2.3 branch.

Discussion
----------

[Translation][update cmd] taken account into bundle overrides path.

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

Commits
-------

a8f315b [Translation][update cmd] taken account into bundle overrides path.
2015-06-21 22:21:25 +02:00
Fabien Potencier 7a234429fc bug #14964 [bugfix][MonologBridge] WebProcessor: passing $extraFields to BaseWebProcessor (MacDada)
This PR was squashed before being merged into the 2.3 branch (closes #14964).

Discussion
----------

[bugfix][MonologBridge] WebProcessor: passing $extraFields to BaseWebProcessor

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

Commits
-------

f41d1c9 [bugfix][MonologBridge] WebProcessor: passing  to BaseWebProcessor
2015-06-21 22:16:54 +02:00
Dawid Nowak f41d1c929f [bugfix][MonologBridge] WebProcessor: passing to BaseWebProcessor 2015-06-21 22:16:53 +02:00