Commit Graph

25656 Commits

Author SHA1 Message Date
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
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
mweimerskirch
c1fae9ea4e Added LB translation for #26327 (Errors sign for people that do not see colors) 2018-03-31 07:18:09 +02:00
Fabien Potencier
98ee8ab800 bug #26675 [HttpKernel] DumpDataCollector: do not flush when a dumper is provided (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] DumpDataCollector: do not flush when a dumper is provided

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- 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 | 3db14045d4/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php (L208-L209)   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This explains [the workaround I initially used](3db14045d4/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php (L208-L209)) in the server dumper PR original code.

I might be wrong on the intent, but as soon as a dumper is provided (e.g by setting  `debug.dump_destination: php://stderr`), I think there is no need to set the `DumpDataCollector::$isCollected` flag to `false` as we explicitly ask for the dump to be output directly somewhere. So ne need to output again on `__destruct`.

Spotted by running tests on the `symfony/demo` with the server dumper enabled: dumps were output twice. Once on the server, once at the end of the tests.

But this can be easily seen as well by using `debug.dump_destination: php://stderr` on `test` env:

```diff
diff --git a/src/Controller/BlogController.php b/src/Controller/BlogController.php
index e3e30aa..bf9744e 100644
--- a/src/Controller/BlogController.php
+++ b/src/Controller/BlogController.php
@@ -50,6 +50,7 @@ class BlogController extends AbstractController
      */
     public function index(int $page, string $_format, PostRepository $posts): Response
     {
+        dump(get_class($posts));
         $latestPosts = $posts->findLatest($page);

         // Every template name also has two extensions that specify the format and
```

### Before

```sh
vendor/bin/simple-phpunit --filter=BlogControllerTest::testIndex
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.

Testing Project Test Suite
BlogController.php on line 53:
"App\Repository\PostRepository"
.                                                                   1 / 1 (100%)

Time: 3.34 seconds, Memory: 44.25MB

OK (1 test, 1 assertion)
BlogController.php on line 53:
"App\Repository\PostRepository"
```

### After

```sh
vendor/bin/simple-phpunit --filter=BlogControllerTest::testIndex
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.

Testing Project Test Suite
BlogController.php on line 53:
"App\Repository\PostRepository"
.                                                                   1 / 1 (100%)

Time: 731 ms, Memory: 28.00MB

OK (1 test, 1 assertion)
```

Commits
-------

11a0392516 [HttpKernel] DumpDataCollector: do not flush when a dumper is provided
2018-03-30 09:47:09 +02:00
Fabien Potencier
4243db5c87 bug #26663 [TwigBridge] Fix rendering of currency by MoneyType (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #26663).

Discussion
----------

[TwigBridge] Fix rendering of currency by MoneyType

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

Split from #25167 as suggested by @nicolas-grekas to see if this can be reasonably fixed on 2.7, the right way using this itsy-bitsy new feature.

#25167 still contains some valuable changes regarding tests. Ill continue either one PR depending on the target branch / proposed fix.

Commits
-------

a3a2ff0c74 [TwigBridge] Fix rendering of currency by MoneyType
2018-03-29 15:55:16 +02:00
Roland Franssen
a3a2ff0c74 [TwigBridge] Fix rendering of currency by MoneyType 2018-03-29 15:55:10 +02:00
Fabien Potencier
ae80466e6e minor #26691 [Intl] Update ICU data to 61.1 (jakzal)
This PR was merged into the 2.7 branch.

Discussion
----------

[Intl] Update ICU data to 61.1

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (including the intl-data group)
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

ICU 61.1 [was released](http://site.icu-project.org/download/61):

*  CLDR 33 locale data

   * Two additional locales (Odia, Assamese) were brought up to Modern coverage level.
   * New currency code MRU for Mauritania.
   * Data additions & bug fixes.
   * more

*  small API additions, improvements, and bug fixes.

Commits
-------

f73d378f9c [Intl] Update ICU data to 61.1
2018-03-28 19:12:56 +02:00
Jakub Zalas
f73d378f9c
[Intl] Update ICU data to 61.1 2018-03-28 19:31:17 +11:00
Fabien Potencier
8bebc5325d minor #26683 [Validator] Add Japanese translation (issei-m)
This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes #26683).

Discussion
----------

[Validator] Add Japanese translation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

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

Commits
-------

360298df29 [Validator] Add Japanese translation
2018-03-27 13:45:11 +02:00
Issei.M
360298df29 [Validator] Add Japanese translation 2018-03-27 13:45:04 +02:00
Fabien Potencier
3faa1d505a bug #26677 Support phpdbg SAPI in Debug::enable() (hkdobrev)
This PR was squashed before being merged into the 2.7 branch (closes #26677).

Discussion
----------

Support phpdbg SAPI in Debug::enable()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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 |    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

PHPDBG is a CLI PHP debugger which could be useful for debugging in development or for running PHPUnit tests with code coverage faster compared to XDebug.

It has CLI characteristics, but it runs as a different SAPI.

Commits
-------

49a144f28c Support phpdbg SAPI in Debug::enable()
2018-03-27 09:04:23 +02:00
Haralan Dobrev
49a144f28c Support phpdbg SAPI in Debug::enable() 2018-03-27 09:04:21 +02:00
Maxime Steinhausser
11a0392516 [HttpKernel] DumpDataCollector: do not flush when a dumper is provided 2018-03-27 08:12:08 +02:00
Fabien Potencier
2349e977ff bug #26621 [Form] no type errors with invalid submitted data types (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] no type errors with invalid submitted data types

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

Commits
-------

4217cc1348 no type errors with invalid submitted data types
2018-03-22 08:23:40 +01:00
Fabien Potencier
a53205cb67 minor #26620 [Validator] sync validator translation id (IndraGunawan)
This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes #26620).

Discussion
----------

[Validator] sync validator translation id

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

sync validator translation id between en <-> id

Commits
-------

4e515e1f54 [Validator] sync validator translation id
2018-03-22 08:16:09 +01:00
Indra Gunawan
4e515e1f54 [Validator] sync validator translation id 2018-03-22 08:16:09 +01:00
Christian Flothmann
4217cc1348 no type errors with invalid submitted data types 2018-03-21 18:01:56 +01:00
Grégoire Pineau
60730666ab [FrameworkBundle] Partially revert HttpCache is not longer abstract (4d075da) 2018-03-21 10:56:17 +01:00
Fabien Potencier
25c2f91877 bug #26337 [Finder] Fixed leading/trailing / in filename (lyrixx)
This PR was merged into the 2.7 branch.

Discussion
----------

[Finder] Fixed leading/trailing / in filename

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

---

Without this patch, we go this:

```
--- Expected
+++ Actual
@@ @@
 Array (
-    0 => '/tmp/symfony_finder/foo bar'
-    1 => '/tmp/symfony_finder/foo/bar.tmp'
-    2 => '/tmp/symfony_finder/test.php'
-    3 => '/tmp/symfony_finder/test.py'
+    0 => '///tmp/symfony_finder///foo bar'
+    1 => '///tmp/symfony_finder///foo/bar.tmp'
+    2 => '///tmp/symfony_finder///test.php'
+    3 => '///tmp/symfony_finder///test.py'
 )
```

Commits
-------

e17a63457a [Finder] Fixed leading/trailing / in filename
2018-03-20 17:58:38 +01:00
Michele Locati
f7f81892a0
Fix check of color support on Windows
If the stream is redirected, the script should behave the same on Windows
and on POSIX systems.
2018-03-20 15:50:33 +01:00