Commit Graph

25080 Commits

Author SHA1 Message Date
gitlost b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target. 2017-09-13 09:02:23 -07:00
Grégoire Pineau 256055218e [Intl] Fixed support of Locale::getFallback 2017-09-13 12:20:09 +02:00
Nicolas Grekas cd8374586b minor #24163 .php_cs.dist - simplify config (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

.php_cs.dist - simplify config

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

dropped configuration is already part of `@Symfony` ruleset

Commits
-------

4ea681e .php_cs.dist - simplify config
2017-09-12 08:56:20 +02:00
Fabien Potencier fc30d5b0cf bug #24162 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces

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

Commits
-------

10204ffe99 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-11 15:35:04 -07:00
Dariusz 4ea681e7d1 .php_cs.dist - simplify config 2017-09-12 00:23:36 +02:00
Fabien Potencier 10204ffe99 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces 2017-09-11 13:58:31 -07:00
Fabien Potencier 687ad65d82 minor #24149 [CS] Apply phpdoc_annotation_without_dot (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #24149).

Discussion
----------

[CS] Apply phpdoc_annotation_without_dot

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

Rule was manually applied here : https://github.com/symfony/symfony/pull/19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2020 .

Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.

If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset.

Info: I did manually reviewed every single change of this PR.

Commits
-------

7a97b49436 [CS] Apply phpdoc_annotation_without_dot
2017-09-11 13:37:54 -07:00
Dariusz 7a97b49436 [CS] Apply phpdoc_annotation_without_dot 2017-09-11 13:37:52 -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
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
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
Nicolas Grekas d1fe4153a1 [HttpFoundation] Fix logic when JsonSerializable is missing 2017-09-06 18:53:48 +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 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 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
Robin Chalas 2ba5005830 Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args 2017-09-04 22:36:37 +02:00
Maxime Steinhausser 26ef6d27ad minor #24047 Added check for ext-dom to XmlUtil::loadFile (oleg-andreyev)
This PR was merged into the 2.7 branch.

Discussion
----------

Added check for ext-dom to XmlUtil::loadFile

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no, minor enhancement to gracefully suggest to install `ext-dom` if missing when trying to use `XmlUtil::loadFile`
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ?
| Fixed tickets | #24046
| License       | MIT

Commits
-------

2f292c247e #24046 added check for ext-dom to XmlUtil::loadFile
2017-09-03 12:25:31 +02:00
Oleg Andreyev 2f292c247e #24046 added check for ext-dom to XmlUtil::loadFile 2017-09-03 12:02:00 +02:00
Florent Mata c8b65aeb8b [ExpressionLanguage] throws an exception on calling uncallable method 2017-08-31 16:22:01 +02:00
Fabien Potencier 9c796b4e39 bug #23730 Fixed the escaping of back slashes and << in console output (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #23730).

Discussion
----------

Fixed the escaping of back slashes and << in console output

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

Not sure if it's a valid solution, but this is my attempt to solve #18481.

Commits
-------

d5cb1fe711 Fixed the escaping of back slashes and << in console output
2017-08-29 13:47:46 -07:00
Javier Eguiluz d5cb1fe711 Fixed the escaping of back slashes and << in console output 2017-08-29 13:47:44 -07:00
Fabien Potencier bc4e01500b bumped Symfony version to 2.7.35 2017-08-28 12:18:16 -07:00
Fabien Potencier 76390aa7d0 Merge pull request #24010 from fabpot/release-2.7.34
released v2.7.34
2017-08-28 11:40:51 -07:00
Fabien Potencier 0f45d7963a updated VERSION for 2.7.34 2017-08-28 11:40:36 -07:00
Fabien Potencier 0978a4c2ab update CONTRIBUTORS for 2.7.34 2017-08-28 11:40:34 -07:00
Fabien Potencier 7229a363a5 updated CHANGELOG for 2.7.34 2017-08-28 11:40:29 -07:00
Fabien Potencier c6ffdcf9dd minor #23999 [VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1) (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1)

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

Commits
-------

0164038998 [VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1)
2017-08-27 07:26:20 -07:00
Fabien Potencier 56987eabd1 bug #23989 [Debug] Remove false-positive check in DebugClassLoader (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Remove false-positive check in DebugClassLoader

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

In some edge case situations, DebugClassLoader generates false-positives (see linked issue, ping @gharlan).

Commits
-------

466da3fd63 [Debug] Remove false-positive check in DebugClassLoader
2017-08-27 07:20:32 -07:00
Nicolas Grekas 0164038998 [VarDumper] Enhance docblock to tell about AbstractDumper::dumpLine(-1) 2017-08-27 10:38:33 +02:00
Nicolas Grekas 466da3fd63 [Debug] Remove false-positive check in DebugClassLoader 2017-08-27 10:27:28 +02:00
Fabien Potencier c8966640bd bug #23982 [VarDumper] Strengthen dumped JS (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Strengthen dumped JS

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

Commits
-------

5c1bd10017 [VarDumper] Strengthen dumped JS
2017-08-26 06:17:11 -07:00
Fabien Potencier b4452f8b3f bug #23925 [Validator] Fix use of GroupSequenceProvider in child classes (linniksa)
This PR was squashed before being merged into the 2.7 branch (closes #23925).

Discussion
----------

[Validator] Fix use of GroupSequenceProvider in child classes

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

For example validation of doctrine proxy objects fails.

Commits
-------

8d7b203d80 [Validator] Fix use of GroupSequenceProvider in child classes
2017-08-26 06:15:36 -07:00
Sergey Linnik 8d7b203d80 [Validator] Fix use of GroupSequenceProvider in child classes 2017-08-26 06:15:27 -07:00
Fabien Potencier 459e6cbc90 minor #23987 [Intl] Change number PHPDoc type to int|float (PurpleBooth)
This PR was merged into the 2.7 branch.

Discussion
----------

[Intl] Change number PHPDoc type to int|float

While number is a valid type inside PHP internally, it's not a part of the PHPDoc standard. This causes IDEs and static analysers to raise errors on this function. The internal PHP type `number` is the same as `int|float`, this changes the type to that.

https://php.net/manual/en/language.pseudo-types.php#language.types.number
https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#keyword

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

c7601cb40e Change number PHPDoc type to int|float
2017-08-26 06:09:48 -07:00
Billie Thompson c7601cb40e
Change number PHPDoc type to int|float
While number is a valid type inside PHP internally, it's not a part of
the PHPDoc standard. This causes IDEs and static analysers to raise
errors on this function. The internal PHP type `number` is the same as
`int|float`, this changes the type to that.

https://php.net/manual/en/language.pseudo-types.php#language.types.number
https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#keyword
2017-08-25 17:49:09 +01:00
Nicolas Grekas 5c1bd10017 [VarDumper] Strengthen dumped JS 2017-08-25 14:02:05 +02:00
Nicolas Grekas 3ba4112009 minor #23972 [travis] Add timing info (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] Add timing info

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

Let's see if this works.
For reference, see https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh

Commits
-------

51d210e [travis] Add timing info
2017-08-25 12:46:23 +02:00
Nicolas Grekas 51d210e2c0 [travis] Add timing info 2017-08-24 13:10:55 +02:00