Commit Graph

30739 Commits

Author SHA1 Message Date
Ryan Weaver
e9b96e5f44 Enhancing integration test to show that "override" tags always show up first 2017-04-12 10:34:49 -04:00
Fabien Potencier
4e13eeecfb bug #22390 [FrameworkBundle] Fix serializer aliases (jvasseur)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix serializer aliases

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

Fix serializer aliases introduced in #22098

Commits
-------

22e72d0a62 Fix serializer aliases
2017-04-12 07:20:30 -07:00
Fabien Potencier
9541264c2b bug #22393 [TwigBundle] Fix log message formatting in exception views (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBundle] Fix log message formatting in exception views

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

| __Before__      |
| ------------- |
| ![before](http://image.prntscr.com/image/984005e787ea4418a75e76d968f3af14.png)   |

| __After__        |
| ------------- |
| ![after](http://image.prntscr.com/image/608331f67030455d9bb1eaeec2bc4eb8.png)   |

Commits
-------

0f9660b854 Fix log message formatting in exception views
2017-04-12 07:18:23 -07:00
Fabien Potencier
0c19ca8af9 feature #22384 [DI] Replace autowiring BC break by regular deprecation (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Replace autowiring BC break by regular deprecation

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

It happens that doing so is really easy now. And as discussed in #22295, this should be more friendly to our users.

Commits
-------

0ed087d972 [DI] Replace autowiring BC break by regular deprecation
2017-04-12 07:16:24 -07:00
Fabien Potencier
2f885ccc4c fail when detecting risky tests 2017-04-12 07:15:58 -07:00
Fabien Potencier
03acba5341 Merge branch '3.2'
* 3.2:
  fail when detecting risky tests
  fail when detecting risky tests
  fail when detecting risky tests
2017-04-12 07:14:56 -07:00
Fabien Potencier
0834f133ec fail when detecting risky tests 2017-04-12 07:14:23 -07:00
Fabien Potencier
d7a0737d72 Merge branch '2.8' into 3.2
* 2.8:
  fail when detecting risky tests
  fail when detecting risky tests
2017-04-12 07:13:17 -07:00
Fabien Potencier
6edd08d7c5 fail when detecting risky tests 2017-04-12 07:11:35 -07:00
Fabien Potencier
d362bb1936 Merge branch '2.7' into 2.8
* 2.7:
  fail when detecting risky tests
2017-04-12 07:07:15 -07:00
Fabien Potencier
cff1842786 minor #22387 fail when detecting risky tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fail when detecting risky 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        |

The `--fail-on-risky` option is available since sebastianbergmann/phpunit@7e06a82806 which was first released with PHPUnit 5.2.

Commits
-------

3792ee6c93 fail when detecting risky tests
2017-04-12 07:03:43 -07:00
Fabien Potencier
48b048d864 feature #22383 added a more specialized exception for a better error message (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

added a more specialized exception for a better error message

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

When trying to load a resource, it is very interesting to understand why a resource cannot be loaded. Especially when you get `Cannot load resource "../src/Controller/".`... when the real error is that annotation support is disabled. This PR adds more information in that case.

Commits
-------

aeb9bffa8f added a more specialized exception for a better error message
2017-04-12 06:59:41 -07:00
Robin Chalas
0f9660b854 Fix log message formatting in exception views 2017-04-12 13:47:16 +02:00
Jérôme Vasseur
22e72d0a62 Fix serializer aliases 2017-04-12 12:44:19 +02:00
Christian Flothmann
3792ee6c93 fail when detecting risky tests 2017-04-12 09:39:27 +02:00
Nicolas Grekas
0ed087d972 [DI] Replace autowiring BC break by regular deprecation 2017-04-11 23:14:08 +02:00
Fabien Potencier
aeb9bffa8f added a more specialized exception for a better error message 2017-04-11 13:45:43 -07:00
Nicolas Grekas
9fdd36f23d Merge branch '3.2'
* 3.2:
  Fix bad merge
2017-04-11 22:43:03 +02:00
Nicolas Grekas
e71807bc60 Fix bad merge 2017-04-11 22:42:49 +02:00
Nicolas Grekas
6491fd5854 Merge branch '3.2'
* 3.2:
  Allow terminal dimensions to be set to 0 (unbounded)
  [Cache] Remove exception false-positive from FilesystemAdapterTrait
  fix risky tests
  fix risky tests
  [Yaml] release memory after parsing
  [HttpFoundation] Fix and test status codes according to IANA's data
  Add `use_strict_mode` in validOptions for session
  [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-11 20:40:10 +02:00
Fabien Potencier
5b4091ed7c bug #22372 [DI] Allow using parameters in "prototype" resource paths (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Allow using parameters in "prototype" resource paths

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

Commits
-------

d3fc86c709 [DI] Allow using parameters in "prototype" resource paths
2017-04-11 11:36:38 -07:00
Nicolas Grekas
a2bd375f60 Merge branch '2.8' into 3.2
* 2.8:
  fix risky tests
  [Yaml] release memory after parsing
  [HttpFoundation] Fix and test status codes according to IANA's data
  Add `use_strict_mode` in validOptions for session
  [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-11 20:36:00 +02:00
Nicolas Grekas
0bc5eea71e Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] release memory after parsing
  [HttpFoundation] Fix and test status codes according to IANA's data
  Add `use_strict_mode` in validOptions for session
  [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-11 20:34:35 +02:00
Fabien Potencier
bca09e4933 bug #22374 [Cache] Remove exception false-positive from FilesystemAdapterTrait (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Remove exception false-positive from FilesystemAdapterTrait

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

As reported in the linked issue, there seem to be a race condition in FilesystemAdapterTrait (maybe related to realpath cache?).

Let's remove that exception: if the mkdir really fails, the error will be logged later on when a cache entry will be written (or succeed if the race is over.)

Commits
-------

a756db78d0 [Cache] Remove exception false-positive from FilesystemAdapterTrait
2017-04-11 11:23:14 -07:00
Nicolas Grekas
d3fc86c709 [DI] Allow using parameters in "prototype" resource paths 2017-04-11 20:16:57 +02:00
Fabien Potencier
8d34959fe9 minor #22380 fix risky tests (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

fix risky tests

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

9125911668 fix risky tests
2017-04-11 09:38:31 -07:00
Fabien Potencier
54fa2ff975 minor #22379 fix risky tests (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

fix risky tests

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

Commits
-------

86b685f617 fix risky tests
2017-04-11 09:37:23 -07:00
Fabien Potencier
9950b90bb6 feature #22356 [DI] Rework config hierarchy: defaults > instanceof > service config (weaverryan, nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Rework config hierarchy: defaults > instanceof > service config

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

Replaces #22294.
The main change is that ChildDefinition does not have "instanceof" applied anymore. All the complexity of the pass came from the merging logic required to deal with them. But in fact, we'd better not have any such logic and just not apply "instanceof" to ChildDefinition (but have them inherit from their parents with the usual logic).

Commits
-------

6d6116b920 Adding an integration test for the hirarchy of defaults, instanceof, child, parent definitions
ab86457b12 [DI] Rework config hierarchy: defaults > instanceof > service config
cbaee55223 [DI] Track changes at the "Definition" level
2017-04-11 09:32:21 -07:00
Fabien Potencier
ed1e8fbb76 bug #22377 [Console] Allow terminal dimensions to be set to 0 (unbounded) (duncan3dc)
This PR was merged into the 3.2 branch.

Discussion
----------

[Console] Allow terminal dimensions to be set to 0 (unbounded)

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

A previous PR (#20328) changed the behavior of terminals with undefined widths from unbounded to 80 characters. And due to the way the existing code worked it become impossible to set a terminal to be unbounded again. This PR provides a way to restore the previous behavior:
```php
putenv('COLUMNS=0');
```

Commits
-------

4c1b001891 Allow terminal dimensions to be set to 0 (unbounded)
2017-04-11 08:47:22 -07:00
Craig Duncan
4c1b001891 Allow terminal dimensions to be set to 0 (unbounded) 2017-04-11 16:41:42 +01:00
Fabien Potencier
44008e8a98 minor #22378 CS fixes (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

CS fixes

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

Commits
-------

e9ce2687de CS fixes
2017-04-11 08:25:15 -07:00
Fabien Potencier
e904ab8cbe bug #22376 [FrameworkBundle] Use findDefinition() instead of getDefinition() on aliases (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Use findDefinition() instead of getDefinition() on aliases

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

The services for which `has()` is called might be aliases at this point so `getDefinition()` gives an exception, I ran into by executing this pass but not the removing ones (skipping ReplaceAliasByActualDefinitionPass) while working on https://github.com/symfony/symfony/issues/16388. Let's make it safe to use independently.

Commits
-------

41f3d1f166 Use findDefinition() instead of getDefinition() after calling has()
2017-04-11 08:18:29 -07:00
Robin Chalas
e9ce2687de CS fixes 2017-04-11 17:15:30 +02:00
Fabien Potencier
f478161ff5 minor #22367 [Yaml] release memory after parsing (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] release memory after parsing

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

Follow up of #22351 to release memory after parsing as suggested by @stof.

Commits
-------

c891413f6c [Yaml] release memory after parsing
2017-04-11 07:42:37 -07:00
Ryan Weaver
6d6116b920 Adding an integration test for the hirarchy of defaults, instanceof, child, parent definitions 2017-04-11 16:40:02 +02:00
Fabien Potencier
a6dbc39112 bug #22364 [Dotenv] Throwing an error when loading nothing (sanpii)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Dotenv] Throwing an error when loading nothing

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

This is a quick fix to prevent anoying when you follow a tutorial using another dotenv component. For example, this code uses [vlucas/phpdotenv](https://packagist.org/packages/vlucas/phpdotenv):

```php
$dotenv = new Dotenv\Dotenv(__DIR__.'/../');
$dotenv->load();
```

Silently failed with symfony/dotenv.

Commits
-------

911bc68991 [Dotenv] Throwing an error when loading nothing
2017-04-11 07:29:46 -07:00
Robin Chalas
41f3d1f166 Use findDefinition() instead of getDefinition() after calling has() 2017-04-11 16:03:41 +02:00
Sanpi
911bc68991 [Dotenv] Throwing an error when loading nothing 2017-04-11 15:47:47 +02:00
Nicolas Grekas
a756db78d0 [Cache] Remove exception false-positive from FilesystemAdapterTrait 2017-04-11 15:28:15 +02:00
Christian Flothmann
9125911668 fix risky tests 2017-04-11 11:53:09 +02:00
Nicolas Grekas
35afac00a0 bug #22368 [Bridge] [Twig] get and flush only flash sessions you need in getFlashes method (jordscream)
This PR was squashed before being merged into the 3.3-dev branch (closes #22368).

Discussion
----------

[Bridge] [Twig] get and flush only flash sessions you need in getFlashes method

| Q             | A
| ------------- | ---
| Branch?       | master
| 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?   | yes
| Fixed tickets | #22359
| License       | MIT
| Doc PR        | symfony/symfony-docs

@xabbuh comments about empty array to return

Commits
-------

33b044a [Bridge] [Twig] get and flush only flash sessions you need in getFlashes method
2017-04-11 11:36:34 +02:00
Jordan Samouh
33b044adb1 [Bridge] [Twig] get and flush only flash sessions you need in getFlashes method 2017-04-11 11:36:26 +02:00
Christian Flothmann
86b685f617 fix risky tests 2017-04-11 11:19:47 +02:00
Nicolas Grekas
4675c2261f minor #22370 [FrameworkBundle] Fix web_link.add_link_header_listener definition (dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix web_link.add_link_header_listener definition

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see comment below -->
| Bug fix?      | yes
| 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?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

b7ac772 [FrameworkBundle] Fix web_link.add_link_header_listener definition
2017-04-11 11:19:44 +02:00
Kévin Dunglas
b7ac772994
[FrameworkBundle] Fix web_link.add_link_header_listener definition 2017-04-11 11:15:03 +02:00
Nicolas Grekas
383fa708de minor #22369 [WebLink] Fix tests (dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[WebLink] Fix tests

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see comment below -->
| Bug fix?      | yes
| 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?   | I hope
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

e31341a [WebLink] Fix tests
2017-04-11 10:48:48 +02:00
Kévin Dunglas
e31341a855
[WebLink] Fix tests 2017-04-11 10:27:21 +02:00
Christian Flothmann
c891413f6c [Yaml] release memory after parsing 2017-04-11 09:50:01 +02:00
Fabien Potencier
8807eaf30b feature #22362 [DI] Populate class of ChildDefinition when its id matches an existing FQCN (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Populate class of ChildDefinition when its id matches an existing FQCN

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

See linked issue for expected DX.
Instead of doing a "continue", let's throw to force the resolution of any ambiguities.
There is a minor potential BC Break, if one uses an ambiguous FQCN as child-definition id in 3.2 or below.
To me, this should be rare, and easy to fix (compile time only).
The DX enhancement this PR provides looks worth it.

> Service definition "App\Foo\Child" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.

Commits
-------

3200d3738a [DI] Populate class of ChildDefinition when its id matches an existing FQCN
2017-04-10 18:20:21 -07:00
Fabien Potencier
bbb0d5ed42 feature #22239 [Finder] Glob wildcard while using double-star without ending slash (sroze)
This PR was squashed before being merged into the 3.3-dev branch (closes #22239).

Discussion
----------

[Finder] Glob wildcard while using double-star without ending slash

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

This PR allows to use the `Glob::toRegex` method to dump a glob that will match "everything after" while using the double-star without leading slash. `/foo/**` will therefore match `/foo/a` or `/foo/a/b/c` or even `/foo/a/b/c/d.e`.

The use-case for this change is an application allowing its users to match a list of files/folders from such glob pattern.

Happy to add a line in the CHANGELOG and documentation if you feel that would make sense.

Commits
-------

170b0ace2c [Finder] Glob wildcard while using double-star without ending slash
2017-04-10 10:50:33 -07:00