Commit Graph

25674 Commits

Author SHA1 Message Date
Robin Chalas
c4daef9db6 [VarDumper] Remove decoration from actual output in tests 2018-04-25 16:05:38 +02:00
Fabien Potencier
e775871d82 minor #27013 [HttpFoundation] Add HTTP_EARLY_HINTS const (ahmadmayahi)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #27013).

Discussion
----------

[HttpFoundation] Add HTTP_EARLY_HINTS const

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

Commits
-------

c606d60c54 [HttpFoundation] Add HTTP_EARLY_HINTS const
2018-04-23 14:28:29 +02:00
Ahmad Mayahi
c606d60c54 [HttpFoundation] Add HTTP_EARLY_HINTS const 2018-04-23 14:28:22 +02:00
Fabien Potencier
45f26c416a minor #27012 [DoctrineBridge] Improve exception message at IdReader::getIdValue() (phansys)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] Improve exception message at `IdReader::getIdValue()`

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

5e98478d94 [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
2018-04-23 11:30:02 +02:00
Javier Spagnoletti
5e98478d94 [DoctrineBridge] Improve exception message at IdReader::getIdValue() 2018-04-23 06:20:42 -03:00
Fabien Potencier
923417122a fixed CS 2018-04-22 07:56:10 +02:00
Fabien Potencier
a6c22f5edc bug #26910 Use new PHP7.2 functions in hasColorSupport (johnstevenson)
This PR was squashed before being merged into the 2.7 branch (closes #26910).

Discussion
----------

Use new PHP7.2 functions in hasColorSupport

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

Fixes bc break in #26609
Reference: https://github.com/composer/xdebug-handler/blob/master/src/Process.php#L111

Commits
-------

b0c92254a0 Use new PHP7.2 functions in hasColorSupport
2018-04-22 07:55:13 +02:00
johnstevenson
b0c92254a0 Use new PHP7.2 functions in hasColorSupport 2018-04-22 07:55:01 +02:00
Fabien Potencier
3d44c7f982 bug #26999 [VarDumper] Fix dumping of SplObjectStorage (corphi)
This PR was squashed before being merged into the 2.7 branch (closes #26999).

Discussion
----------

[VarDumper] Fix dumping of SplObjectStorage

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

This is a bug fix for dumping instances of `SplObjectStorage`. The bug was introduced in #23176, by fixing that the internal pointer was changed upon dumping. I added tests for both issues.

Commits
-------

b2ac6b6fbf [VarDumper] Fix dumping of SplObjectStorage
2018-04-22 07:46:01 +02:00
Philipp Cordes
b2ac6b6fbf [VarDumper] Fix dumping of SplObjectStorage 2018-04-22 07:45:54 +02:00
Nicolas Grekas
b97a4ae031 minor #26938 [minor] SCA (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #26938).

Discussion
----------

[minor] SCA

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

- Control flow tweaks

Commits
-------

877e678 [minor] SCA
2018-04-20 10:39:24 +02:00
Vladimir Reznichenko
877e67883c [minor] SCA 2018-04-20 10:39:18 +02:00
Fabien Potencier
f981f7aae8 fixed Twig URL 2018-04-20 08:14:58 +02:00
Fabien Potencier
b0410d457e bug #26886 Don't assume that file binary exists on *nix OS (teohhanhui)
This PR was merged into the 2.7 branch.

Discussion
----------

Don't assume that file binary exists on *nix OS

| 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

Certain lightweight distributions such as Alpine Linux (popular for smaller Docker images) do not include it by default.

Commits
-------

e2c1f24fbd Don't assume that file binary exists on *nix OS
2018-04-17 12:07:04 +02:00
Teoh Han Hui
e2c1f24fbd Don't assume that file binary exists on *nix OS
Certain lightweight distributions such as Alpine Linux (popular for smaller Docker images) do not include it by default.
2018-04-17 11:15:40 +02:00
Fabien Potencier
d17d38d291 bug #26643 Fix that ESI/SSI processing can turn a "private" response "public" (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #26643).

Discussion
----------

Fix that ESI/SSI processing can turn a "private" response "public"

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

Under the condition that
* we are merging in at least one *embedded* response,
* all *embedded* responses are `public`,
* the *main* response is `private` and
* all responses use expiration-based caching (note: no `s-maxage` on the *main* response)

... the resulting response will turn to `Cache-Control: public`.

The real issue is that when all responses use expiration-based caching, a combined max age is computed. This is set on the *main* response using `Response::setSharedMaxAge()`, which implicitly sets `Cache-Control: public`.

The fix provided in this PR solves the problem by applying the same logic to the *main* response that is applied for *embedded* responses, namely that responses with `!Response::isCacheable()` will make the resulting response have `Cache-Control: private, no-cache, must-revalidate` and have `(s)max-age` removed.

This makes the change easy to understand, but makes responses uncacheable too often. This is because the `Response::isCacheable()` method was written to determine whether it is safe for a shared cache to keep the response, which is not the case as soon as a `private` response is involved. This might be improved upon in another PR.

Commits
-------

3d27b5946d Fix that ESI/SSI processing can turn a \"private\" response \"public\"
2018-04-16 19:47:59 +02:00
Matthias Pigulla
3d27b5946d Fix that ESI/SSI processing can turn a \"private\" response \"public\" 2018-04-16 19:47:52 +02:00
Fabien Potencier
a3af3d3ec2 bug #26932 [Form] Fixed trimming choice values (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed trimming choice values

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24247, #24712
| License       | MIT
| Doc PR        | symfony/symfony-docs#9598

Follows #24712 discussion.

Commits
-------

00cdf5e0a5 [Form] Fixed trimming choice values
2018-04-16 19:16:07 +02:00
HeahDude
00cdf5e0a5 [Form] Fixed trimming choice values 2018-04-15 21:28:23 +02:00
Robin Chalas
10674688da bug #26875 [Console] Don't go past exact matches when autocompleting (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Don't go past exact matches when autocompleting

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

Commits
-------

adba79a [Console] Don't go past exact matches when autocompleting
2018-04-10 11:58:27 +02:00
Nicolas Grekas
adba79a6b0 [Console] Don't go past exact matches when autocompleting 2018-04-09 15:41:45 -05:00
Nicolas Grekas
0f9c45e145 bug #26823 [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't existing class (Pascal Montoya, pmontoya)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't existing class

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

If @Assert\Valid is applied to a string value, the value is searched in metadata cache and some characters aren't allowed in this cache. This create an unexpected exception.

Class existence is now tested before cache read.

Commits
-------

5198f43 Disable autoloader call on interface_exists check
cd91420 [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
2018-04-09 13:33:44 -05:00
Pascal Montoya
5198f435a0
Disable autoloader call on interface_exists check 2018-04-09 10:32:24 +02:00
Pascal Montoya
cd914209bd
[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class 2018-04-09 10:32:24 +02:00
Christian Flothmann
16edba5d99 bug #26834 [Yaml] Throw parse error on unfinished inline map (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] Throw parse error on unfinished inline map

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

Throws a parse error instead of a PHP notice.

Commits
-------

4359936 [Yaml] Throw parse error on unfinished inline map
2018-04-08 09:51:31 +02:00
Fabien Potencier
e73aa2985b bumped Symfony version to 2.7.46 2018-04-06 16:50:48 +02:00
Fabien Potencier
42fb3a4371
Merge pull request #26835 from fabpot/release-2.7.45
released v2.7.45
2018-04-06 14:49:55 +02:00
Fabien Potencier
952879e147 updated VERSION for 2.7.45 2018-04-06 14:49:33 +02:00
Fabien Potencier
175e883e6c update CONTRIBUTORS for 2.7.45 2018-04-06 14:49:33 +02:00
Fabien Potencier
f331d964d9 updated CHANGELOG for 2.7.45 2018-04-06 14:49:17 +02:00
Nicolas Grekas
43599362a2 [Yaml] Throw parse error on unfinished inline map 2018-04-06 13:01:31 +02:00
Christophe Coevoet
c415e4c22a minor #26814 [EventDispatcher] Fix wrong listener in stopEventPropagation test (Peter Orosz)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #26814).

Discussion
----------

[EventDispatcher] Fix wrong listener in stopEventPropagation test

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

Commits
-------

24c460afa6 [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
2018-04-05 16:23:50 +02:00
Peter Orosz
24c460afa6 [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener 2018-04-05 16:23:45 +02:00
Fabien Potencier
a90cd13fa4 minor #26801 Update da translations (c960657)
This PR was merged into the 2.7 branch.

Discussion
----------

Update da translations

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

The Danish translations have several serious errors. This PR adjusts to official Danish orthography, and updates some texts for internal consistency and to better reflect the original English text.

Commits
-------

d0ea26bd15 Update da translations
2018-04-04 19:11:55 +02:00
Christian Schmidt
d0ea26bd15 Update da translations 2018-04-04 19:02:30 +02:00
Nicolas Grekas
07f8f81463 minor #26785 [Finder] fix tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Finder] fix tests

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

540ea11 [Finder] fix tests
2018-04-04 13:38:46 +02:00
Christian Flothmann
540ea112b5 [Finder] fix tests 2018-04-04 08:34:32 +02:00
Fabien Potencier
7c4676a03f bug #26763 [Finder] Remove duplicate slashes in filenames (helhum)
This PR was squashed before being merged into the 2.7 branch (closes #26763).

Discussion
----------

[Finder] Remove duplicate slashes in filenames

| Q             | A
| ------------- | ---
| Branch?       | 2.7 up to 4.0
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26757
| License       | MIT

This PR takes another approach to fix in excess slashes in Finder than #26337
which does a simple rtrim instead of the breaking realpath.

Commits
-------

cdde6d9353 [Finder] Remove duplicate slashes in filenames
2018-04-04 06:55:38 +02:00
Helmut Hummel
cdde6d9353 [Finder] Remove duplicate slashes in filenames 2018-04-04 06:55:31 +02:00
Fabien Potencier
eac5edeb39 bug #26749 Add PHPDbg support to HTTP components (hkdobrev)
This PR was squashed before being merged into the 2.7 branch (closes #26749).

Discussion
----------

Add PHPDbg support to HTTP components

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

This is a follow-up to https://github.com/symfony/symfony/pull/26677.

Turns out there aren't that many remaining instances of `PHP_SAPI` checks without considering `phpdbg` where it's needed.

Commits
-------

60dd79c835 Add PHPDbg support to HTTP components
2018-04-03 07:06:01 +02:00
Haralan Dobrev
60dd79c835 Add PHPDbg support to HTTP components 2018-04-03 07:05:54 +02:00
Fabien Potencier
d73f491ed5 bug #26609 [Console] Fix check of color support on Windows (mlocati)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix check of color support on Windows

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

If the stream is redirected, `StreamOutput::hasColorSupport()` returns `false` on POSIX systems.
On Windows, this is not always true. Before PHP 7.2 we can't say if the stream is redirected, but since PHP 7.2 we have the `stream_isatty` function that works on Windows too: let's use it.

Sure, `sapi_windows_vt100_support` should return `false` if the stream is redirected, but it's in `or` with the other conditions, so the logic was flawed.

Commits
-------

f7f81892a0 Fix check of color support on Windows
2018-04-02 14:10:57 +02:00
Fabien Potencier
3758a3b1b3 bumped Symfony version to 2.7.45 2018-04-02 13:31:07 +02:00
Fabien Potencier
dcc2650a94
Merge pull request #26741 from fabpot/release-2.7.44
released v2.7.44
2018-04-02 11:53:43 +02:00
Fabien Potencier
ef8a14154a updated VERSION for 2.7.44 2018-04-02 11:53:22 +02:00
Fabien Potencier
1f53736f83 update CONTRIBUTORS for 2.7.44 2018-04-02 11:53:22 +02:00
Fabien Potencier
910ec3a3b2 updated CHANGELOG for 2.7.44 2018-04-02 11:53:08 +02:00
Fabien Potencier
913c1fd011 bug #26727 [HttpCache] Unlink tmp file on error (Chansig)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpCache] Unlink tmp file on error

| Q             | A
| ------------- | ---
| Branch?       |  2.7 up to 4.0 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  |no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #22719   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

The tempnam function creates a unique temporary file for each call to a page to be cached, and if the temporary folder passed as an argument is not writable, tempnam will use /tmp.

_Note: If PHP cannot create a file in the specified dir parameter, it falls back on the system default. On NTFS this also happens if the specified dir contains more than 65534 files.
http://php.net/manual/en/function.tempnam.php_

Therefore, as soon as the HttpCache cache is no longer writable, the /tmp fills up fairly quickly, tempnam being called on every page (since no page cache) and creating a new unique file in /tmp.

See https://github.com/symfony/symfony/issues/22719

Commits
-------

c9a0355883 [HttpCache] Unlink tmp file on error
2018-04-01 10:29:22 +02:00
Chansig
c9a0355883 [HttpCache] Unlink tmp file on error 2018-03-31 09:59:49 +02:00
Fabien Potencier
509142e7c9 minor #26715 Added LB translation for #26327 (Errors sign for people that do not see colors) (mweimerskirch)
This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes #26715).

Discussion
----------

Added LB translation for #26327 (Errors sign for people that do not see colors)

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

Commits
-------

c1fae9ea4e Added LB translation for #26327 (Errors sign for people that do not see colors)
2018-03-31 07:18:15 +02:00