Commit Graph

21651 Commits

Author SHA1 Message Date
Fabien Potencier
f1d588512f bug #15515 [Console] Fixed warning when command alias is longer than command name (dosten)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fixed warning when command alias is longer than command name

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

Commits
-------

ecfe944 Fixed warning when command alias is longer than command name
2015-08-12 13:21:35 +02:00
Fabien Potencier
d3a1cb1837 bug #15251 [DoctrineBridge][Form] Fix IdReader when indexing by primary foreign key (giosh94mhz)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge][Form] Fix IdReader when indexing by primary foreign key

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

Port to Symfony 2.7 of PR #14372 . The `IdReader` class can now resolve association and determine the real id value.

There is still room for improvement, though. Since I've added a `new IdReader` in the constructor, it is better to declare `IdReader` as `final` just to be safe.

PS: sorry to keep you waiting, @webmozart . When merging both commit don't forget to add the `@deprecated` annotation, and that `SingleAssociationToIntIdEntity.php` is duplicated.

Commits
-------

799d0e0 [DoctrineBridge][Form] Fix IdReader when indexing by primary foreign key
2015-08-12 11:59:37 +02:00
Fabien Potencier
e8948671a1 Merge branch '2.3' into 2.7
* 2.3:
  Implement the support of timezone objects in the stub IntlDateFormatter
  [DoctrineBridge][Form] Fix EntityChoiceList when indexing by primary foreign key
2015-08-12 11:55:25 +02:00
Fabien Potencier
d6d93dd50a bug #14372 [DoctrineBridge][Form] fix EntityChoiceList when indexing by primary foreign key (giosh94mhz)
This PR was merged into the 2.3 branch.

Discussion
----------

[DoctrineBridge][Form] fix EntityChoiceList when indexing by primary foreign key

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

I've found a bug while using the 'entity' FormType.

Doctrine allow the definition of primary keys which are foreign key of other entities. In this scenario, the `EntityChoiceList` instance check if:
  * the entity has a id composed by a single column and
  * eventually, the column is an integer

When this happens, it use the primary key as "choices indices", but since is an entity it fails in many places, where it expects integer.

The easy solution is to check whether the single-column id is not an association. Anyway, I've fixed it the RightWay™ :), and now it resolve the entity reference to the actual column type, and restart the logic. Code speaks better then words.

Commits
-------

fe4246a [DoctrineBridge][Form] Fix EntityChoiceList when indexing by primary foreign key
2015-08-12 10:05:25 +02:00
Fabien Potencier
b450c8481a bug #15514 removed _self usage when not needed (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

removed _self usage when not needed

| 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

As those calls are macros, there are already imported via the `from` call, so accessing them directly is not need, nor desired.

Commits
-------

3d0577d removed _self usage when not needed
2015-08-11 22:59:59 +02:00
Diego Saint Esteben
ecfe94465d Fixed warning when command alias is longer than command name 2015-08-11 17:08:57 -03:00
Fabien Potencier
3d0577d1d2 removed _self usage when not needed 2015-08-11 17:34:43 +02:00
Fabien Potencier
0ea11e4639 bug #15489 Implement the support of timezone objects in the stub IntlDateFormatter (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Implement the support of timezone objects in the stub IntlDateFormatter

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

