Commit Graph

29040 Commits

Author SHA1 Message Date
Nicolas Grekas
d08f1101df [DI] Deprecate case insentivity of service identifiers 2017-01-11 16:25:44 +01:00
Nicolas Grekas
16d33e1fff Merge branch '3.2'
* 3.2:
  [DI] Add missing legacy group on testLegacy
  Minor tweaks
  Fix merge
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:32:56 +01:00
Nicolas Grekas
1fcb66d129 Merge branch '3.1' into 3.2
* 3.1:
  [DI] Add missing legacy group on testLegacy
2017-01-10 15:27:50 +01:00
Nicolas Grekas
027d58869f Merge branch '2.8' into 3.1
* 2.8:
  [DI] Add missing legacy group on testLegacy
2017-01-10 15:27:30 +01:00
Nicolas Grekas
a351c24e6c Merge branch '2.7' into 2.8
* 2.7:
  [DI] Add missing legacy group on testLegacy
2017-01-10 15:27:01 +01:00
Nicolas Grekas
c5847696ea [DI] Add missing legacy group on testLegacy 2017-01-10 15:26:05 +01:00
Nicolas Grekas
80ed2c5173 Minor tweaks 2017-01-10 15:21:25 +01:00
Nicolas Grekas
783abab7ae Merge branch '3.1' into 3.2
* 3.1:
  Fix merge
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:14:38 +01:00
Nicolas Grekas
15ff7f9195 Merge branch '2.8' into 3.1
* 2.8:
  Fix merge
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:09:41 +01:00
Nicolas Grekas
87db587fa6 Fix merge 2017-01-10 15:07:18 +01:00
Nicolas Grekas
144eb54fcd Merge branch '2.7' into 2.8
* 2.7:
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:03:07 +01:00
Nicolas Grekas
f03073c103 bug #21179 [TwigBundle] Fixing regression in TwigEngine exception handling (Bertalan Attila)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fixing regression in TwigEngine exception handling

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

Fixing regression after #20831 in TwigEngine exception handling.

Commits
-------

390cb33 Fixing regression in TwigEngine exception handling.
2017-01-10 14:51:20 +01:00
Nicolas Grekas
d18c2cadfc minor #21226 Fix Container and PhpDumper test inaccuracies (nikita2206)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix Container and PhpDumper test inaccuracies

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

Stumbled upon and fixed some minor inaccuracies in tests for DI container, they might have lead to undetected changes of `Container`'s behavior

Commits
-------

24b93cc Fix Container and PhpDumper test inaccuracies
2017-01-10 14:43:59 +01:00
Nicolas Grekas
e355739b83 minor #21225 [DI] Dont share service when no id provided (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Dont share service when no id provided

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

814f633 [DI] Dont share service when no id provided
2017-01-10 14:43:16 +01:00
Nicolas Grekas
814f63390d [DI] Dont share service when no id provided 2017-01-10 14:32:11 +01:00
Nikita Nefedov
24b93cc75c Fix Container and PhpDumper test inaccuracies 2017-01-10 14:19:58 +03:00
Fabien Potencier
9e6d6ba3a9 bug #21219 [DI] Fixes aliases visibility with and without defaults (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fixes aliases visibility with and without defaults

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

Commits
-------

f1cc090465 [DI] Fixes aliases visibility with and without defaults
2017-01-09 12:26:05 -08:00
Fabien Potencier
44f6a8c6b1 bug #21220 [DI] Fix missing new line after private alias (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix missing new line after private alias

| 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/21219#discussion_r95220565
| License       | MIT
| Doc PR        | N/A

Without this change, the output is:

```yml
# [...]
alias_for_foo: '@foo'
another_alias_for_foo:
    alias: foo
    public: false    another_third_alias_for_foo: '@foo' # <--- missing new line after `public: false`
```

(this is tested by the `CrossCheckTest` but there is no fixture file to update (automatically dumped and removed by the test case))

Commits
-------

101a165d0d [DI] Fix missing new line after private alias
2017-01-09 12:23:12 -08:00
Maxime Steinhausser
f1cc090465 [DI] Fixes aliases visibility with and without defaults 2017-01-09 20:25:31 +01:00
Maxime Steinhausser
101a165d0d [DI] Fix missing new line after private alias 2017-01-09 19:49:53 +01:00
Fabien Potencier
e9f2512c04 bug #21211 Classloader tmpname (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

Classloader tmpname

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

In dev env:

from:

> Notice: tempnam(): file created in the system's temporary directory

to:

> Failed to write cache file "/var/www/html/var/cache/dev/classes.php".

Commits
-------

3c887da4f3 [ClassLoader] Throw an exception if the cache is not writeable
2017-01-09 06:56:46 -08:00
Grégoire Pineau
3c887da4f3 [ClassLoader] Throw an exception if the cache is not writeable 2017-01-09 15:44:50 +01:00
Fabien Potencier
e66e6afcc1 feature #21188 [HttpFoundation] Add File\Stream for size-unknown BinaryFileResponse (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpFoundation] Add File\Stream for size-unknown BinaryFileResponse

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

