Commit Graph

29503 Commits

Author SHA1 Message Date
Fabien Potencier
f3217c3bd1 minor #21903 [Yaml] Fix the tests (GuilhemN)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] Fix the tests

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

Fix tests that are currently useless (previously part of https://github.com/symfony/symfony/pull/19782).

Commits
-------

5107b94baf [Yaml] Fix the tests
2017-03-06 13:38:40 -08:00
Guilhem Niot
5107b94baf
[Yaml] Fix the tests 2017-03-06 21:37:41 +01:00
Fabien Potencier
44dc67dca8 minor #21898 [github] Add a reminder about CHANGELOG.md files (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[github] Add a reminder about CHANGELOG.md files

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

Instead of calling for that each time, maybe this can help?

Commits
-------

cb452ee154 [github] Add a reminder about CHANGELOG.md files
2017-03-06 12:33:55 -08:00
Nicolas Grekas
cb452ee154 [github] Add a reminder about CHANGELOG.md files 2017-03-06 21:03:23 +01:00
Fabien Potencier
94d059d530 Merge branch '2.8' into 3.2
* 2.8:
  respect the umask argument in dumpFile()
  dumpFile(), preserve existing file permissions
  Add validate method to mockec validator in form TypeTestCase
  bumped Symfony version to 2.8.19
  updated VERSION for 2.8.18
  updated CHANGELOG for 2.8.18
  bumped Symfony version to 2.7.26
  updated VERSION for 2.7.25
  update CONTRIBUTORS for 2.7.25
  updated CHANGELOG for 2.7.25
  [HttpKernel] fixed Kernel name when stored in a directory starting with a number
  context listener: hardening user provider handling
  [Console] Do not squash input changes made from console.command event
2017-03-06 11:30:27 -08:00
Fabien Potencier
2a7e385dac Merge branch '2.7' into 2.8
* 2.7:
  respect the umask argument in dumpFile()
  dumpFile(), preserve existing file permissions
  Add validate method to mockec validator in form TypeTestCase
  bumped Symfony version to 2.7.26
  updated VERSION for 2.7.25
  update CONTRIBUTORS for 2.7.25
  updated CHANGELOG for 2.7.25
  [HttpKernel] fixed Kernel name when stored in a directory starting with a number
  context listener: hardening user provider handling
2017-03-06 11:26:34 -08:00
Fabien Potencier
fda2472b02 minor #21902 [Filesystem] respect the umask argument in dumpFile() (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] respect the umask argument in dumpFile()

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

In #21823 we introduced a small BC break: The `dumpFile()` method of the `Filesystem` class allowed to pass the desired file permissions (support for this feature was dropped in Symfony 3.0).

Commits
-------

3a7cd08fe7 respect the umask argument in dumpFile()
2017-03-06 11:24:50 -08:00
Christian Flothmann
3a7cd08fe7 respect the umask argument in dumpFile() 2017-03-06 19:56:39 +01:00
Fabien Potencier
c91db73fbb bug #21823 dumpFile(), preserve existing file permissions (chs2)
This PR was squashed before being merged into the 2.7 branch (closes #21823).

Discussion
----------

dumpFile(), preserve existing file permissions

When calling Filesystem::dumpFile() on an already existing file, its permissions are lost.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

040a9abdbf dumpFile(), preserve existing file permissions
2017-03-06 10:29:47 -08:00
ChS
040a9abdbf dumpFile(), preserve existing file permissions 2017-03-06 10:29:45 -08:00
Fabien Potencier
eae76953d6 bug #21880 [Form] Fixed overridden choices option in extended choice types (HeahDude)
This PR was merged into the 3.2 branch.

Discussion
----------

[Form] Fixed overridden choices option in extended choice types

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

Commits
-------

bcda2c2d8e [Form] Fixed overridden choices option in extended choice types
2017-03-06 09:46:59 -08:00
HeahDude
bcda2c2d8e [Form] Fixed overridden choices option in extended choice types 2017-03-06 18:31:33 +01:00
Fabien Potencier
cc5c233f15 bug #21896 [PHPunitBridge] Count @expectedDeprecation as an assertion (wouterj)
This PR was merged into the 3.2 branch.

Discussion
----------

[PHPunitBridge] Count @expectedDeprecation as an assertion

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

By adding `addToAssertionCount()`, the `@expectedDeprecation` annotation is recognized as an assertion by PHPUnit. This means PHPUnit will not report the test as risky because it does not contain any assertion.

Commits
-------

ba5c0f4a47 Count @expectedDeprecation as an assertion
2017-03-06 08:18:10 -08:00
Fabien Potencier
3effed88e0 bug #21865 [Security] context listener: hardening user provider handling (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] context listener: hardening user provider handling

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

After the wrong fix in #21791 this is the second attempt to solve #4498. If more than one user provider support the user for the current context, all of them will be applied instead of returning prematurely when the first user provider does not find the logged in user.

Commits
-------

0fb09293fd context listener: hardening user provider handling
2017-03-06 08:15:02 -08:00
Wouter J
ba5c0f4a47 Count @expectedDeprecation as an assertion 2017-03-06 17:08:22 +01:00
Fabien Potencier
ec134c7014 bug #21883 [HttpKernel] fix Kernel name when stored in a directory starting with a number (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] fix Kernel name when stored in a directory starting with a number

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

replaces #20750

Commits
-------

f244eb8414 [HttpKernel] fixed Kernel name when stored in a directory starting with a number
2017-03-06 07:51:41 -08:00
Nicolas Grekas
24f3135b11 minor #21886 [Form] Add validate method to mockec validator in form TypeTestCase (pierredup)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Add validate method to mockec validator in form TypeTestCase

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

When using the `Symfony\Component\Form\Tests\Extension\Validator\Type\TypeTestCase` class to unit test forms, the `validate` method is not mocked, which causes errors when the unit tests run.

Commits
-------

4013e7b Add validate method to mockec validator in form TypeTestCase
2017-03-06 10:17:24 +01:00
Pierre du Plessis
4013e7b998 Add validate method to mockec validator in form TypeTestCase 2017-03-06 09:20:15 +02:00
Fabien Potencier
07dfac3bc2 bumped Symfony version to 2.8.19 2017-03-05 22:36:37 -08:00
Fabien Potencier
8c28bf706b Merge pull request #21885 from fabpot/release-2.8.18
released v2.8.18
2017-03-05 19:54:50 -08:00
Fabien Potencier
f32f6cefdf updated VERSION for 2.8.18 2017-03-05 19:54:35 -08:00
Fabien Potencier
cf8a7d27c3 updated CHANGELOG for 2.8.18 2017-03-05 19:54:29 -08:00
Fabien Potencier
7311ef36e9 bumped Symfony version to 2.7.26 2017-03-05 18:34:03 -08:00
Fabien Potencier
e22beacc93 Merge pull request #21884 from fabpot/release-2.7.25
released v2.7.25
2017-03-05 17:33:53 -08:00
Fabien Potencier
cb24ce3b52 updated VERSION for 2.7.25 2017-03-05 17:33:35 -08:00
Fabien Potencier
48c19f67e1 update CONTRIBUTORS for 2.7.25 2017-03-05 17:33:23 -08:00
Fabien Potencier
f90c78efe1 updated CHANGELOG for 2.7.25 2017-03-05 17:33:13 -08:00
Fabien Potencier
f244eb8414 [HttpKernel] fixed Kernel name when stored in a directory starting with a number 2017-03-05 14:37:48 -08:00
Fabien Potencier
b8b6774634 bug #21841 [Console] Do not squash input changes made from console.command event (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Do not squash input changes made from console.command event

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

Setting arguments/options from the `console.command` event is expected to work since https://github.com/symfony/symfony/pull/15938

Commits
-------

c8d364b721 [Console] Do not squash input changes made from console.command event
2017-03-05 12:03:23 -08:00
Fabien Potencier
4d91022480 Merge branch '2.8' into 3.2
* 2.8:
  [Form] backport DependencyInjectionExtension tests
  [Form] Fixed typo in a test after #21877
2017-03-05 11:53:04 -08:00
Fabien Potencier
82790559de Merge branch '2.7' into 2.8
* 2.7:
  [Form] backport DependencyInjectionExtension tests
  [Form] Fixed typo in a test after #21877
2017-03-05 11:52:29 -08:00
Fabien Potencier
4816f65c04 minor #21882 [Form] Fixed typo in a test after #21877 (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed typo in a test after #21877

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

Reviewing the diff on GitHub, I realized I've missed some typos in a new test of #21877. Sorry!

Commits
-------

b21a0978de [Form] Fixed typo in a test after #21877
2017-03-05 11:48:05 -08:00
Fabien Potencier
511e0c372a minor #21868 [Form] backport DependencyInjectionExtension tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] backport DependencyInjectionExtension tests

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

Commits
-------

97361f1815 [Form] backport DependencyInjectionExtension tests
2017-03-05 11:42:52 -08:00
Christian Flothmann
97361f1815 [Form] backport DependencyInjectionExtension tests 2017-03-05 20:15:18 +01:00
HeahDude
b21a0978de [Form] Fixed typo in a test after #21877 2017-03-05 20:10:06 +01:00
Fabien Potencier
16263fb04d bug #21481 [Form] Fixed empty conversion of Intl types (HeahDude)
This PR was merged into the 3.2 branch.

Discussion
----------

[Form] Fixed empty conversion of Intl types

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

Commits
-------

e43bfafbcc [Form] Fixed empty conversion of Intl types
2017-03-05 10:16:12 -08:00
HeahDude
e43bfafbcc [Form] Fixed empty conversion of Intl types 2017-03-05 18:47:40 +01:00
Fabien Potencier
77653d15ee Merge branch '2.8' into 3.2
* 2.8:
  [Serializer] Xml encoder throws exception for valid data
  [Form] Hardened form type tests
  fixed CS
2017-03-05 09:42:14 -08:00
Fabien Potencier
663661b30f Merge branch '2.7' into 2.8
* 2.7:
  [Serializer] Xml encoder throws exception for valid data
  [Form] Hardened form type tests
  fixed CS
2017-03-05 09:40:13 -08:00
Fabien Potencier
ea8025b863 minor #21877 [Form] Hardened form type tests (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Hardened form type tests

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

This one the PRs to come targeting 2.7 needed to harden the code base before doing some changes in master.

It takes care of the form types tests part (even if some other tests will be added later, it will also be easier after it), and unlocks merging https://github.com/symfony/symfony/pull/21481.
It also back ports tests added in https://github.com/symfony/symfony/pull/18357 for the TextType.

Since it's very hard to merge branches when modifying tests because of BC, and making every test type extend the base type test would involve many function calls to get the tested type, the function `getTestedType` is no longer abstract and return a constant to override instead, it's much better for performance, I didn't change the call in the base type test to keep BC but I suggest to deprecate it in master. Even if those are tests I really think it is worth keeping BC here.

The constants also ease testing in the ecosystem of form related libraries that need to be compatible with Symfony 2.7 and 3. I think using "test" as both prefix and suffix on namespaces, classes and names of the constants should discourage using them in real application code. Since this is just about our test suite, I don't think this should be considered a feature, so tis change should be good for 2.7.

Two other PRs will follow to solve conflicts in 2.8 and 3.2.

I missed last month patches, I hope I won't this time :).

Commits
-------

8cfc3e92ed [Form] Hardened form type tests
2017-03-05 09:34:46 -08:00
Fabien Potencier
69bb7582ad bug #21671 [Serializer] Xml encoder throws exception for valid data (gr1ev0us)
This PR was squashed before being merged into the 2.7 branch (closes #21671).

Discussion
----------

[Serializer] Xml encoder throws exception for valid data

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

#21617  Xml encoder throws exception for valid data

- add tests for bool and object encoding
- fix encoding for object in array and field

Commits
-------

5c2d4c671e [Serializer] Xml encoder throws exception for valid data
2017-03-05 09:23:36 -08:00
gr1ev0us
5c2d4c671e [Serializer] Xml encoder throws exception for valid data 2017-03-05 09:23:23 -08:00
HeahDude
8cfc3e92ed [Form] Hardened form type tests 2017-03-05 17:53:01 +01:00
Fabien Potencier
125cf853c7 fixed CS 2017-03-05 08:45:00 -08:00
Fabien Potencier
28cf4ebdf2 minor #21876 Added setInputStream deprecation to UPGRADE guides (wouterj)
This PR was squashed before being merged into the 3.2 branch (closes #21876).

Discussion
----------

Added setInputStream deprecation to UPGRADE guides

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

The before/after examples of this deprecation is quite hard to figure out. Having them in the UPGRADE guides will significantly help the migration.

Commits
-------

6f53465648 Added setInputStream deprecation to UPGRADE guides
2017-03-05 08:44:07 -08:00
WouterJ
6f53465648 Added setInputStream deprecation to UPGRADE guides 2017-03-05 08:44:05 -08:00
Nicolas Grekas
d0ac91a815 minor #21874 [DI] Remove unused legacy arg in XmlFileLoaderTest (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[DI] Remove unused legacy arg in XmlFileLoaderTest

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

Commits
-------

db4ab9d [DI] Remove unused legacy arg in XmlFileLoaderTest
2017-03-05 10:41:56 +01:00
Nicolas Grekas
db4ab9d0d6 [DI] Remove unused legacy arg in XmlFileLoaderTest 2017-03-05 01:06:55 +01:00
Fabien Potencier
fd94048285 fixed CS 2017-03-04 06:54:02 -08:00
Christian Flothmann
0fb09293fd context listener: hardening user provider handling 2017-03-04 13:36:23 +01:00