Commit Graph

20229 Commits

Author SHA1 Message Date
Nicolas Grekas
a69c1b2ae1 [FrameworkBundle] Fix Routing\DelegatingLoader 2017-09-24 15:55:14 +02:00
Robin Chalas
a40c94d8e3 bug #24219 [Console] Preserving line breaks between sentences according to the exception message (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Preserving line breaks between sentences according to the exception message

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

Commits
-------

e2d4904 Render all line breaks according to the exception message
2017-09-20 15:00:12 +02:00
Yonel Ceruto
e2d4904a84 Render all line breaks according to the exception message 2017-09-19 16:27:25 -04:00
Martin Hasoň
f13081d12c [Form] Fix phpdoc 2017-09-19 13:52:15 +02:00
Maxime Steinhausser
a6f01a38eb minor #24249 [DI] remove confusing code (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] remove confusing code

| 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 code is a no-op. I guess the intention was to resolve a parametrized alias target, yet this never worked and we don't want to make it work.

Commits
-------

3da645efed [DI] remove confusing code
2017-09-18 19:54:25 +02:00
Nicolas Grekas
3da645efed [DI] remove confusing code 2017-09-18 17:50:14 +02:00
HeahDude
e39e7a4fa9 [Form] Fixed GroupSequence with "constraints" option 2017-09-18 17:33:18 +02:00
Nicolas Grekas
2bf56296bf minor #24230 [Validator] Clarify UUID validator behavior (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #24230).

Discussion
----------

[Validator] Clarify UUID validator behavior

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24209
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

TLDR; after some investigation this is now a doc update.

This fixes the variant detection of a UUID, in strict validation, as described by https://tools.ietf.org/html/rfc4122#section-4.1.1

Tested variant UUID's taken from [ramsey/uuid](https://github.com/ramsey/uuid/blob/master/tests/UuidTest.php#L506). I cannot produce an invalid variant UUID anymore, as i believe by now anything would be variant 3 (future reserved).

/cc @backbone87

Commits
-------

cde5a47 [Validator] Clarify UUID validator behavior
2017-09-18 16:27:31 +02:00
Roland Franssen
cde5a47e8f [Validator] Clarify UUID validator behavior 2017-09-18 16:27:30 +02:00
Fabien Potencier
3b42d8859e bug #22321 [Filesystem] Fixed makePathRelative (ausi)
This PR was squashed before being merged into the 2.7 branch (closes #22321).

Discussion
----------

[Filesystem] Fixed makePathRelative

| 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

Updating to Symfony 3.2.7 @agoat noticed a bug with `Filesystem::makePathRelative()` in contao/core-bundle#751:

- In Symfony 3.2.6 `makePathRelative('aa/cc', 'bb/cc')` returned correctly `../../aa/cc`
- In Symfony 3.2.7 the same method call returns `./`

I think this issue was introduced with #22133.

While working on the fix I noticed some other issues too:

- An unnecessary if construct that did nothing, fc745f45949fdb8d5aa590618ec73537721f99b4
- Missing normalization of `./` path segments, 15982d4b083723555cfa149368eaaae9609d0e22
- `../` got ignored at the beginning of relative paths, 9586e880d69f613b10e23dd53cea877e622b221a
- The documentation of the method only allowed absolute paths, but there are already unit tests ([FilesystemTest.php:1097](ab93feae3f/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php (L1097))) that test the behavior of relative paths, cec473eeb099c074b5883e7187f74663402f9d87

This pull request fixes all these issues and adds tests for them.

Commits
-------

2bc11505f4 [Filesystem] Fixed makePathRelative
2017-09-17 08:14:54 -07:00
Martin Auswöger
2bc11505f4 [Filesystem] Fixed makePathRelative 2017-09-17 08:14:49 -07:00
Dariusz
4e9d1600ee CS: recover no_break_comment 2017-09-15 12:36:22 +02:00
SpacePossum
3e90138214 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction 2017-09-15 11:46:57 +02:00
Fabien Potencier
5bf241aa8e bug #23473 [Filesystem] mirror - fix copying content with same name as source/target. (gitlost)
This PR was squashed before being merged into the 2.7 branch (closes #23473).

Discussion
----------

[Filesystem] mirror - fix copying content with same name as source/target.

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

Uses `substr()` and lengths in `Filesystem::mirror()` rather than `str_replace()` to avoid multiple replacements.

Commits
-------

b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target.
2017-09-13 09:02:25 -07:00
gitlost
b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target. 2017-09-13 09:02:23 -07: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
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
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
Christian Flothmann
1605ce1f07 [Filesystem] skip tests if not applicable 2017-09-08 16:43:09 +02: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
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
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
Robin Chalas
2ba5005830 Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args 2017-09-04 22:36:37 +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
0f45d7963a updated VERSION for 2.7.34 2017-08-28 11:40:36 -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
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
Fabien Potencier
2e286f8854 minor #23907 [Validator] Add a property tag for File::$maxSize (issei-m)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Add a property tag for File::$maxSize

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | Not confirmed (because minor change)
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

For helping IDE to static analyze.

Commits
-------

b72ced22ad [Validator] Add a property tag for File::$maxSize
2017-08-23 05:28:33 -07:00
Oleksii Zhurbytskyi
bdae7f530c [Validator] Fix Greek translation 2017-08-22 13:13:34 +03:00
Nicolas Grekas
62174fda10 [Console] Initialize lazily to render exceptions properly 2017-08-17 10:44:22 +02:00
Issei.M
b72ced22ad [Validator] Add a property tag for File::$maxSize 2017-08-17 16:14:13 +09:00