Replaces #19740. Native "getSize" is reported to return false on error, so using false as return type doesn't break the signature.

Commits
-------

8011209a18 [HttpFoundation] Add File\Stream for size-unknown BinaryFileResponse
2017-01-09 06:38:12 -08:00
Fabien Potencier
bb1e076899 minor #21191 [Yaml] Remove unused argument (GuilhemN)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Yaml] Remove unused argument

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

This PR removes an unused argument of `Inline::parseScalar()`. I based it on master as that's not really a bug fix but the lowest applicable branch is 3.0 (the method was not internal in 2.x).

Commits
-------

1a14a1f274 [Yaml] Remove an unused argument
2017-01-09 06:37:34 -08:00
Nicolas Grekas
8011209a18 [HttpFoundation] Add File\Stream for size-unknown BinaryFileResponse 2017-01-09 15:30:01 +01:00
Fabien Potencier
5f4ba3199c feature #21214 [DI] Allow ~ instead of {} for services in Yaml (wouterj)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Allow ~ instead of {} for services in Yaml

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

Now we can omit the class name, Yaml config can look like this:
```yaml
services:
    AppBundle\Something: {}
```

While this works, the consistent way in Symfony for such cases is to use `~`. This PR allows to use `~` as well, ending up with:
```yaml
services:
    AppBundle\Something: ~
```

Commits
-------

28a1b5ac47 Allow setting services as null
2017-01-09 06:01:23 -08:00
WouterJ
28a1b5ac47 Allow setting services as null 2017-01-09 13:12:14 +01:00
Bertalan Attila
390cb335fa Fixing regression in TwigEngine exception handling. 2017-01-09 10:33:51 +01:00
Fabien Potencier
e6bd47e457 minor #21209 [SecurityBundle] removed usage of the templating component (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[SecurityBundle] removed usage of the templating component

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

17240eb7e8 [SecurityBundle] removed usage of the templating component
2017-01-08 15:07:02 -08:00
Fabien Potencier
17240eb7e8 [SecurityBundle] removed usage of the templating component 2017-01-08 13:33:13 -08:00
Fabien Potencier
a97cdd63a2 Merge branch '3.2'
* 3.2:
  fixed bad merge
2017-01-08 13:20:52 -08:00
Fabien Potencier
dd0ee1f6dd fixed bad merge 2017-01-08 13:20:47 -08:00
Fabien Potencier
9b99fffb9d Merge branch '3.2'
* 3.2:
  [TwigBundle] fixed usage when Templating is not installed
  [Validator] Check cascasdedGroups for being countable
  [Cache] Add changelog for 3.2
  [Cache] Add changelog
  [Filesystem] Check that the directory is writable after created it in dumpFile()
  [HttpFoundation] Improved set cookie header tests
  [Serializer] int is valid when float is expected when deserializing JSON
  [Console] increased code coverage of Output classes
  Added missing headers in fixture files
  [Profiler][VarDumper] Fix minor color issue & duplicated selector
2017-01-08 13:15:04 -08:00
Fabien Potencier
831d0a0553 Merge branch '3.1' into 3.2
* 3.1:
  [TwigBundle] fixed usage when Templating is not installed
  [Validator] Check cascasdedGroups for being countable
  [Cache] Add changelog
  [Filesystem] Check that the directory is writable after created it in dumpFile()
  [HttpFoundation] Improved set cookie header tests
  [Serializer] int is valid when float is expected when deserializing JSON
  [Console] increased code coverage of Output classes
  Added missing headers in fixture files
  [Profiler][VarDumper] Fix minor color issue & duplicated selector
2017-01-08 12:47:33 -08:00
Fabien Potencier
789111c52a Merge branch '2.8' into 3.1
* 2.8:
  [TwigBundle] fixed usage when Templating is not installed
  [Validator] Check cascasdedGroups for being countable
  [Filesystem] Check that the directory is writable after created it in dumpFile()
  [HttpFoundation] Improved set cookie header tests
  [Console] increased code coverage of Output classes
  [Profiler][VarDumper] Fix minor color issue & duplicated selector
2017-01-08 12:43:43 -08:00
Fabien Potencier
4546377125 Merge branch '2.7' into 2.8
* 2.7:
  [TwigBundle] fixed usage when Templating is not installed
  [Validator] Check cascasdedGroups for being countable
  [Filesystem] Check that the directory is writable after created it in dumpFile()
  [HttpFoundation] Improved set cookie header tests
  [Console] increased code coverage of Output classes
2017-01-08 12:43:03 -08:00
Fabien Potencier
6bd7840169 bug #21205 [TwigBundle] fixed usage when Templating is not installed (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] fixed usage when Templating is not installed

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

