Commit Graph

13780 Commits

Author SHA1 Message Date
Fabien Potencier
df4cc40082 bug #17568 Improved Bootstrap form theme for hidden fields (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #17568).

Discussion
----------

Improved Bootstrap form theme for hidden fields

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

Commits
-------

ba5d7f9 Improved Bootstrap form theme for hidden fields
2016-03-01 08:14:37 +01:00
Javier Eguiluz
ba5d7f99e9 Improved Bootstrap form theme for hidden fields 2016-03-01 08:14:36 +01:00
Ryan Weaver
260731b806 minor changes 2016-02-28 19:33:45 -05:00
Ryan Weaver
865f2029fd [#17878] Fixing a bug where scalar values caused invalid ordering 2016-02-28 19:31:09 -05:00
Ryan Weaver
cf692a6bd8 [#17724] Fixing autowiring bug where if some args are set, new ones are put in the wrong spot 2016-02-28 19:31:09 -05:00
Fabien Potencier
aadaeecb47 bumped Symfony version to 2.8.4 2016-02-28 22:27:55 +01:00
Fabien Potencier
9f5c8ea99d updated VERSION for 2.8.3 2016-02-28 22:06:17 +01:00
Fabien Potencier
cc198dfff1 bumped Symfony version to 2.7.11 2016-02-28 22:00:57 +01:00
Fabien Potencier
e23be1c90c updated VERSION for 2.7.10 2016-02-28 21:37:08 +01:00
Fabien Potencier
baf35cf3c0 bumped Symfony version to 2.3.39 2016-02-28 20:26:02 +01:00
Fabien Potencier
84203be720 updated VERSION for 2.3.38 2016-02-28 19:24:04 +01:00
Fabien Potencier
4b3a534f3e Merge branch '2.7' into 2.8
* 2.7:
  fixed tests
2016-02-28 17:34:46 +01:00
Fabien Potencier
2fc80cce12 fixed tests 2016-02-28 17:34:40 +01:00
Fabien Potencier
caf2871b87 Merge branch '2.7' into 2.8
* 2.7:
  #17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
  Fix bug when using an private aliased factory service
  ChoiceFormField of type "select" could be "disabled"
  Update contributing docs
  [Console] Fix escaping of trailing backslashes
  Fix constraint validator alias being required
  [ci] clone with depth=1 to kill push-forced PRs
  Add check on If-Range header
2016-02-28 17:20:50 +01:00
Fabien Potencier
51a71ab74a Merge branch '2.3' into 2.7
* 2.3:
  #17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
  Fix bug when using an private aliased factory service
  ChoiceFormField of type "select" could be "disabled"
  Update contributing docs
  [Console] Fix escaping of trailing backslashes
  Fix constraint validator alias being required
  [ci] clone with depth=1 to kill push-forced PRs
  Add check on If-Range header
2016-02-28 17:19:47 +01:00
WouterJ
de406c0e38 Fix bug when using an private aliased factory service 2016-02-28 16:06:53 +01:00
Jules Pietri
feed60785e [Form] fix FQCN in tests added by #17798 2016-02-28 16:05:09 +01:00
Fabien Potencier
82eb951186 Merge branch '2.7' into 2.8
* 2.7:
  bug #17798 [Form] allow `choice_label` option to be `false`
2016-02-28 15:59:45 +01:00
Jules Pietri
017e1d9e6e bug #17798 [Form] allow choice_label option to be false
When `ChoiceType`is expanded, `choice_label` option can be `false`
or return `false` for one or more choices by a callable.
2016-02-26 16:42:52 +01:00
Fabien Potencier
cc9f6b0a95 minor #17900 [DependencyInjection] Simplified code in AutowirePass (hason)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Simplified code in AutowirePass

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

Commits
-------

ce0357e [DependencyInjection] Simplified code in AutowirePass
2016-02-26 07:30:51 +01:00
Jules Pietri
acdd7db377 [Form] fix tests added by #17760 with FQCN 2016-02-26 07:14:25 +01:00
Fabien Potencier
e899fa3f10 Merge branch '2.7' into 2.8
* 2.7:
  [Security] added some tests
2016-02-26 07:05:14 +01:00
Fabien Potencier
7aec568c05 [Security] added some tests 2016-02-26 07:03:43 +01:00
Simon Bouland
576c4b9b42 ChoiceFormField of type "select" could be "disabled" 2016-02-26 06:48:23 +01:00
Fabien Potencier
be30748bc9 bug #17602 [HttpFoundation] Fix BinaryFileResponse incorrect behavior with if-range header (bburnichon)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix BinaryFileResponse incorrect behavior with if-range header

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

Commits
-------

aaad5bd Add check on If-Range header
2016-02-26 06:44:02 +01:00
Fabien Potencier
42467b31d7 Merge branch '2.7' into 2.8
* 2.7:
  [Form] refactor `RadioListMapper::mapDataToForm()`
  [Form] fix choice value "false" in ChoiceType
2016-02-26 06:06:51 +01:00
Fabien Potencier
a7f98315f3 bug #17760 [2.7] [Form] fix choice value "false" in ChoiceType (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] [Form] fix choice value "false" in ChoiceType

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

- [x] Add tests for choices with `boolean` and `null` values, and with a placeholder
- [x] Fix FQCN in 2.8 tests, see #17759
- [x] Remove `choices_as_values` in 3.0 tests, see #17886

Commits
-------

8f918e5 [Form] refactor `RadioListMapper::mapDataToForm()`
3eac469 [Form] fix choice value "false" in ChoiceType
2016-02-26 06:04:56 +01:00
Fabien Potencier
dcd4d2ef4a minor #17913 [2.8] [Form] minor fix some regression in tests with placeholder in AbstractLayout (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] [Form] minor fix some regression in tests with placeholder in AbstractLayout

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

Commits
-------

6977583 [2.8] [Form] minor fix some tests with placeholder in AbstractLayout
2016-02-26 05:11:20 +01:00
Christian Flothmann
20d4c5842a Merge branch '2.7' into 2.8
* 2.7:
  [DependencyInjection] fix tests
2016-02-24 19:55:13 +01:00
Nicolas Grekas
44ae785064 [Console] Fix escaping of trailing backslashes 2016-02-24 15:09:34 +01:00
Jules Pietri
6977583b3d [2.8] [Form] minor fix some tests with placeholder in AbstractLayout 2016-02-24 10:36:18 +01:00
Christian Flothmann
0de21071c3 [DependencyInjection] fix tests 2016-02-23 20:37:29 +01:00
Fabien Potencier
4cbb3fdb64 Merge branch '2.7' into 2.8
* 2.7:
  Validate XLIFF translation files
  [DependencyInjection] replace alias in factories
  replace alias in factory services
2016-02-23 19:27:29 +01:00
Fabien Potencier
6190058d5b bug #17866 [DependencyInjection] replace alias in factories (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] replace alias in factories

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

Commits
-------

b43b79b [DependencyInjection] replace alias in factories
2016-02-23 19:20:19 +01:00
Fabien Potencier
6bb1c6d737 Merge branch '2.3' into 2.7
* 2.3:
  Validate XLIFF translation files
  replace alias in factory services
2016-02-23 19:18:09 +01:00
Fabien Potencier
4b33fd3d45 bug #17867 [DependencyInjection] replace alias in factory services (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] replace alias in factory services

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

Commits
-------

56f8798 replace alias in factory services
2016-02-23 19:17:24 +01:00
Fabien Potencier
0807ff77d0 minor #17903 Validate XLIFF translation files (javiereguiluz)
This PR was squashed before being merged into the 2.3 branch (closes #17903).

Discussion
----------

Validate XLIFF translation files

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

In #17902 @stof proposed to add a simple test to validate `.xlf` files (to avoid issues like #17893).

This is a proposal for that test. My questions:

**1)** Do you agree displaying detailed error messages when the XML is not valid. Example output for the #17893 error:

![error_log](https://cloud.githubusercontent.com/assets/73419/13250664/932d2f14-da2b-11e5-8ea0-ecb43f58feea.png)

Or is it enough displaying just the PHPUnit error message and let the user figure out the details?

![simple_error](https://cloud.githubusercontent.com/assets/73419/13250671/a3b4bfd2-da2b-11e5-9277-454d0dd160b2.png)

**2)** How do I validate the translation files of the Security and Form components? Do I just copy+paste this test in those components?

Commits
-------

db03055 Validate XLIFF translation files
2016-02-23 19:12:36 +01:00
Javier Eguiluz
db0305569d Validate XLIFF translation files 2016-02-23 19:12:35 +01:00
Nicolas Grekas
4d56e5674a Merge branch '2.7' into 2.8
* 2.7:
  Fixed a minor XML issue in a translation file
2016-02-23 13:13:47 +01:00
Nicolas Grekas
4b41b079f0 Merge branch '2.3' into 2.7
* 2.3:
  Fixed a minor XML issue in a translation file
2016-02-23 13:13:02 +01:00
Martin Hasoň
ce0357e2a5 [DependencyInjection] Simplified code in AutowirePass 2016-02-23 13:01:22 +01:00
Javier Eguiluz
3135742c94 Fixed a minor XML issue in a translation file 2016-02-23 11:57:32 +01:00
Nicolas Grekas
1083ffe273 Merge branch '2.7' into 2.8
* 2.7:
  Fix merge
2016-02-23 08:41:20 +01:00
Nicolas Grekas
b58b3a83e5 Fix merge 2016-02-23 08:38:51 +01:00
Christian Flothmann
b43b79bd71 [DependencyInjection] replace alias in factories 2016-02-22 18:00:41 +01:00
Nicolas Grekas
af2d41939d Fix merge 2016-02-22 17:50:46 +01:00
Nicolas Grekas
8b36290e36 Merge branch '2.7' into 2.8
* 2.7:
  Fix merge
2016-02-22 17:41:45 +01:00
Nicolas Grekas
fd827b3366 Fix merge 2016-02-22 17:41:31 +01:00
Nicolas Grekas
07535e9e84 Merge branch '2.7' into 2.8
* 2.7:
  PhpUnitNoDedicateAssertFixer results
  Improve Norwegian translations
  Simplify markdown for PR template
2016-02-22 17:12:45 +01:00
Nicolas Grekas
ba35f3d7bb Merge branch '2.3' into 2.7
* 2.3:
  PhpUnitNoDedicateAssertFixer results
  Improve Norwegian translations
  Simplify markdown for PR template

Conflicts:
	src/Symfony/Bridge/Propel1/Tests/Form/DataTransformer/CollectionToArrayTransformerTest.php
	src/Symfony/Component/Security/Tests/Core/SecurityContextTest.php
2016-02-22 17:12:29 +01:00
Jules Pietri
8f918e5f84 [Form] refactor RadioListMapper::mapDataToForm()
This fixes "false" choice pre selection when `ChoiceType`
is `expanded` and not `multiple`
2016-02-22 16:33:26 +01:00
Jules Pietri
3eac4693ad [Form] fix choice value "false" in ChoiceType 2016-02-22 16:33:26 +01:00
Fabien Potencier
5324e5b315 Merge branch '2.7' into 2.8
* 2.7:
  Update twig.html.twig
  [2.7] [FrameworkBundle] minor fix tests added by #17569
  fixed CS
  fixed CS
  documented the $url parameter better
  [Form] add test for ArrayChoiceList handling null
  [Form] fix edge cases with choice placeholder
  register commands from kernel when accessing list
  Update FileSystem
2016-02-22 16:02:30 +01:00
Benoît Burnichon
aaad5bd3d1 Add check on If-Range header
Also verify edge case where no last-modified header is available
2016-02-22 12:57:02 +01:00
SpacePossum
7aff7f42c1 PhpUnitNoDedicateAssertFixer results 2016-02-21 12:34:19 +01:00
Christian Flothmann
56f87982d8 replace alias in factory services 2016-02-20 20:14:11 +01:00
Valentin Jonovs
73a5d6c684 Improve Norwegian translations 2016-02-20 17:42:01 +01:00
Fabien Potencier
653428af76 Merge branch '2.3' into 2.7
* 2.3:
  fixed CS
  fixed CS
  documented the $url parameter better
  register commands from kernel when accessing list
  Update FileSystem
2016-02-18 17:03:55 +01:00
Fabien Potencier
e932baec28 bug #17569 [FrameworkBundle] read commands from bundles when accessing list (havvg)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] read commands from bundles when accessing list

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

This allows access to the list of commands registered by the kernel (bundle and later service ids) programmatically when you do not `run` the application.

Commits
-------

0fe3088 register commands from kernel when accessing list
2016-02-18 16:42:34 +01:00
Fabien Potencier
1f22290d8c fixed CS 2016-02-18 16:12:50 +01:00
Fabien Potencier
7ce861d09a bug #16987 [FileSystem] Windows fix (flip111)
This PR was merged into the 2.3 branch.

Discussion
----------

[FileSystem] Windows fix

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

* Fixes edge case on windows where PHP does not generate a PHP Warning but instead returns a wrong result https://bugs.php.net/bug.php?id=71103
* Improved error reporting on `unlink` used in `remove()`

Commits
-------

0d5f7e2 Update FileSystem
2016-02-18 16:09:31 +01:00
Fabien Potencier
59944896f2 documented the $url parameter better 2016-02-18 14:55:48 +01:00
Tobias Schultze
00e38198b7 [Form] add test for ArrayChoiceList handling null 2016-02-18 14:16:01 +01:00
Fabien Potencier
d3c55cb3f1 bug #17787 [Form] Fix choice placeholder edge cases (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix choice placeholder edge cases

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

Fixing several problems with choice placeholder that enhances #9030 for more edge cases:

- A choice with an empty value manually added in the choices array should only be considered a placeholder when it is the first element in the final choice select.
This is part of the HTML spec and how browsers also behave. If you select a choice with an empty value that is not the first option, it will still pass the "required" check
and thus submit the empty value. So it's not a placeholder.
If in the example below you move the empty option to the first place, the browsers will error on submit that you
must select a value. So only then it is a placeholder to show as initial value.

```html
<select id="form_timezone" name="form[timezone]" required="required">
    <option value="Africa/Abidjan">Abidjan</option>
    <option value="">Empty</option>
</select>
```

Also the validator https://validator.w3.org/nu/ will mark the above code as error:
> The first child option element of a select element with a required attribute, and without a multiple attribute, and without a size attribute whose value is greater than 1, must have either an empty value attribute, or must have no text content. Consider either adding a placeholder option label, or adding a size attribute with a value equal to the number of option elements.

This is fixed by replacing`0 !== count($choiceList->getChoicesForValues(array('')))` with `$view->vars['placeholder_in_choices'] = $choiceListView->hasPlaceholder()`.
Which means, the required attribute is removed automatically because the select form element is required implicitly anyway due to the nature of the choice UI.

- As the above quote mentions, the `size` attribute also has impact. Namely for a select with size > 1 it can be possible to have a required attribute even without placeholder.
This is because when the size > 1, there is no default choice selected (similar to select with "multiple").

- A placeholder for required radio buttons or a select with size > 1 does not make sense as it would just be fake data that can be submitted (similar to the ignored placeholder for multi-select and checkboxes).

Commits
-------

0efbc30 [Form] fix edge cases with choice placeholder
2016-02-18 13:07:46 +01:00
Nicolas Grekas
cd232ecd55 Merge branch '2.7' into 2.8
* 2.7:
  Create PULL_REQUEST_TEMPLATE.md
  Remove duplicate validation in RedirectResponse
  [Yaml] fix default timezone to be UTC
  [DependencyInjection] fix dumped YAML string
  [Config] Add suggest to composer.json for symfony/yaml

Conflicts:
	src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
2016-02-18 09:58:48 +01:00
Nicolas Grekas
de5c737426 Merge branch '2.3' into 2.7
* 2.3:
  Create PULL_REQUEST_TEMPLATE.md
  Remove duplicate validation in RedirectResponse
  [Yaml] fix default timezone to be UTC
  [DependencyInjection] fix dumped YAML string

Conflicts:
	src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
	src/Symfony/Component/Yaml/Tests/InlineTest.php
2016-02-18 09:57:30 +01:00
Fabien Potencier
31d4548d78 minor #17827 [Config] Add suggest to composer.json for symfony/yaml (Calin Mihai Pristavu)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Add suggest to composer.json for symfony/yaml

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

Fixes #17826

Commits
-------

2200b0c [Config] Add suggest to composer.json for symfony/yaml
2016-02-18 08:23:36 +01:00
Fabien Potencier
5fda221d47 bug #17835 [Yaml] fix default timezone to be UTC (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] fix default timezone to be UTC

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

Commits
-------

e9ee877 [Yaml] fix default timezone to be UTC
2016-02-18 08:04:48 +01:00
Tobias Schultze
d27c4f4d68 Remove duplicate validation in RedirectResponse 2016-02-18 01:47:59 +01:00
Christian Flothmann
e9ee877e4b [Yaml] fix default timezone to be UTC 2016-02-17 22:15:58 +01:00
Christian Flothmann
b1bb135249 [DependencyInjection] fix dumped YAML string 2016-02-17 17:36:45 +01:00
Calin Mihai Pristavu
2200b0c178 [Config] Add suggest to composer.json for symfony/yaml 2016-02-17 16:19:09 +02:00
Fabien Potencier
2ddab1d055 Merge branch '2.7' into 2.8
* 2.7:
  The exception should be thrown if an object doesn't implement Traversable AND doesn't implement Countable, not when it doesn't implement Traversable but DOES implement Countable
  [Form] fix violation mapper tests
  [HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method
  don't rely on deprecated YAML parser feature
2016-02-17 07:14:28 +01:00
Fabien Potencier
fd33367074 minor #17820 [Form] fix violation mapper tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fix violation mapper tests

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

This takes into account the changes to the `getErrors()` in Symfony 2.5
(the method rturns a `FormErrorIterator` instead of an array) as well as
the fact that non-submitted forms do not accept errors since #10567
anymore.

Commits
-------

f87558d [Form] fix violation mapper tests
2016-02-17 07:13:55 +01:00
Robin Kanters
8eea65e0d8 The exception should be thrown if an object doesn't implement Traversable AND doesn't implement Countable, not when it doesn't implement Traversable but DOES implement Countable 2016-02-17 07:12:58 +01:00
Christian Flothmann
f87558d05e [Form] fix violation mapper tests
This takes into account the changes to the `getErrors()` in Symfony 2.5
(the method rturns a `FormErrorIterator` instead of an array) as well as
the fact that non-submitted forms do not accept errors since #10567
anymore.
2016-02-16 20:52:17 +01:00
Jakub Zalas
2849152c5e [HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method 2016-02-16 16:51:17 +00:00
Christian Flothmann
1c79c7b234 Merge branch '2.3' into 2.7
* 2.3:
  don't rely on deprecated YAML parser feature
2016-02-16 10:30:21 +01:00
Christian Flothmann
c8d387f131 don't rely on deprecated YAML parser feature 2016-02-16 09:57:10 +01:00
Fabien Potencier
9bd9978c31 minor #17812 [Yaml] always restore the error handler in tests (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] always restore the error handler in tests

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

The error handler must be restored even when assertions failed.

Commits
-------

7631202 [Yaml] always restore the error handler in tests
2016-02-16 08:12:44 +01:00
Fabien Potencier
fc2fa79bb5 Merge branch '2.7' into 2.8
* 2.7:
  [DependencyInjection] fix dumped YAML snytax
  Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode. In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
  [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
  [TwigBridge] Symfony 3.1 forward compatibility
2016-02-16 07:09:38 +01:00
Fabien Potencier
457967c6c7 Merge branch '2.3' into 2.7
* 2.3:
  [DependencyInjection] fix dumped YAML snytax
  Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode. In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
  [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
  [TwigBridge] Symfony 3.1 forward compatibility
2016-02-16 07:07:10 +01:00
Fabien Potencier
3f749d6559 bug #17814 [DependencyInjection] fix dumped YAML snytax (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] fix dumped YAML snytax

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

see the failing tests in #17809

Commits
-------

30388f1 [DependencyInjection] fix dumped YAML snytax
2016-02-16 07:02:27 +01:00
Christian Flothmann
30388f17ff [DependencyInjection] fix dumped YAML snytax 2016-02-15 22:04:15 +01:00
Tomas Liubinas
3c0615141e Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode.
In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
2016-02-15 20:17:39 +01:00
Christian Flothmann
7631202155 [Yaml] always restore the error handler in tests
The error handler must be restored even when assertions failed.
2016-02-15 19:17:14 +01:00
Fabien Potencier
d4ac467462 bug #17099 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path (alekitto)
This PR was squashed before being merged into the 2.3 branch (closes #17099).

Discussion
----------

[Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path

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

Commits
-------

f005c80 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
2016-02-15 10:19:57 +01:00
Alessandro Chitolina
f005c80bc5 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path 2016-02-15 10:19:56 +01:00
Fabien Potencier
4688f99ea1 bug #17790 [Config] Fix EnumNodeDefinition to allow building enum nodes with one element (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[Config] Fix EnumNodeDefinition to allow building enum nodes with one element

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

Commits
-------

e9111e4 [Config] Fix EnumNodeDefinition to allow building enum nodes with one element
2016-02-14 14:45:42 +01:00
Fabien Potencier
5cf36ad563 Merge branch '2.7' into 2.8
* 2.7:
  Fix locale and written standard inconsistencies for Norwegian translations
  [Form] [Validator] Fix locale inconsistencies in Norwegian translations
  fixed CS
  [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
  [Form] remove useless code in ResizeFormListener
2016-02-14 14:08:45 +01:00
Fabien Potencier
dc59e42257 Merge branch '2.3' into 2.7
* 2.3:
  [Form] [Validator] Fix locale inconsistencies in Norwegian translations
  fixed CS
  [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
  [Form] remove useless code in ResizeFormListener
2016-02-14 14:08:36 +01:00
Valentin Jonovs
67d343fd69 Fix locale and written standard inconsistencies for Norwegian translations 2016-02-14 14:07:55 +01:00
Fabien Potencier
1229b6d9b9 minor #17795 [Form] [Validator] Fix locale inconsistencies in Norwegian translations (valisj)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] [Validator] Fix locale inconsistencies in Norwegian translations

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

See #17785

Commits
-------

ab2ac93 [Form] [Validator] Fix locale inconsistencies in Norwegian translations
2016-02-14 14:06:33 +01:00
Valentin Jonovs
ab2ac93a45 [Form] [Validator] Fix locale inconsistencies in Norwegian translations
| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | N/A
| License       | MIT
2016-02-14 12:22:09 +01:00
Fabien Potencier
f6ffc4e744 bug #17729 [Yaml] properly parse lists in object maps (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] properly parse lists in object maps

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17709, #17710, #17711
| License       | MIT
| Doc PR        |
* do not cast parsed sequences to objects
* properly handle numeric mapping keys

Commits
-------

ee9ca93 [Yaml] properly parse lists in object maps
2016-02-14 11:09:04 +01:00
Fabien Potencier
55b71ebd93 fixed CS 2016-02-14 11:04:53 +01:00
Fabien Potencier
ee01786dbd bug #17719 [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder (lukaszmakuch)
This PR was squashed before being merged into the 2.3 branch (closes #17719).

Discussion
----------

[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder

[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder

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

The ContainerBuilder class wasn't implementing the ContainerInterface interface as it should according to the Liskov substitution principle.

It caused dependency on implementation instead than on the interface when using an instance of the ContainerBuilder class.

For example this code:
```php
<?php
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
use Symfony\Component\DependencyInjection\ContainerInterface;

/* @var $container ContainerInterface */
try {
    $container->get("wrong_service_key");
} catch (ServiceNotFoundException $e) {
    //action on a wrong key
}
```
works for correct implementations of the ContainerInterface interface, but the ContainerBuilder class was breaking that by throwing more abstract exceptions.

As the ServiceNotFoundException exceptions inherits from the InvalidArgumentException exception, this change shouldn't break code which catches the InvalidArgumentException exception while fetching values from a ContainerInterface interface implementation.

Commits
-------

aecb0fa [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
2016-02-14 11:03:23 +01:00
Łukasz Makuch
aecb0fae3a [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder 2016-02-14 11:03:21 +01:00
Christian Flothmann
ee9ca93600 [Yaml] properly parse lists in object maps
* do not cast parsed sequences to objects
* properly handle numeric mapping keys
2016-02-14 10:03:05 +01:00
Tobias Schultze
088c20c9b3 [Form] remove useless code in ResizeFormListener 2016-02-13 18:06:22 +01:00
Tobias Schultze
0efbc30304 [Form] fix edge cases with choice placeholder 2016-02-13 13:18:37 +01:00
Maxime Steinhausser
e9111e4ef1 [Config] Fix EnumNodeDefinition to allow building enum nodes with one element 2016-02-13 11:44:39 +01:00
Nicolas Grekas
1d8d43b4e7 Merge branch '2.7' into 2.8
* 2.7:
  [VarDumper] Fix tests on PHP 7
  [DomCrawler] Clarify the value returned by getPhpFiles()
  [DependencyInjection] Fix #16461 Let Container::set() replace existing aliases
  avoid (string) catchable fatal error for instances of __PHP_Incomplete_Class
  remove unnecessary retrieval and setting of data
  avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
  sendContent return as parent.
  [FrameworkBundle] Fix a typo
  Added more exceptions to singularify method
2016-02-13 10:21:29 +01:00
Nicolas Grekas
ec7b3f2053 Merge branch '2.3' into 2.7
* 2.3:
  [DomCrawler] Clarify the value returned by getPhpFiles()
  [DependencyInjection] Fix #16461 Let Container::set() replace existing aliases
  Added more exceptions to singularify method
2016-02-13 10:21:13 +01:00
Nicolas Grekas
5d433cab96 [VarDumper] Fix tests on PHP 7 2016-02-12 18:39:33 +01:00
Jakub Zalas
a694401e35 [DomCrawler] Clarify the value returned by getPhpFiles()
The comment was previously suggesting the returned value is similar to the one stored in $_FILES, while it is more similar to the way PHP stores submitted form values. It is actually more convenient to have it this way, so rather then changing the returned value (which would break BC), it is better to clarify the comment.
2016-02-12 10:10:06 +00:00
Matthieu Napoli
be85d16940 [DependencyInjection] Fix #16461 Let Container::set() replace existing aliases
`Container::set()` now overrides any previously alias defined with the same name.
2016-02-12 09:48:06 +01:00
Fabien Potencier
92d291a17c bug #17745 Added more exceptions to singularify method (javiereguiluz)
This PR was merged into the 2.3 branch.

Discussion
----------

Added more exceptions to singularify method

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

Added exceptions for `series`, `news` and `services`.

Commits
-------

f5daa0d Added more exceptions to singularify method
2016-02-12 07:37:13 +01:00
Yonel Ceruto
4b7ed987dd avoid (string) catchable fatal error for instances of __PHP_Incomplete_Class 2016-02-12 07:25:11 +01:00
Fabien Potencier
4598b74906 Merge branch '2.3' into 2.7
* 2.3:
  remove unnecessary retrieval and setting of data
  avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
  sendContent return as parent.
  [FrameworkBundle] Fix a typo
2016-02-12 07:23:50 +01:00
Fabien Potencier
81d654fb5c bug #17766 Fixed (string) catchable fatal error for PHP Incomplete Class instances (yceruto)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed (string) catchable fatal error for PHP Incomplete Class instances

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

Fixing for 2.3 branch.

Commits
-------

bb29979 avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
2016-02-12 07:16:22 +01:00
Trent Steel
ea52400097 remove unnecessary retrieval and setting of data 2016-02-12 00:13:18 +01:00
Thomas Lallement
0a5df6f11a Update validators.fr.xlf 2016-02-11 16:57:09 +01:00
Yonel Ceruto
bb29979218 avoid (string) catchable fatal error for __PHP_Incomplete_Class instances 2016-02-11 09:15:16 -05:00
possum
120dfe48a6 sendContent return as parent. 2016-02-10 20:09:02 +01:00
Jakub Zalas
3d7f6c69c2 [DomCrawler] Remove the overridden getHash() method to prevent problems when cloning the crawler
Overriding the SplObjectStorage::getHash() is affected by a PHP bug (https://bugs.php.net/bug.php?id=67582),
which makes the Crawler unusable in Symfony 2.8 for anyone who relied on SplObjectStorage methods.
Removing the getHash() method means we will no longer trigger the deprecation error. Given this method
is unlikely to be used directly and other SplObjectStorage methods will trigger the error, it is the simplest
thing we can do to maintain BC.
2016-02-10 13:25:51 +00:00
Javier Eguiluz
f5daa0dea9 Added more exceptions to singularify method 2016-02-09 22:08:46 +01:00
Nicolas Grekas
afe4cbbfae Merge branch '2.7' into 2.8
* 2.7:
  [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors
2016-02-04 15:44:13 +01:00
Nicolas Grekas
927fe13af2 Merge branch '2.3' into 2.7
* 2.3:
  [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors
2016-02-04 15:43:56 +01:00
Nicolas Grekas
2573a380f8 minor #17686 [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors

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

E.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.5754#L1525

Commits
-------

1d4ea39 [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors
2016-02-04 15:43:31 +01:00
Nicolas Grekas
1d4ea39512 [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors 2016-02-04 15:25:59 +01:00
Nicolas Grekas
1a8ee4fb7a Merge branch '2.7' into 2.8
* 2.7:
  add files used in FileResource objects
2016-02-04 14:53:00 +01:00
Nicolas Grekas
3af65d72ec Merge branch '2.3' into 2.7
* 2.3:
  add files used in FileResource objects
2016-02-04 14:52:46 +01:00
Nicolas Grekas
0114091e02 bug #17673 [Routing] add files used in FileResource objects (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Routing] add files used in FileResource objects

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

Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.

Commits
-------

73afd0f add files used in FileResource objects
2016-02-04 14:51:25 +01:00
Nicolas Grekas
85cad75976 Merge branch '2.7' into 2.8
* 2.7:
  [Routing] added a suggestion to add the HttpFoundation component.
  [travis] Add some comments
  changed operator from and to &&
  Fixed the Bootstrap form theme for inlined checkbox/radio

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php
2016-02-04 13:12:02 +01:00
Christian Flothmann
73afd0f0e7 add files used in FileResource objects
Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.
2016-02-03 19:56:51 +01:00
Christian Flothmann
4f865c758a add files used in FileResource objects
Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.
2016-02-03 19:52:07 +01:00
Christian Flothmann
0e45a4a5de [Console] remove readline support 2016-02-03 19:01:35 +01:00
Hugo Hamon
a45e8bbc34 [Routing] added a suggestion to add the HttpFoundation component. 2016-02-03 14:12:30 +02:00
Nicolas Grekas
bad218d44e Merge branch '2.7' into 2.8
* 2.7:
  [Process] Fix transient tests for incremental outputs
2016-02-02 14:33:15 +01:00
Nicolas Grekas
114e5d68d2 Merge branch '2.3' into 2.7
* 2.3:
  [Process] Fix transient tests for incremental outputs

Conflicts:
	src/Symfony/Component/Process/Tests/ProcessTest.php
2016-02-02 14:32:58 +01:00
Nicolas Grekas
90455dfe56 [Process] Fix transient tests for incremental outputs 2016-02-02 14:16:45 +01:00
Nicolas Grekas
ab1fab2911 Merge branch '2.7' into 2.8
* 2.7:
  [Console] Add missing `@require` annotation in test
  Fix merge
  [appveyor] Fix failure reporting
  [#17634] move DebugBundle license file
  backport GlobTest from 2.7 branch
  Move licenses according to new best practices
  [FrameworkBundle] Remove unused code in test
  [2.3] Fixed an undefined variable in Glob::toRegex
  simplified a test
  fix container cache key generation
  [Form] fix option name in changelog
  [Translation] Add resources from fallback locale
  [DependencyInjection] enforce tags to have a name
  [YAML] Refine the return value of Yaml::parse()

Conflicts:
	src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
2016-02-02 10:49:18 +01:00
Nicolas Grekas
e874754dee [Console] Add missing @require annotation in test 2016-02-02 10:46:12 +01:00
Nicolas Grekas
49031493ef Fix merge 2016-02-01 21:47:29 +01:00
Nicolas Grekas
fc5e80c0cb Merge branch '2.3' into 2.7
* 2.3:
  [appveyor] Fix failure reporting
2016-02-01 21:45:15 +01:00
Nicolas Grekas
de6e3c81d8 minor #17639 [appveyor] Fix failure reporting (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[appveyor] Fix failure reporting

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

Status: needs work

Commits
-------

b58f483 [appveyor] Fix failure reporting
2016-02-01 21:44:24 +01:00
Nicolas Grekas
b58f4833df [appveyor] Fix failure reporting 2016-02-01 21:38:54 +01:00
Fabien Potencier
2ef7489fea minor #17638 [Finder] backport GlobTest from 2.7 branch (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Finder] backport GlobTest from 2.7 branch

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

Commits
-------

ceaeb43 backport GlobTest from 2.7 branch
2016-02-01 13:35:14 +01:00
Christian Flothmann
ceaeb43692 backport GlobTest from 2.7 branch 2016-02-01 12:48:21 +01:00
Javier Eguiluz
f0b7c14fd2 [2.3] Fixed an undefined variable in Glob::toRegex 2016-01-31 20:27:08 +01:00
Fabien Potencier
ccc6d311b1 simplified a test 2016-01-31 08:57:13 +01:00
Fabien Potencier
9d8232bf25 Merge branch '2.3' into 2.7
* 2.3:
  fix container cache key generation
  [Translation] Add resources from fallback locale
  [DependencyInjection] enforce tags to have a name
  [YAML] Refine the return value of Yaml::parse()
2016-01-31 08:56:20 +01:00
Fabien Potencier
27de563236 bug #17596 [Translation] Add resources from fallback locale to parent catalogue (c960657)
This PR was merged into the 2.3 branch.

Discussion
----------

[Translation] Add resources from fallback locale to parent catalogue

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

The resources representing a locale includes those of the fallback locale. However, `getCatalogue()->getResources()` only returns the resources belonging specifically to the selected locale.

Example: The locale `en_GB` falls back to `en`. I use the locale `en_GB`. During development, when I modify the `en_GB` translation file, the changes appear instantly when reloading the page. If I modify the `en` translation file, I need to manually clear the cache in order for the new translation to appear.

I believe this is a regression that was introduced in #15527.

This patch is for the 2.3 branch. For 2.6 and later, the test can be updated to use the getCatalogue() method instead of using ReflectionProperty.

Commits
-------

f7f82fa [Translation] Add resources from fallback locale
2016-01-31 08:53:09 +01:00
Christian Flothmann
0c4b636c24 [Form] fix option name in changelog 2016-01-30 21:05:11 +01:00
Fabien Potencier
8a95ec5303 Merge branch '2.7' into 2.8
* 2.7:
  [2.7] Fix tests
  pass triggerDeprecationError arg to parent class
  remove default null value for asset version
  remove duplicated value
  [DependencyInjection] simplify the BC layer
  Change couple of occurences of a public setUp() method to protected
2016-01-30 16:58:35 +01:00
Fabien Potencier
bd7f4d6b22 minor #17582 [2.7] Fix tests (paradajozsef)
This PR was squashed before being merged into the 2.7 branch (closes #17582).

Discussion
----------

[2.7] Fix tests

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | Let's see Travis results
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

c8e1384 [2.7] Fix tests
2016-01-30 16:53:21 +01:00
Paráda József
c8e1384b84 [2.7] Fix tests 2016-01-30 16:53:18 +01:00
Christian Flothmann
350625dd21 pass triggerDeprecationError arg to parent class 2016-01-30 09:46:07 +01:00
Jules Pietri
d15c34a51f remove duplicated value 2016-01-29 17:58:49 +01:00
Christian Schmidt
f7f82fa4f2 [Translation] Add resources from fallback locale 2016-01-28 23:38:57 +01:00
Paráda József
e685305292 [Ldap] Remove unused private property 2016-01-27 23:49:30 +01:00
Christian Flothmann
d86a3a7ba3 [DependencyInjection] enforce tags to have a name 2016-01-27 23:29:55 +01:00
Jakub Zalas
6a806e32b7 [YAML] Refine the return value of Yaml::parse() 2016-01-27 16:53:33 +00:00
Fabien Potencier
528572b764 minor #17565 [DependencyInjection] simplify the BC layer (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] simplify the BC layer

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

The change to the `setFactoryService()` method is consistent with what
we did with the `getFactoryService()` before (and how we handle the
deprecation of strict references in Symfony 2.8).

Commits
-------

6cd5ee3 [DependencyInjection] simplify the BC layer
2016-01-27 16:32:31 +01:00
Toni Uebernickel
0fe3088dea register commands from kernel when accessing list 2016-01-27 13:20:43 +01:00
Jakub Zalas
0a883a94f1 Change few occurences of a public setUp() method to protected 2016-01-27 11:49:43 +00:00
Christian Flothmann
6cd5ee3b26 [DependencyInjection] simplify the BC layer
The change to the `setFactoryService()` method is consistent with what
we did with the `getFactoryService()` before (and how we handle the
deprecation of strict references in Symfony 2.8).
2016-01-27 12:47:27 +01:00
Jakub Zalas
5fe7359659 Change couple of occurences of a public setUp() method to protected 2016-01-27 11:47:13 +00:00
Christian Flothmann
c8d28b1fa6 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  [BrowserKit] Corrected HTTP_HOST logic #15398
  resolve aliases in factories
  resolve aliases in factory services
  Remove invalid CSS white-space value
  Fix FileSystem tests on Windows
  [Form] ArrayChoiceList can now deal with a null in choices
2016-01-27 12:34:40 +01:00
Christian Flothmann
3a027badb7 Merge branch '2.3' into 2.7
* 2.3:
  fixed CS
  [BrowserKit] Corrected HTTP_HOST logic #15398
  resolve aliases in factory services
  Remove invalid CSS white-space value
  Fix FileSystem tests on Windows
2016-01-27 12:27:15 +01:00
Fabien Potencier
828fba4e1d fixed CS 2016-01-27 11:46:45 +01:00
Gintautas Miselis
b5f524d40b [BrowserKit] Corrected HTTP_HOST logic #15398 2016-01-27 11:45:57 +01:00
Fabien Potencier
da16d15f13 bug #17554 [DependencyInjection] resolve aliases in factories (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] resolve aliases in factories

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

Commits
-------

fde10e7 resolve aliases in factories
2016-01-27 11:13:36 +01:00
Christian Flothmann
fde10e799a resolve aliases in factories 2016-01-27 10:00:40 +01:00
Fabien Potencier
8967076e50 bug #17511 [Form] ArrayChoiceList can now deal with a null in choices (issei-m)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] ArrayChoiceList can now deal with a null in choices

re-create for mistaken #17502

---

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

Documentation says, since 2.7, choice value is treated as corresponding item value (if `choices_as_values` option is true). Null as well.

```php
$builder->add('attending', 'choice', array(
    'choices' => array(
        'yes' => true,
        'no' => false,
        'maybe' => null,
    ),
    'choices_as_values' => true,
));
```

But actually null doesn't work as expected since `ArrayChoiceList::getChoicesForValues()` uses `isset` to check whether given value exists in its choices.

It should use `array_key_exists` instead to do so here.

Commits
-------

68292bb [Form] ArrayChoiceList can now deal with a null in choices
2016-01-27 08:59:57 +01:00
Christian Flothmann
7702189cb4 resolve aliases in factory services 2016-01-27 08:57:17 +01:00
Fabien Potencier
025f761798 minor #16986 Fix Filesystem tests on Windows (WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix Filesystem tests on Windows

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

PHP's symlink function doesn't support relative symlinks on Windows. Running the filesystem tests in Windows resulted in 2 erroring tests because of this. After this PR, these tests are skipped on Windows.

The error wasn't catched by appveyor, as appveyor doesn't support symlinks at all.

Commits
-------

c376cf3 Fix FileSystem tests on Windows
2016-01-27 08:39:45 +01:00
Fabien Potencier
6704f62b4d Merge branch '2.7' into 2.8
* 2.7:
  Increase the inlining YAML level for config:debug
  [Serializer] Minor: fix CS and PHPDoc
  [Form] fix tests
  [Serializer] Ensure that groups are strings
  [Debug] Tell that the extension is for PHP 5 only
  Static code analysis
  Update AnnotationDirectoryLoader.php
  added a test
  Escape the delimiter in Glob::toRegex
  [FrameworkBundle] Fix template location for PHP templates
  [FrameworkBundle] Add path verification to the template parsing test cases
2016-01-27 06:14:19 +01:00
Fabien Potencier
1876b4f1c8 Merge branch '2.3' into 2.7
* 2.3:
  Static code analysis
  Update AnnotationDirectoryLoader.php
  [FrameworkBundle] Fix template location for PHP templates
  [FrameworkBundle] Add path verification to the template parsing test cases
2016-01-27 06:09:39 +01:00
Fabien Potencier
89e86197c1 minor #17480 Static code analysis (Koc)
This PR was merged into the 2.3 branch.

Discussion
----------

Static code analysis

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

Things that done:
* fix case in method calls
* removed unused imports
* use shorter concat where it possible
* optimize some css
* removed duplicated array keys
* removed redurant return statements
* removed one-time variables
* do not pass arguments that not used in functions

Commits
-------

8db691a Static code analysis
2016-01-27 05:57:57 +01:00
Kévin Dunglas
ff568dc518 [Serializer] Minor: fix CS and PHPDoc 2016-01-26 13:15:44 +01:00
WouterJ
c376cf3e06 Fix FileSystem tests on Windows 2016-01-26 10:09:52 +01:00
Fabien Potencier
234011d776 minor #17536 [Form] fix tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fix tests

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

Commits
-------

e791fa0 [Form] fix tests
2016-01-26 08:31:01 +01:00
Christian Flothmann
e791fa0405 [Form] fix tests 2016-01-26 08:10:13 +01:00
Fabien Potencier
7e000a0351 minor #17533 [Debug] Tell that the extension is for PHP 5 only (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Tell that the extension is for PHP 5 only

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

Commits
-------

1285a0d [Debug] Tell that the extension is for PHP 5 only
2016-01-26 07:58:29 +01:00
Fabien Potencier
c435c2f6c6 bug #17430 [Serializer] Ensure that groups are strings (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #17430).

Discussion
----------

[Serializer] Ensure that groups are strings

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

Commits
-------

0a3b877 [Serializer] Ensure that groups are strings
2016-01-26 07:57:14 +01:00
Kévin Dunglas
0a3b87701c [Serializer] Ensure that groups are strings 2016-01-26 07:57:11 +01:00
Nicolas Grekas
1285a0d637 [Debug] Tell that the extension is for PHP 5 only 2016-01-26 00:34:19 +01:00
Konstantin.Myakshin
8db691ab94 Static code analysis 2016-01-25 19:00:36 +02:00
Tischoi
5e805850cc Update AnnotationDirectoryLoader.php 2016-01-25 17:58:14 +01:00
Fabien Potencier
193d5c8dd5 added a test 2016-01-25 17:36:36 +01:00
Fabien Potencier
7921e476c3 Merge branch '2.3' into 2.7
* 2.3:
  Escape the delimiter in Glob::toRegex
2016-01-25 17:36:11 +01:00
Javier Eguiluz
2c45f461c2 Escape the delimiter in Glob::toRegex 2016-01-25 17:35:23 +01:00
Fabien Potencier
fe14e38a54 Merge branch '2.7' into 2.8
* 2.7:
  fixed undefined variable
  Fixed the phpDoc of UserInterface
  fixed APCu dep version
  make apc class loader testable against apcu without apc bc layer
  Added support for the `0.0.0.0/0` trusted proxy
  [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument
  added missing constant
  Added 451 status code
  Remove unnecessary code
  Allow absolute URLs to be displayed in the debug toolbar
  [ClassLoader] Use symfony/polyfill-apcu
  [HttpKernel] Lookup the response even if the lock was released after 2 seconds
2016-01-25 17:29:20 +01:00
Fabien Potencier
ce0946dde0 Merge branch '2.3' into 2.7
* 2.3:
  fixed undefined variable
  Fixed the phpDoc of UserInterface
  fixed APCu dep version
  Added support for the `0.0.0.0/0` trusted proxy
  [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument
  [HttpKernel] Lookup the response even if the lock was released after 2 seconds
2016-01-25 17:27:59 +01:00
Javier Eguiluz
8e2a33ec2d Fixed the phpDoc of UserInterface 2016-01-25 16:23:13 +01:00
Fabien Potencier
3b7f4c7050 fixed APCu dep version 2016-01-25 15:47:02 +01:00
Fabien Potencier
81ab4ee008 minor #17521 make apc class loader testable against apcu without apc bc layer (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

make apc class loader testable against apcu without apc bc layer

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

Commits
-------

24160b3 make apc class loader testable against apcu without apc bc layer
2016-01-25 14:21:14 +01:00
Tobias Schultze
24160b3a2f make apc class loader testable against apcu without apc bc layer 2016-01-25 14:16:04 +01:00
Fabien Potencier
8059dc1bab bug #16274 [HttpKernel] Lookup the response even if the lock was released after two second wait (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Lookup the response even if the lock was released after two second wait

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

While looking into #15813 I noticed that we [wait for the lock to be released for five seconds, but then only do a lookup if the lock was released in two seconds](fa604d3c6f/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php (L540-L562)), no more.

I think it's worth to make both values the same (so either two or five seconds). I see no reason why we should wait for the lock for five seconds, but then only do a lookup if we waited for two. One way the wait either takes too long, the other way we loose the opportunity to actually return a response.

Commits
-------

9963170 [HttpKernel] Lookup the response even if the lock was released after 2 seconds
2016-01-25 13:21:38 +01:00
Fabien Potencier
1ec3e51444 added missing constant 2016-01-25 12:39:25 +01:00
Fabien Potencier
8ef7c53c83 Merge branch '2.3' into 2.7
* 2.3:
  Added 451 status code
2016-01-25 12:39:01 +01:00
Andrew Carter
df8952f2a3 Added 451 status code 2016-01-25 12:38:22 +01:00
Fabien Potencier
778e4f6302 Merge branch '2.3' into 2.7
* 2.3:
  [ClassLoader] Use symfony/polyfill-apcu
2016-01-25 12:10:58 +01:00
Fabien Potencier
11257ee89a minor #17396 [ClassLoader] Use symfony/polyfill-apcu (gapple)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] Use symfony/polyfill-apcu

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

#17358 updated ApcClassLoader to use polyfill-apcu, but not ApcUniversalClassLoader

2.7 / 2.8 tests are in LegacyApcUniversalClassLoaderTest

Commits
-------

a0dc399 [ClassLoader] Use symfony/polyfill-apcu
2016-01-25 12:06:45 +01:00
Fabien Potencier
a1143ed36c minor #17476 Remove unnecessary code (yapro)
This PR was merged into the 2.7 branch.

Discussion
----------

Remove unnecessary code

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | -
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | -
```
php > echo (E_ALL | E_STRICT) & (0 | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED;
4352
php > echo (0 | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED;
4352
php > echo (2 | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED;
4354
```
$ php -v
```
PHP 5.6.11-1ubuntu3.1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
```

Commits
-------

548d803 Remove unnecessary code
2016-01-25 11:59:23 +01:00
Fabien Potencier
04ca6a2771 Merge branch '2.7' into 2.8
* 2.7:
  fixed test
  [Request] Ignore invalid IP addresses sent by proxies
  Throw for missing container extensions
  [TwigBridge] add missing unit tests (AppVariable)
  Able to load big xml files with DomCrawler
  fixed typo
  [Form] Fix constraints could be null if not set
  [Finder] Check PHP version before applying a workaround for a PHP bug
  fixed CS
  add defaultNull to version
  sort bundles in config:dump-reference command
  Fixer findings.
  [Translation][Writer] avoid calling setBackup if the dumper is not an instance of FileDumper.
  [FrameworkBundle] Compute the kernel root hash only one time
2016-01-25 10:56:46 +01:00
Fabien Potencier
0fe08a800e fixed test 2016-01-25 10:56:38 +01:00
Fabien Potencier
2173c78da2 Merge branch '2.3' into 2.7
* 2.3:
  [Request] Ignore invalid IP addresses sent by proxies
  Able to load big xml files with DomCrawler
  fixed typo
  [Form] Fix constraints could be null if not set
  [Finder] Check PHP version before applying a workaround for a PHP bug
  fixed CS
  sort bundles in config:dump-reference command
  Fixer findings.
2016-01-25 10:55:53 +01:00