As of PHP 5.5, the IntlDateFormatter accepts to use DateTimeZone or IntlTimeZone objects as timezone in the constructor (and in the new setTimeZone method) rather than timezone ids.
This is even the proper way to pass a timezone from a DateTime object as DateTimeZone names are not all valid ICU identifiers (and there is a PR on the Twig-extensions repo to use such feature to support things properly: https://github.com/twigphp/Twig-extensions/pull/148).

I'm considering this as a bugfix because it is a mismatch between the stub implementation and the real class.
Note that for simplicity, these objects are accepted on all PHP versions, as reproducing the behavior of older versions is not possible in the stub anyway (triggering a warning and making the instantiating with ``new`` return ``null``). We already have such differences anyway (the ``setTimeZone`` method exists in all PHP versions in the stub)

Commits
-------

2856abe Implement the support of timezone objects in the stub IntlDateFormatter
2015-08-11 14:30:44 +02:00
Christophe Coevoet
2856abe87f Implement the support of timezone objects in the stub IntlDateFormatter
As of PHP 5.5, the IntlDateFormatter accepts to use DateTimeZone or
IntlTimeZone objects as timezone in the constructor (and in the new
setTimeZone method) rather than timezone ids.
This is even the proper way to pass a timezone from a DateTime object as
DateTimeZone names are not all valid ICU identifiers.
2015-08-11 11:41:21 +02:00
Nicolas Grekas
c0ff72802c Merge branch '2.3' into 2.7
* 2.3:
  typofix - https://github.com/vlajos/misspell_fixer
  [Yaml] Nested merge keys
  Add support for variadic arguments in the GetSetNormalizer

Conflicts:
	src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
	src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
	src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php
	src/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.yml
2015-08-11 09:58:34 +02:00
Nicolas Grekas
d82cd8f8d8 minor #15497 typofix - https://github.com/vlajos/misspell_fixer (vlajos)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15497).

Discussion
----------

typofix - https://github.com/vlajos/misspell_fixer

Fix 3 small typos. Original:  #15494

Commits
-------

0692ca9 typofix - https://github.com/vlajos/misspell_fixer
2015-08-11 09:25:44 +02:00
Veres Lajos
0692ca97cd typofix - https://github.com/vlajos/misspell_fixer 2015-08-11 09:25:28 +02:00
Fabien Potencier
b7506dcc4f minor #15501 [DX] make doctrine mappings compiler pass exception message more understandable (dbu)
This PR was merged into the 2.7 branch.

Discussion
----------

[DX] make doctrine mappings compiler pass exception message more understandable

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

Commits
-------

32f92cc make doctrine mappings compiler pass exception message more understandable
2015-08-10 12:10:02 +02:00
David Buchmann
32f92cc37b make doctrine mappings compiler pass exception message more understandable 2015-08-10 12:05:42 +02:00
Fabien Potencier
620a3d4c69 bug #15426 [Serializer] Add support for variadic arguments in the GetSetNormalizer (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[Serializer] Add support for variadic arguments in the GetSetNormalizer

| 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

There were 2 broken cases:

- when the value was passed, the array was passed as argument, becoming the first value of the variadic array. The array needs to be spread into multiple arguments when calling the method
- when the value was missing, the code would throw a ReflectionException, similar to the issue reported in #13690, because a variadic argument is optional but does not have a default value

Commits
-------

704760b Add support for variadic arguments in the GetSetNormalizer
2015-08-09 10:58:38 +02:00
Fabien Potencier
0f56497cac bug #15480 [Yaml] Nested merge keys (mathroc)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Nested merge keys

When trying to use nested merge keys in Yaml, the ref sometimes had the wrong value

eg, with:

```yaml
taz: &taz
    a: Steve
    w:
        p: 1234
nested:
    <<: *taz
    d: Doug
    w: &nestedref
        p: 12345
    z:
        <<: *nestedref
```

in this case, the ref `nestedref` had the value "Doug", which cause this error :

    Symfony\Component\Yaml\Exception\ParseException: YAML merge keys used with a scalar value instead of an array at line 38 (near "<<: *nestedref").

It now works as expected

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

note: this PR replace #15241

Commits
-------

500c57e [Yaml] Nested merge keys
2015-08-09 10:56:25 +02:00
Nicolas Grekas
7231598b4c bug #15443 [Debug] Enhance DebugClassLoader performance on MacOSX (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Enhance DebugClassLoader performance on MacOSX

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

Commits
-------

af0b8eb [Debug] Enhance DebugClassLoader performance on MacOSX
2015-08-07 08:54:57 +02:00
Nicolas Grekas
17fb7d3bd7 minor #15483 fix debug-ext 003.phpt (glensc)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #15483).

Discussion
----------

fix debug-ext 003.phpt

in my environment the filename is filled, not "-"

$ php --version
PHP 5.5.27 (cli) (built: Jul 17 2015 12:32:05)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

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

Commits
-------

18b6964 fix debug-ext 003.phpt
2015-08-07 08:53:47 +02:00
Elan Ruusamäe
18b6964744 fix debug-ext 003.phpt
in my environment the filename is filled, not "-"

$ php --version
PHP 5.5.27 (cli) (built: Jul 17 2015 12:32:05)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
2015-08-07 08:53:47 +02:00
Mathieu Rochette
500c57e6df [Yaml] Nested merge keys 2015-08-06 22:04:45 +02:00
Fabien Potencier
19ee814cee minor #15470 [FrameworkBundle] [Command] removed unused variable. (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] [Command] removed unused variable.

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

Commits
-------

117e054 [FrameworkBundle] [Command] removed unused variable.
2015-08-06 12:02:52 +02:00
Nicolas Grekas
b08b43e313 Fix one dependency requirement 2015-08-06 11:12:43 +02:00
Nicolas Grekas
500a2c4504 Merge branch '2.3' into 2.7
* 2.3:
  [travis] Build standalone phpunit without symfony/yaml

Conflicts:
	.travis.yml
	src/Symfony/Bundle/TwigBundle/composer.json
2015-08-06 10:34:04 +02:00
Nicolas Grekas
7ebda1e155 minor #15473 [travis] Build standalone phpunit without symfony/yaml (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Build standalone phpunit without symfony/yaml

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

phpunit mixed as a dependency does not work at all. Let's build it standalone, without symfony/yaml.

Commits
-------

4dd0de6 [travis] Build standalone phpunit without symfony/yaml
2015-08-06 10:32:28 +02:00
Nicolas Grekas
4dd0de6694 [travis] Build standalone phpunit without symfony/yaml 2015-08-06 10:22:42 +02:00
Hugo Hamon
117e054f87 [FrameworkBundle] [Command] removed unused variable. 2015-08-05 19:26:57 -04:00
Nicolas Grekas
9ce3200436 Merge branch '2.3' into 2.7
* 2.3:
  Clean wrong whitespaces
  [travis] Build phpunit with local components
  do not remove space between attributes
  [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
  Fix the retrieval of the default value for variadic arguments
  Annotated routes with a variadic parameter
  Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
  Update EngineInterface.php
  let Travis builds fail when PHP 7 jobs fail

Conflicts:
	.travis.yml
	src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
2015-08-05 17:45:00 +02:00
Nicolas Grekas
7fdba25e4f Clean wrong whitespaces 2015-08-05 17:43:06 +02:00
Fabien Potencier
805cd9fd61 minor #14115 let Travis builds fail when PHP 7 jobs fail (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

let Travis builds fail when PHP 7 jobs fail

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

Commits
-------

ecc3df5 let Travis builds fail when PHP 7 jobs fail
2015-08-05 17:26:49 +02:00
Fabien Potencier
3c62ff88ff minor #15457 [travis] Build phpunit with local components (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Build phpunit with local components

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

The tests for PHP7 currently fail because travis ships with a phar phpunit that embeds the yaml components. This one takes priority over the one in the repo. But it is outdated.
The issue arose with PHP7 tests but could have happen with any build.

Commits
-------

ce2a371 [travis] Build phpunit with local components
2015-08-05 17:25:44 +02:00
Nicolas Grekas
ce2a3717fd [travis] Build phpunit with local components 2015-08-05 17:18:22 +02:00
Fabien Potencier
0064d9ebf4 bug #15445 do not remove space between attributes (greg0ire)
This PR was merged into the 2.3 branch.

Discussion
----------

do not remove space between attributes

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

This piece of code adds a space then removes it immediately. One could think that only the space after the last element of the loop is removed, but this is not the case. Space between loop elements are also removed.

Commits
-------

8d2b888 do not remove space between attributes
2015-08-04 14:17:43 +02:00
Nicolas Grekas
af0b8eb26c [Debug] Enhance DebugClassLoader performance on MacOSX 2015-08-04 12:48:55 +02:00
Grégoire Paris
8d2b8881f5 do not remove space between attributes
This piece of code adds a space then removes it immediately. One could think that only the space after the last element of the loop is removed, but this is not the case. Space between loop elements are also removed.
2015-08-04 12:17:13 +02:00
Christophe Coevoet
328ec0133e bug #15263 [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate() (axiac)
This PR was squashed before being merged into the 2.3 branch (closes #15263).

Discussion
----------

[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()

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

'proxy-revalidate' is not a header on its own but a 'Cache-Control' directive
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

Commits
-------

6c22f0a [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
2015-08-03 19:22:19 +02:00
Valentin VALCIU
6c22f0af24 [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate() 2015-08-03 19:22:14 +02:00
Tobias Schultze
e5909bea2c bug #15425 [Routing] Fix the retrieval of the default value for variadic arguments in the annotation loader (wdalmut, stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] Fix the retrieval of the default value for variadic arguments in the annotation loader

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

This takes the test submitted in #13690 and implements the fix for this bug

Commits
-------

73c5eff Fix the retrieval of the default value for variadic arguments
9b7d4c7 Annotated routes with a variadic parameter
2015-08-01 23:19:31 -05:00
Christophe Coevoet
704760b276 Add support for variadic arguments in the GetSetNormalizer 2015-08-01 21:55:55 +02:00
Christophe Coevoet
73c5eff44d Fix the retrieval of the default value for variadic arguments 2015-08-01 21:33:42 +02:00
Walter Dal Mut
9b7d4c7613 Annotated routes with a variadic parameter
There are no variadic default values and that generate a fatal error.
2015-08-01 21:19:19 +02:00
Nicolas Grekas
e23eb56ffe [Locale] Fix Intl requirement 2015-08-01 18:50:08 +02:00
Fabien Potencier
69171d48ea bug #15074 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug? (nuncanada)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15074).

Discussion
----------

Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?

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

Commits
-------

c314659 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
2015-08-01 16:15:14 +02:00
nuncanada
c3146592d9 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug? 2015-08-01 16:15:13 +02:00
Fabien Potencier
041c489548 minor #15080 Update EngineInterface.php (johnnypeck)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15080).

Discussion
----------

Update EngineInterface.php

Grammer in doc comment.

Commits
-------

d60b2bb Update EngineInterface.php
2015-08-01 16:10:55 +02:00
Johnny Peck
d60b2bba60 Update EngineInterface.php
Grammer in doc comment.
2015-08-01 16:10:55 +02:00
Fabien Potencier
a4100f95e7 bug #13828 [Validator] Improve Iban Validation (afurculita)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Improve Iban Validation

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/13802
| License       | MIT
| Doc PR        |

This PR adds 2 more checks for better IBAN validation: the validation of the country code (represented by the first 2 letters) and the format validation according to the country format regex based on http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf.

Commits
-------

07b38de Better Iban Validation
2015-08-01 14:02:04 +02:00
Nicolas Grekas
07fb308225 [Locale] Add missing @group legacy annotations 2015-08-01 11:35:48 +02:00
Alexandru Furculita
07b38dea1f Better Iban Validation
Added more country-based tests, added new error type

The error type `NOT_SUPPORTED_COUNTRY_CODE_ERROR` has been added for the
IBANs from unsupported countries, for which we don't have defined a
format. We will not check anymore if a country code against the Intl
component.
The tests have been completed with more tests for each contry we have
formats defined.

The  4 character length check and the case check has been removed. The message code constants

`TOO_SHORT_ERROR` and `INVALID_CASE_ERROR` has been deprecated
2015-08-01 12:20:04 +03:00
Nicolas Grekas
3d7d378cbc Merge branch '2.3' into 2.7
* 2.3:
  Fix security-acl deps
  Fix doctrine mapping validation type error
  Remove skipping of tests based on ICU data version whenever possible
  Fix the handling of null as locale in the stub intl classes
  do not dump leading backslashes in class names
  Skip ::class constant
  [Config] type specific check for emptiness

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
	src/Symfony/Bundle/SecurityBundle/composer.json
	src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php
	src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
	src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
	src/Symfony/Component/Locale/Tests/LocaleTest.php
	src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php
2015-08-01 11:05:17 +02:00
Nicolas Grekas
1270e72560 Fix security-acl deps 2015-08-01 10:11:30 +02:00