Commit Graph

30739 Commits

Author SHA1 Message Date
Samuel ROZE
170b0ace2c [Finder] Glob wildcard while using double-star without ending slash 2017-04-10 10:50:31 -07:00
Fabien Potencier
f8e1098712 minor #22342 [Console] Inherit phpdoc from OutputFormatterInterface (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Inherit phpdoc from OutputFormatterInterface

| 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/22225#discussion_r109361374
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Commits
-------

ff3cb9cb27 [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-10 10:33:28 -07:00
Fabien Potencier
f7debe8a30 bug #22343 [Dotenv] Throwing an exception when loading a directory (sanpii)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Dotenv] Throwing an exception when loading a directory

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

8b83b58aa5 Throwing an exception when loading a directory
2017-04-10 10:15:08 -07:00
Fabien Potencier
eeb36eb65f bug #22344 [DX] [TwigBundle] Improve default expand states of exception template (curry684)
This PR was squashed before being merged into the 3.3-dev branch (closes #22344).

Discussion
----------

[DX] [TwigBundle] Improve default expand states of exception template

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22334
| License       | MIT

As discussed in #22334 this PR changes the default exception template to more intelligently decide which call stack to initially expand:
- All exceptions are scanned for user code, ignoring the front controller and callbacks
- Only exceptions containing user code are expanded
- If no user code is found the first exception is expanded

Commits
-------

df25691250 [DX] [TwigBundle] Improve default expand states of exception template
2017-04-10 10:12:04 -07:00
Niels Keurentjes
df25691250 [DX] [TwigBundle] Improve default expand states of exception template 2017-04-10 10:12:01 -07:00
Fabien Potencier
dbfea949fe bug #22361 [HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect() (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect()

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

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

f83f971c3f [HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect()
2017-04-10 10:08:49 -07:00
Fabien Potencier
bf7d08d119 [WebLink] fixed composer keyword 2017-04-10 10:04:52 -07:00
Fabien Potencier
5a76834aea feature #22273 Add a new Link component (dunglas)
This PR was squashed before being merged into the 3.3-dev branch (closes #22273).

Discussion
----------

Add a new Link component

| 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 | n/a
| License       | MIT
| Doc PR        | todo

This a proposal to extract HTTP preloading features introduced in #21478 in their own component.

There are some good reasons to do it:

* HTTP preloading is not (only) about assets: this standalone component could be very useful to replace resources embedding in APIs by HTTP/2 pushes like described in [this article](https://evertpot.com/rest-embedding-hal-http2/) by @evert. In such case, there is no reason to carry the whole asset component for an API.
* There is no dependency nor relation at all between the code of the asset compnent and the one I've added for Preloading features
* It makes the code cleaner (no more optional dependency in the `Asset` Twig extension)

This component would also better fit in HttpFoundation than in Asset. But there is no dependency between it and HttpFoundation and it can easily be used with PSR-7 too, so IMO it better belongs in a standalone component.

Btw, ~~~I plan to add support for prefetching to this component. Except a PR soon.~~~ Prefetching and prerendering support added in this PR.

ping @symfony/deciders

Commits
-------

053de25edf Add a new Link component
2017-04-10 09:55:53 -07:00
Kévin Dunglas
053de25edf Add a new Link component 2017-04-10 09:55:52 -07:00
Nicolas Grekas
3200d3738a [DI] Populate class of ChildDefinition when its id matches an existing FQCN 2017-04-10 18:46:19 +02:00
Nicolas Grekas
ab86457b12 [DI] Rework config hierarchy: defaults > instanceof > service config 2017-04-10 18:14:18 +02:00
Ryan Weaver
cbaee55223 [DI] Track changes at the "Definition" level 2017-04-10 18:14:17 +02:00
Nicolas Grekas
f83f971c3f [HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect() 2017-04-10 18:00:26 +02:00
Fabien Potencier
aada1a14cc bug #22358 [DI] Fix named args overridding (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix named args overridding

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

(The exception check in ResolveDefinitionTemplatesPass is not done in ResolveNamedArgumentsPass.)

Commits
-------

0c030d92f9 [DI] Fix named args overridding
2017-04-10 08:25:06 -07:00
Fabien Potencier
6d8c53ee76 added a comment in a test 2017-04-10 08:21:06 -07:00
Fabien Potencier
63592a646c bug #22352 [HttpFoundation] Add use_strict_mode in validOptions for session (sstok)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add `use_strict_mode` in validOptions for session

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

PHP ini `session.use_strict_mode` was added in PHP 5.5.2 so I didn't target 2.8 as this still uses PHP 5.3. https://secure.php.net/manual/en/session.configuration.php#ini.session.use-strict-mode

Commits
-------

130ee327d4 Add `use_strict_mode` in validOptions for session
2017-04-10 08:18:38 -07:00
Fabien Potencier
6928f12afa minor #22357 [HttpFoundation] Fix and test status codes according to IANA's data (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix and test status codes according to IANA's data

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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

This PR updates HTTP status code according to values [standardized by the IANA](https://www.iana.org/assignments/http-status-codes/http-status-codes.xml). It also add a test to check the conformance (we'll also be notified when a code is added, ~~removed~~ or modified).

All credits go to @fcabralpacheco for is work in Zend Diactoros: https://github.com/zendframework/zend-diactoros/pull/234

Commits
-------

72d25ccca7 [HttpFoundation] Fix and test status codes according to IANA's data
2017-04-10 08:10:43 -07:00
Fabien Potencier
3f7a157479 bug #22359 [Bridge] [Twig] Get and flush only flash sessions you need in getFlashes method (jordscream)
This PR was merged into the 3.3-dev branch.

Discussion
----------

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

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no ?!
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22355
| License       | MIT
| Doc PR        | symfony/symfony-docs

PR to get only flash sessions you need without flush everything

Commits
-------

ff82cb29bb [Bridge] [Twig] AppVariable: get and flush only flash sessions you need in getFlashes method
2017-04-10 08:05:56 -07:00
Jordan Samouh
ff82cb29bb [Bridge] [Twig] AppVariable: get and flush only flash sessions you need in getFlashes method 2017-04-10 16:49:57 +02:00
Nicolas Grekas
0c030d92f9 [DI] Fix named args overridding 2017-04-10 16:38:35 +02:00
Kévin Dunglas
72d25ccca7
[HttpFoundation] Fix and test status codes according to IANA's data 2017-04-10 16:36:56 +02:00
Christian Flothmann
bc93526731 Merge branch '3.2'
* 3.2:
  don't keep internal state between parser runs
  Add \Traversable typehint to phpdoc
  [ExpressionLanguage] Avoid dependency on ctype
  Moved ->setDate() before the deprecation handling.
  [Debug] Fix php notice
  [VarDumper] Relax tests to adapt for php 7.1rc4
2017-04-10 08:31:22 +02:00
Christian Flothmann
d41a3a56c2 Merge branch '2.8' into 3.2
* 2.8:
  don't keep internal state between parser runs
  Add \Traversable typehint to phpdoc
  [ExpressionLanguage] Avoid dependency on ctype
  [Debug] Fix php notice
  [VarDumper] Relax tests to adapt for php 7.1rc4
2017-04-09 22:04:44 +02:00
Christian Flothmann
b89ed60442 Merge branch '2.7' into 2.8
* 2.7:
  don't keep internal state between parser runs
  Add \Traversable typehint to phpdoc
  [ExpressionLanguage] Avoid dependency on ctype
  [Debug] Fix php notice
2017-04-09 20:13:48 +02:00
Sebastiaan Stok
130ee327d4
Add use_strict_mode in validOptions for session 2017-04-09 18:30:35 +02:00
Fabien Potencier
34655e69dd bug #22351 [Yaml] don't keep internal state between parser runs (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] don't keep internal state between parser runs

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

faf671db0f don't keep internal state between parser runs
2017-04-09 07:34:06 -07:00
Fabien Potencier
f33b19cc40 minor #22347 [FrameworkBundle] Add autowiring alias for Stopwatch (BPScott)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Add autowiring alias for Stopwatch

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

Following in the footsteps of #22098 to add aliases for various services, this adds an alias for `Symfony\Component\Stopwatch\Stopwatch`.

Commits
-------

707f74b50f [FrameworkBundle] Add autowiring alias for Stopwatch
2017-04-09 07:27:17 -07:00
Christian Flothmann
faf671db0f don't keep internal state between parser runs 2017-04-09 10:04:00 +02:00
Ben Scott
707f74b50f [FrameworkBundle] Add autowiring alias for Stopwatch 2017-04-08 13:34:08 +01:00
Sanpi
8b83b58aa5 Throwing an exception when loading a directory 2017-04-07 19:12:03 +02:00
Fabien Potencier
b784449514 minor #22303 Add \Traversable typehint to phpdoc (MetalArend)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #22303).

Discussion
----------

Add \Traversable typehint to phpdoc

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

Most of the times you use a DataMapperInterface, the first thing you do on the `$forms` parameter is `iterator_to_array`. However, as that variable is only hinted as `FormInterface[]`, and most IDE's and static analysers don't rely on code, but on the phpdoc...

Commits
-------

5310f11418 Add \Traversable typehint to phpdoc
2017-04-07 10:05:02 -07:00
MetalArend
5310f11418 Add \Traversable typehint to phpdoc 2017-04-07 10:05:02 -07:00
Fabien Potencier
7b8409ad37 feature #22315 Add Kernel::getProjectDir() (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add Kernel::getProjectDir()

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

`Kernel::getRootDir()` is misleading. It returns the path where `AppKernel.php` is stored, which is `app/` in Symfony 2/3, but `src/` in Symfony 4. But most of the time, we are using `getRootDir()` to get the project root dir, so `%kernel.root_dir%/../` is a common idiom.

Changing the value of `getRootDir()` would be a hard BC break, so I propose to create a new method, `getProjectDir()` to "replace" `getRootDir()` gradually.

Commits
-------

1f680ccb2d added Kernel::getProjectDir()
2017-04-07 09:56:33 -07:00
Fabien Potencier
49ae724e9c minor #22326 [DI] Enhance wording of autowiring exceptions (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Enhance wording of autowiring exceptions

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

> Cannot autowire service "j": argument "$i" of method "Symfony\Component\DependencyInjection\Tests\Compiler\J::__construct()" references class "Symfony\Component\DependencyInjection\Tests\Compiler\I" but no such service exists. You should maybe alias this class to the existing "i" service; or type-hint against interface "Symfony\Component\DependencyInjection\Tests\Compiler\IInterface" instead.

Commits
-------

da792b2ff7 [DI] Enhance wording of autowiring exceptions
2017-04-07 09:43:12 -07:00
Fabien Potencier
0eed690679 minor #22325 [ExpressionLanguage] Avoid ExpressionLanguage dependency on ctype (nijel)
This PR was submitted for the 3.2 branch but it was merged into the 2.7 branch instead (closes #22325).

Discussion
----------

[ExpressionLanguage] Avoid ExpressionLanguage dependency on ctype

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

There is undocumented dependency on ctype extension in ExpressionLanguage. I've chosen to remove it rather than document as we're using ExpressionLanguage in phpMyAdmin and this is only dependency which needs ctype.

I'm submitting this against 3.2 to get this fix to released version sooner, but it can be without problems applied to master as well.

Commits
-------

81de5fef4b [ExpressionLanguage] Avoid dependency on ctype
2017-04-07 09:40:12 -07:00
Michal Čihař
81de5fef4b [ExpressionLanguage] Avoid dependency on ctype
This avoids ExpressionLanguage library dependency on ctype.
2017-04-07 09:40:11 -07:00
Fabien Potencier
f04c0b5f04 bug #22340 [HttpKernel] Skip ContainerAwareInterface::setContainer from service_arguments actions registration (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Skip ContainerAwareInterface::setContainer from service_arguments actions registration

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

As it would never be used

Commits
-------

ad59e1804f Skip ContainerAwareInterface::setContainer from service_arguments actions registration
2017-04-07 07:44:54 -07:00
Fabien Potencier
ec2cc08654 bug #22330 [HttpKernel] Resolve invokable controllers short notations using ServiceValueResolver (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Resolve invokable controllers short notations using ServiceValueResolver

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

Register the service id as an alias of `id:__invoke` so that using the invokable short notation (id only) triggers the ServiceArgumentResolver.

Commits
-------

717fa85b91 Resolve invokable controllers short notations using ServiceValueResolver
2017-04-07 07:41:23 -07:00
Fabien Potencier
1272be6376 minor #22332 [VarDumper] Relax tests to adapt for php 7.1rc4 (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Relax tests to adapt for php 7.1rc4

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

Commits
-------

3672c01e3c [VarDumper] Relax tests to adapt for php 7.1rc4
2017-04-07 07:37:21 -07:00
Roland Franssen
ff3cb9cb27 [Console] Inherit phpdoc from OutputFormatterInterface 2017-04-07 16:02:07 +02:00
Robin Chalas
ad59e1804f Skip ContainerAwareInterface::setContainer from service_arguments actions registration 2017-04-07 15:58:30 +02:00
Nicolas Grekas
325e61dbbe bug #22304 Moved $this->setDate() before the deprecation handling. (mpdonadio)
This PR was squashed before being merged into the 3.2 branch (closes #22304).

Discussion
----------

Moved $this->setDate() before the deprecation handling.

| Q             | A
| ------------- | ---
| Branch?       | 3.2 <!-- 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 | #... <!-- #-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.
-->

https://github.com/symfony/symfony/pull/22036 merged the patch into the wrong place; the `$this->setDate()` happens after the deprecation handling, so it does not always get called.

See also https://www.drupal.org/node/2712647?page=1#comment-12025349

Commits
-------

b6df4e7 Moved ->setDate() before the deprecation handling.
2017-04-07 14:28:10 +02:00
Matthew Donadio
b6df4e7834 Moved ->setDate() before the deprecation handling. 2017-04-07 14:27:40 +02:00
Nicolas Grekas
d48fae7f8c bug #22307 [Debug] Fix php notice (enumag)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #22307).

Discussion
----------

[Debug] Fix php notice

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

Of course autoloading of an empty string should not actually happen (fixed that in https://github.com/twigphp/Twig/pull/2438) but if it does happen it should not throw a php notice.

```
Notice: Uninitialized string offset 0
```

Commits
-------

e333a1a [Debug] Fix php notice
2017-04-07 14:20:28 +02:00
Jáchym Toušek
e333a1a86e [Debug] Fix php notice 2017-04-07 14:16:45 +02:00
Nicolas Grekas
3672c01e3c [VarDumper] Relax tests to adapt for php 7.1rc4 2017-04-07 11:49:35 +02:00
Robin Chalas
717fa85b91 Resolve invokable controllers short notations using ServiceValueResolver 2017-04-07 11:28:11 +02:00
Nicolas Grekas
da792b2ff7 [DI] Enhance wording of autowiring exceptions 2017-04-07 10:22:28 +02:00
Nicolas Grekas
549af739af Merge branch '3.2'
* 3.2:
  [HttpFoundation] Fix transient tests
  [DI] Fix second auto-registration
2017-04-07 08:15:11 +02:00
Nicolas Grekas
db31e80f0e Merge branch '2.8' into 3.2
* 2.8:
  [HttpFoundation] Fix transient tests
  [DI] Fix second auto-registration
2017-04-07 08:13:01 +02:00