Commit Graph

32081 Commits

Author SHA1 Message Date
Fabien Potencier
4fa6fcfb93 updated CHANGELOG for 3.3.9 2017-09-11 09:13:13 -07:00
Fabien Potencier
51af90e042 Merge branch '2.8' into 3.3
* 2.8:
  [DomCrawler] Fix conversion to int on GetPhpFiles
  Filtering empty uuids in ORMQueryBuilderLoader.
2017-09-11 08:55:22 -07:00
Fabien Potencier
400263a39d Merge branch '2.7' into 2.8
* 2.7:
  [DomCrawler] Fix conversion to int on GetPhpFiles
  Filtering empty uuids in ORMQueryBuilderLoader.
2017-09-11 08:55:02 -07:00
Fabien Potencier
bcfe152113 bug #24141 [DomCrawler] Fix conversion to int on GetPhpFiles (MaraBlaga)
This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] Fix conversion to int on GetPhpFiles

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

We've encountered that when using the DomCrawler with the UploadedFile, everything gets converted into strings. We've addressed the issue, and made sure that the attributes in the UploadedFile respects their type.

The code below demonstrates the problem.

```<?php
require 'vendor/autoload.php';
require 'app/AppKernel.php';
$crawler = new \Symfony\Component\DomCrawler\Crawler(
    '<form method="post"><input type="file" name="image"/></form>',
    'http://www.example.com'
);
$form = $crawler->filter('form')->form();
$form['image'] = new \Symfony\Component\HttpFoundation\File\UploadedFile(
    'path/to/file',
    'foo',
    'text/plain',
    100
);

$client = new \Symfony\Bundle\FrameworkBundle\Client(new AppKernel('test', true));
$crawler = $client->submit($form);

var_dump($client->getRequest()->files->get('image')->getClientSize());  //returns string, not int
echo 'Done.' . PHP_EOL;

Commits
-------

122da5add5 [DomCrawler] Fix conversion to int on GetPhpFiles
2017-09-11 08:48:47 -07:00
Mara Blaga
122da5add5 [DomCrawler] Fix conversion to int on GetPhpFiles 2017-09-11 15:10:51 +01:00
Fabien Potencier
47871c995f bug #23853 Filtering empty uuids in ORMQueryBuilderLoader. (mlazovla)
This PR was merged into the 2.7 branch.

Discussion
----------

Filtering empty uuids in ORMQueryBuilderLoader.

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

Commits
-------

27e8cd289c Filtering empty uuids in ORMQueryBuilderLoader.
2017-09-11 05:33:33 -07:00
Nicolas Grekas
7b7a69f6ff minor #24136 [CS] Remove protected_to_private rule (SpacePossum)
This PR was merged into the 3.3 branch.

Discussion
----------

[CS] Remove `protected_to_private` rule

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| License       | MIT

Following:
https://github.com/symfony/symfony/pull/24123#issuecomment-328031180

I picked 3.1 as target as the rule discussed;

| branch | hits
| --------- | ---
| 2.7 | 0
| 2.8 | 0
| 3.0 | 0
| 3.1 | 1
| master |  1 hit (same file as on 3.1)

Commits
-------

bfae454 Remove `protected_to_private` rule.
2017-09-11 08:35:02 +02:00
SpacePossum
bfae454968 Remove protected_to_private rule. 2017-09-11 08:26:46 +02:00
Nicolas Grekas
483a274994 Merge branch '2.8' into 3.3
* 2.8:
  Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
  [Filesystem] skip tests if not applicable
  [Fabbot] Do not run php-cs-fixer if there are no change in src/
  [Security] Fix exception when use_referer option is true and referer is not set or empty
  Get KERNEL_DIR through $_ENV too for KernelTestCase
  check permissions if dump target dir is missing
2017-09-11 07:57:23 +02:00
Fabien Potencier
d6dfb5b4e3 Merge branch '2.7' into 2.8
* 2.7:
  Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
  [Filesystem] skip tests if not applicable
  [Fabbot] Do not run php-cs-fixer if there are no change in src/
  [Security] Fix exception when use_referer option is true and referer is not set or empty
  Get KERNEL_DIR through $_ENV too for KernelTestCase
  check permissions if dump target dir is missing
2017-09-08 18:12:52 -07:00
Fabien Potencier
7793b797af Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
This reverts commit d74144fc0b, reversing
changes made to 2b79f48405.
2017-09-08 18:12:06 -07:00
Nicolas Grekas
3145006053 minor #24137 [Filesystem] skip tests if not applicable (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] skip tests if not applicable

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

Commits
-------

1605ce1 [Filesystem] skip tests if not applicable
2017-09-08 16:53:30 +02:00
Christian Flothmann
1605ce1f07 [Filesystem] skip tests if not applicable 2017-09-08 16:43:09 +02:00
Fabien Potencier
9a6e83af16 minor #24139 [Fabbot] Do not run php-cs-fixer if there are no change in src/ (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[Fabbot] Do not run php-cs-fixer if there are no change in src/

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | kind of
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24136#issuecomment-328057076
| License       | MIT
| Doc PR        | -

Commits
-------

3eb79e5197 [Fabbot] Do not run php-cs-fixer if there are no change in src/
2017-09-08 06:57:11 -07:00
Grégoire Pineau
3eb79e5197 [Fabbot] Do not run php-cs-fixer if there are no change in src/ 2017-09-08 15:50:13 +02:00
Fabien Potencier
b6a29a28db bug #24101 [Security] Fix exception when use_referer option is true and referer is not set or empty (linniksa)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #24101).

Discussion
----------

[Security] Fix exception when use_referer option is true and referer is not set or empty

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

Commits
-------

a29e0694de [Security] Fix exception when use_referer option is true and referer is not set or empty
2017-09-07 07:52:52 -07:00
Sergey Linnik
a29e0694de [Security] Fix exception when use_referer option is true and referer is not set or empty 2017-09-07 07:52:52 -07:00
Fabien Potencier
d74144fc0b bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] check permissions if dump target dir is missing

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

`is_dir()` returns `false` if the parent directory misses the executable
bit even when the directory itself is present.

Commits
-------

a0f9f2c537 check permissions if dump target dir is missing
2017-09-07 07:43:15 -07:00
Fabien Potencier
1c04cd563a bug #24126 [HttpKernel] "controller.service_arguments" services should be public (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] "controller.service_arguments" services should be public

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

Controller-as-services need to be public if they have constructor arguments (they don't need to if they have no arguments but that's for arcane reasons.)
Since services tagged "controller.service_arguments" *are* controllers, they need to be public to enhance DX and remove some WTFs that some ppl reported to me.

Commits
-------

b9c6928d7e [HttpKernel] "controller.service_arguments" services should be public
2017-09-07 07:05:07 -07:00
Nicolas Grekas
b9c6928d7e [HttpKernel] "controller.service_arguments" services should be public 2017-09-07 14:08:26 +02:00
Nicolas Grekas
fda994b1e4 bug #24113 [FrameworkBundle] Get KERNEL_CLASS through $_ENV too for KernelTestCase (yceruto)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] Get KERNEL_CLASS through $_ENV too for KernelTestCase

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/recipes/pull/170/files#diff-793b024840ee04ebdff5e04c2cd44f8cR12
| License       | MIT
| Doc PR        | -

I guess the check could be simplied in `master` with php7+

/cc @nicolas-grekas

Commits
-------

73cdb68 Get KERNEL_CLASS through $_ENV too
2017-09-07 09:25:08 +02:00
Nicolas Grekas
2b79f48405 bug #24115 [FrameworkBundle] Get KERNEL_DIR through $_ENV too for KernelTestCase (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Get KERNEL_DIR through $_ENV too for KernelTestCase

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

See https://github.com/symfony/symfony/pull/24113

Commits
-------

cf11fb9 Get KERNEL_DIR through $_ENV too for KernelTestCase
2017-09-07 09:24:29 +02:00
Yonel Ceruto
cf11fb9652 Get KERNEL_DIR through $_ENV too for KernelTestCase 2017-09-06 18:24:46 -04:00
Yonel Ceruto
73cdb68308 Get KERNEL_CLASS through $_ENV too 2017-09-06 15:05:48 -04:00
Nicolas Grekas
5f5ed69bea minor #24112 [travis] fix minor php7.0 version (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[travis] fix minor php7.0 version

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

7.0.7 is the default on travis-trusty, but we need 7.0.8 mini...

Commits
-------

0793365 [travis] fix minor php7.0 version
2017-09-06 21:00:36 +02:00
Nicolas Grekas
07933655e8 [travis] fix minor php7.0 version 2017-09-06 20:49:53 +02:00
Nicolas Grekas
9431a38cfc Merge branch '2.8' into 3.3
* 2.8:
  [travis] add ldap.so for php70
  [HttpFoundation] Fix logic when JsonSerializable is missing
2017-09-06 19:07:39 +02:00
Nicolas Grekas
e4ce14d073 [travis] add ldap.so for php70 2017-09-06 19:03:33 +02:00
Nicolas Grekas
9d240de539 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Fix logic when JsonSerializable is missing
2017-09-06 18:54:42 +02:00
Nicolas Grekas
d1fe4153a1 [HttpFoundation] Fix logic when JsonSerializable is missing 2017-09-06 18:53:48 +02:00
Nicolas Grekas
87b3b1a685 Merge branch '2.8' into 3.3
* 2.8:
  [travis] update to trusty
  Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
  [ExpressionLanguage] throws an exception on calling uncallable method
2017-09-06 18:40:18 +02:00
Christian Flothmann
a0f9f2c537 check permissions if dump target dir is missing
`is_dir()` returns `false` if the parent directory misses the executable
bit even when the directory itself is present.
2017-09-06 18:35:18 +02:00
Nicolas Grekas
c3f14708f4 Merge branch '2.7' into 2.8
* 2.7:
  [travis] update to trusty
  Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
  [ExpressionLanguage] throws an exception on calling uncallable method
2017-09-06 18:32:38 +02:00
Nicolas Grekas
cf4f8325e9 minor #24108 [travis] update to trusty (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] update to trusty

| 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        | -

Precise is dying, see https://blog.travis-ci.com/2017-08-31-trusty-as-default-status

Commits
-------

cfc9346 [travis] update to trusty
2017-09-06 18:22:23 +02:00
Nicolas Grekas
cfc9346f66 [travis] update to trusty 2017-09-06 17:42:52 +02:00
Fabien Potencier
a4a87ac3a3 minor #24106 [DependencyInjection] Don't use return on Assert::markTestSkipped (derrabus)
This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] Don't use return on Assert::markTestSkipped

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

Removed an unnecessary return statement. `Assert::markTestSkipped()` will always throw an exception, so there's no need for a return statement here. And even if that method had a return value: A unit test is not supposed to return anything.

Commits
-------

9cadeb8af2 Don't use return on Assert::markTestSkipped.
2017-09-05 18:21:35 -07:00
Alexander M. Turek
9cadeb8af2 Don't use return on Assert::markTestSkipped. 2017-09-05 22:39:38 +02:00
Fabien Potencier
a819038090 bug #24041 [ExpressionLanguage] throws an exception on calling uncallable method (fmata)
This PR was merged into the 2.7 branch.

Discussion
----------

[ExpressionLanguage] throws an exception on calling uncallable method

| 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 we evaluate an expression, if a callable is incorrect (not exists or not accessible) a warning is printed.
This PR handles this case and throws a \RuntimeException when `is_callable()` returns `false` :

```php
$el = new ExpressionLanguage();
$el->evaluate('foo.myfunction()', array('foo' => new \stdClass()));
```

**Before:**
`Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'stdClass' does not have a method 'myfunction' in /home/.../src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php on line 84`

**After:**
`Fatal error: Uncaught RuntimeException: Unable to call method "myfunction" of object "stdClass". in /home/.../src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php:81`

Commits
-------

c8b65aeb8b [ExpressionLanguage] throws an exception on calling uncallable method
2017-09-05 11:48:18 -07:00
Fabien Potencier
fd568acd15 bug #24096 Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args

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

Commits
-------

2ba5005830 Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
2017-09-05 11:37:50 -07:00
Fabien Potencier
a964f37a87 minor #24102 Create directories recursively in the PHPUnit bridge (stof)
This PR was merged into the 3.3 branch.

Discussion
----------

Create directories recursively in the PHPUnit bridge

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

If the target directory is also missing its parent directory, we need to perform a recursive creation, otherwise we get weird failures later.

Commits
-------

0caeeff48a Create directories recursively in the PHPUnit bridge
2017-09-05 11:31:49 -07:00
Christophe Coevoet
0caeeff48a Create directories recursively in the PHPUnit bridge 2017-09-05 13:23:06 +02:00
Nicolas Grekas
703a84c18c minor #24081 [Dotenv] Add a BC break note (voronkovich)
This PR was squashed before being merged into the 3.3 branch (closes #24081).

Discussion
----------

[Dotenv] Add a BC break note

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

Commits
-------

66621cc [Dotenv] Add a BC break note
2017-09-05 09:59:34 +02:00
Oleg Voronkovich
66621cc559 [Dotenv] Add a BC break note 2017-09-05 09:59:31 +02:00
Robin Chalas
2ba5005830 Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args 2017-09-04 22:36:37 +02:00
Fabien Potencier
28e7a1377d Merge branch '2.8' into 3.3
* 2.8:
  #24046 added check for ext-dom to XmlUtil::loadFile
2017-09-04 09:28:07 -07:00
Fabien Potencier
5d2af1ef4c Merge remote-tracking branch 'origin/2.7' into 2.8
* origin/2.7:
  #24046 added check for ext-dom to XmlUtil::loadFile
2017-09-04 09:26:37 -07:00
Fabien Potencier
2eee9e0073 bug #24082 [DI] Minor fix in dumped code (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Minor fix in dumped code

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

This check is useless, and leads to a potential BC break (a non-shared service overridden by calling `$container->set(...)` - unlikely yes).

Commits
-------

263b95e1d1 [DI] Minor fix in dumped code
2017-09-04 08:49:40 -07:00
Nicolas Grekas
263b95e1d1 [DI] Minor fix in dumped code 2017-09-03 20:01:57 +02:00
Nicolas Grekas
c4ecb9c75d minor #23958 [Lock] Fix race condition in tests between cache and lock component (jderusse)
This PR was submitted for the 3.4 branch but it was merged into the 3.3 branch instead (closes #23958).

Discussion
----------

[Lock] Fix race condition in tests between cache and lock component

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

Currently trying to fix
* [x] php 5.5 in testSaveWithDifferentResources "Failed asserting that false is true"
* [x] php 5.5 in testSaveWithDifferentKeysOnSameResources "The store shouldn't save the second key"

Workflow:
* [x] find a reproducer
* [x] fix memcached tests => #23969
* [x] fix redis tests => this PR

Commits
-------

26948cf Fix race condition in tests between cache and lock
2017-09-03 16:06:51 +02:00
Jérémy Derussé
26948cf565 Fix race condition in tests between cache and lock 2017-09-03 16:06:51 +02:00