In #20799, the decoupling of the Templating definition means that the `twig.loader.filesystem` is not always defined, but used in Extension. So, this PR does the opposite as what was done before. Use `twig.loader.native_filesystem` by default and copy paths to `twig.loader.filesystem` when templating is used.

/cc @xabbuh

Commits
-------

6aa98d163d [TwigBundle] fixed usage when Templating is not installed
2017-01-08 12:42:44 -08:00
Fabien Potencier
6aa98d163d [TwigBundle] fixed usage when Templating is not installed 2017-01-08 12:32:10 -08:00
Fabien Potencier
efe2a93bba feature #20612 [Filesystem] Add appendToFile() (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Filesystem] Add appendToFile()

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

So we could append content to a file:

```php
(new Filesystem)->appendToFile($file, 'bar');
```

instead of doing it in two steps:

```php
if (false === $content = @file_get_contents($file)) {
    throw new \Exception();
}

(new Filesystem)->dumpFile($file, $content.'bar');
```

Doing it opt-in using `dumpFile(..., $append = false)` would have been enough but not possible for BC.

Commits
-------

1f7b753670 [Filesystem] Add appendToFile()
2017-01-08 12:18:13 -08:00
Robin Chalas
1f7b753670
[Filesystem] Add appendToFile() 2017-01-08 21:06:51 +01:00
Fabien Potencier
2ee8626e60 feature #20612 [Filesystem] Add appendToFile() (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Filesystem] Add appendToFile()

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

So we could append content to a file:

```php
(new Filesystem)->appendToFile($file, 'bar');
```

instead of doing it in two steps:

```php
if (false === $content = @file_get_contents($file)) {
    throw new \Exception();
}

(new Filesystem)->dumpFile($file, $content.'bar');
```

Doing it opt-in using `dumpFile(..., $append = false)` would have been enough but not possible for BC.

Commits
-------

9fb5293122 [Filesystem] Add appendToFile()
2017-01-08 11:58:00 -08:00
Robin Chalas
9fb5293122
[Filesystem] Add appendToFile() 2017-01-08 20:22:13 +01:00
Fabien Potencier
263e6d14d9 bug #21203 [DependencyInjection] moved up ResolveClassPass in the container pass list (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] moved up ResolveClassPass in the container pass list

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

Some compiler passes need access to the service class names. But when using an empty class name (the service id being the class name), the resolution happens too late (during the optimization step). This PR fixes this by moving up the ResolveClassPass earlier in the stack.

Commits
-------

2e5b69f8d8 [DependencyInjection] moved up ResolveClassPass in the container pass list
2017-01-08 10:35:09 -08:00
Fabien Potencier
2e5b69f8d8 [DependencyInjection] moved up ResolveClassPass in the container pass list 2017-01-08 10:25:16 -08:00
Fabien Potencier
23294e59ca bug #21155 [Validator] Check cascasdedGroups for being countable (scaytrase)
This PR was squashed before being merged into the 2.7 branch (closes #21155).

Discussion
----------

[Validator] Check cascasdedGroups for being countable

Prevents notice for PHP 7.2

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

Just repeated for this place https://github.com/symfony/symfony/pull/20859
Waiting travis to fill in the `Tests pass` field

`cascasdedGroups` can be null at this point (according to failures and phpdoc)

Commits
-------

8fa45a130b [Validator] Check cascasdedGroups for being countable
2017-01-08 08:16:04 -08:00
Pavel Batanov
8fa45a130b [Validator] Check cascasdedGroups for being countable 2017-01-08 08:16:02 -08:00
Fabien Potencier
c1ee6e2891 minor #21202 [Cache] Add changelog for 3.2 (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Add changelog for 3.2

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

9aaa8acbc9 [Cache] Add changelog for 3.2
2017-01-08 08:04:36 -08:00
Fabien Potencier
41bbe5c7f1 minor #21201 [Cache] Add changelog (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Add changelog

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

Commits
-------

d087d0ffea [Cache] Add changelog
2017-01-08 08:03:15 -08:00
Fabien Potencier
95043b2cb6 feature #21114 [Yaml] parse multi-line strings (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Yaml] parse multi-line strings

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

When working on #21084, I discovered that the YAML parser does not support (unquoted) multi-line strings (neither as plain strings nor as values for mappings). This PR adds support for them.

Commits
-------

ec593b923b [Yaml] parse multi-line strings
2017-01-08 08:01:14 -08:00
Fabien Potencier
e18f47f8d5 bug #21200 [Filesystem] Check that directory is writable after created it in dumpFile() (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] Check that directory is writable after created it in dumpFile()

| 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/20612#discussion_r95077788
| License       | MIT
| Doc PR        | n/a

In case permissions have been changed meanwhile

Commits
-------

dbc4148535 [Filesystem] Check that the directory is writable after created it in dumpFile()
2017-01-08 07:59:38 -08:00