Commit Graph

37621 Commits

Author SHA1 Message Date
Nicolas Grekas 6723e60540 minor #33656 [travis] honor .gitattributes when building local packages (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[travis] honor .gitattributes when building local packages

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

d7fbb0a4a4 [travis] honor .gitattributes when building local packages
2019-09-21 10:01:14 +02:00
Nicolas Grekas d7fbb0a4a4 [travis] honor .gitattributes when building local packages 2019-09-21 09:26:15 +02:00
Nicolas Grekas 276f190d22 fix typo 2019-09-20 23:40:23 +02:00
Nicolas Grekas f158d4f0fa minor #33654 [travis] install from dist except for selected components (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[travis] install from dist except for selected components

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

1de84836cf [travis] install from dist except for selected components
2019-09-20 23:34:18 +02:00
Nicolas Grekas 1de84836cf [travis] install from dist except for selected components 2019-09-20 23:28:55 +02:00
Nicolas Grekas 1818445dbc minor #33644 [Validator] fix tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] fix tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

04f79c5536 fix tests
2019-09-20 09:50:32 +02:00
Christian Flothmann 04f79c5536 fix tests 2019-09-20 09:04:12 +02:00
Nicolas Grekas 20ab3b75fd [Process] fix typo in tests 2019-09-19 19:10:56 +02:00
Nicolas Grekas 76d4ef83e9 [PhpUnitBridge] bump cache id 2019-09-19 18:13:23 +02:00
Nicolas Grekas 1ab8fff4f2 minor #33567 Re-enable previously failing PHP 7.4 test cases (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Re-enable previously failing PHP 7.4 test cases

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #32995
| License       | MIT
| Doc PR        | -

The remaining PHP 7.4 issue has been fixed by Nikita in https://github.com/php/php-src/pull/4697
This should be green once Travis updates their php7.4snapshot

Commits
-------

9e4e191535 Re-enable previously failing PHP 7.4 test cases
2019-09-19 17:34:53 +02:00
Nicolas Grekas 9e4e191535 Re-enable previously failing PHP 7.4 test cases 2019-09-19 17:32:51 +02:00
Nicolas Grekas 6bf2dd9ee8 minor #33637 install from source to include components tests (xabbuh)
This PR was squashed before being merged into the 3.4 branch (closes #33637).

Discussion
----------

install from source to include components tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

5aa4328b08 Revert "bug #33618 fix tests depending on other components' tests (xabbuh)"
c792908217 install from source to include components tests
2019-09-19 10:05:35 +02:00
Christian Flothmann 5aa4328b08 Revert "bug #33618 fix tests depending on other components' tests (xabbuh)"
This reverts commit 47fb0900fb, reversing
changes made to 6fad4f1215.
2019-09-19 09:17:54 +02:00
Christian Flothmann c792908217 install from source to include components tests 2019-09-19 09:02:46 +02:00
Fabien Potencier 47fb0900fb bug #33618 fix tests depending on other components' tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

fix tests depending on other components' tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

cd2f3a6056 fix tests depending on other components' tests
2019-09-18 16:58:24 +02:00
Fabien Potencier 6fad4f1215 bug #33626 [PropertyInfo] ensure compatibility with type resolver 0.5 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo] ensure compatibility with type resolver 0.5

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

same as #33588 but for the `3.4` branch

Commits
-------

2d708b3e60 ensure compatibility with type resolver 0.5
2019-09-18 16:55:47 +02:00
Christian Flothmann 2d708b3e60 ensure compatibility with type resolver 0.5 2019-09-18 15:36:31 +02:00
Nicolas Grekas ac7b2b4611 minor #33550 [HttpFoundation] Call AssertEquals with proper parameters (mmokhi)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes #33550).

Discussion
----------

[HttpFoundation] Call AssertEquals with proper parameters

Since `$response->getContent()` returns string and our first parameter is already string as well, in some cases (with different precisions) it may "compare strings" as "strings" and this is not what the test wants.
By changing the first parameter to actual number we force `AssertEquals` to compare them numerically rather than literally by string content.

| Q             | A
| ------------- | ---
| Branch?       | 3.4, 4.3, master <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This is yet another catch of this type: https://github.com/symfony/symfony/pull/31612

Commits
-------

6a8ab6cb73 Call AssertEquals with proper parameters
2019-09-18 13:43:50 +02:00
mmokhi 6a8ab6cb73 Call AssertEquals with proper parameters
Since `$response->getContent()` returns string and our first parameter is already string as well, in some cases (with different precisions) it may "compare strings" as "strings" and this is not what the test wants.
By changing the first parameter to actual number we force `AssertEquals` to compare them numerically rather than literally by string content.
2019-09-18 13:43:43 +02:00
Fabien Potencier 212f66827b bug #33620 [Twig] Fix Twig config extra keys (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Twig] Fix Twig config extra keys

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

Instead of `unsetting` keys, I know pass explicitly which key we need (right now, as we don't unset everything, there are a bunch of info passed to Environment that should not be there).

Commits
-------

e2043ff53e [Twig] Fix Twig config extra keys
2019-09-18 10:30:21 +02:00
Fabien Potencier e2043ff53e [Twig] Fix Twig config extra keys 2019-09-18 10:28:50 +02:00
Christian Flothmann cd2f3a6056 fix tests depending on other components' tests 2019-09-17 17:53:02 +02:00
Fabien Potencier d9ce895cee minor #33612 [Twig] Remove dead code (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Twig] Remove dead code

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

As the min version of Twig is 1.41, we can remove some dead code.

Commits
-------

786d136b5e [Twig] Remove dead code
2019-09-17 13:08:49 +02:00
Fabien Potencier 786d136b5e [Twig] Remove dead code 2019-09-17 12:59:55 +02:00
Fabien Potencier abceda088d minor #33610 Add gitignore file for Symfony 3.4 (ValentineBoineau)
This PR was squashed before being merged into the 3.4 branch (closes #33610).

Discussion
----------

Add gitignore file for Symfony 3.4

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

16a422b8be Add gitignore file for Symfony 3.4
2019-09-17 11:53:00 +02:00
Valentine Boineau 16a422b8be Add gitignore file for Symfony 3.4 2019-09-17 11:52:54 +02:00
Fabien Potencier 1b62123618 minor #33608 [Inflector] Add .gitignore file (ValentineBoineau)
This PR was merged into the 3.4 branch.

Discussion
----------

[Inflector] Add .gitignore file

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

fdd7ef593e [Inflector] Add .gitignore file
2019-09-17 11:20:03 +02:00
Valentine Boineau fdd7ef593e [Inflector] Add .gitignore file 2019-09-17 10:36:34 +02:00
Fabien Potencier 8535416d25 minor #33585 [Security] Removed unused argument in Test (sstok)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Removed unused argument in Test

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | n/a

After #32998 there was a minor left over, the `testHandleAuthenticationClearsToken` `$tokenClass` argument is no longer used and can be safely removed.

Commits
-------

7c7422f384 [Security] Removed unused argument in Test
2019-09-16 07:42:33 +02:00
Sebastiaan Stok 7c7422f384
[Security] Removed unused argument in Test
After #32998 there was a minor left over, the `testHandleAuthenticationClearsToken`
`$tokenClass` argument is no longer used and can be safely removed.
2019-09-15 19:41:45 +02:00
Fabien Potencier cac27b2abc bug #33571 [Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee' (maxhelias)
This PR was merged into the 3.4 branch.

Discussion
----------

[Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee'

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch 4.4.
 - Legacy code removals go to the master branch.
-->
I don't know if this is considered a bug or a new feature ? Tell me if I need to change target branch

This PR improves the singularization of words such as "trees", "employees" or "fees"

Commits
-------

45b4edc2dc [Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee'
2019-09-13 15:35:37 +01:00
Fabien Potencier d6855d4cb4 bug #32763 [Console] Get dimensions from stty on windows if possible (rtek)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Get dimensions from stty on windows if possible

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

`Console\Terminal` is modified to extract width/height settings to from `stty` on windows if possible. Previously such values were extracted from `mode CON`. If another terminal is in use (eg, gitbash) then the incorrect values would be applied.

Commits
-------

52650803bf [Console] Get dimensions from stty on windows if possible
2019-09-13 15:28:51 +01:00
rtek 52650803bf [Console] Get dimensions from stty on windows if possible 2019-09-13 13:40:57 +01:00
Maxime Helias 45b4edc2dc [Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee' 2019-09-13 12:10:01 +02:00
Nicolas Grekas ac7df04fd6 minor #33537 Update GitHub PR template (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Update GitHub PR template

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

0d034817b0 Update GitHub PR template
2019-09-10 18:34:27 +02:00
Nicolas Grekas 0d034817b0 Update GitHub PR template 2019-09-10 18:21:23 +02:00
Fabien Potencier f7130e332f bug #33518 [Yaml] don't dump a scalar tag value on its own line (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] don't dump a scalar tag value on its own line

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

This commit fine tunes the bugfix made in #33377 with the feedback provided in https://github.com/symfony/symfony/issues/33464#issuecomment-528290985.

Commits
-------

a549069a49 don't dump a scalar tag value on its own line
2019-09-10 13:35:27 +02:00
Fabien Potencier f436cc80f1 minor #33530 Remove Google references when not needed (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove Google references when not needed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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

No need to promote Google.

Commits
-------

9665d7633d Remove Google references when not needed
2019-09-10 13:21:38 +02:00
Christian Flothmann a549069a49 don't dump a scalar tag value on its own line 2019-09-10 12:38:46 +02:00
Fabien Potencier 9665d7633d Remove Google references when not needed 2019-09-10 12:13:59 +02:00
Fabien Potencier 6f332ce0e0 minor #33504 SCA: minor code tweaks (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #33504).

Discussion
----------

SCA: minor code tweaks

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

Minor code tweaks: disabled sorting in glob (the order is not important there), used implode() negative index support in order to drop an array_pop() call.

Commits
-------

32ea449679 SCA: minor code tweaks
2019-09-08 19:26:35 +02:00
Vladimir Reznichenko 32ea449679 SCA: minor code tweaks 2019-09-08 19:26:24 +02:00
Fabien Potencier 47a87849c0 bug #32818 [HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler (Arman-Hosseini)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler

| Q             | A
| ------------- | ---
| Branch?       | >= 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32444   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

I had this problem and I noticed that an issue had already been registered.
So I registered the pull request.

Commits
-------

9ed5f03b98 Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
2019-09-08 09:16:45 +02:00
Fabien Potencier 206ad498c1 bug #33487 [HttpKernel] Fix Apache mod_expires Session Cache-Control issue (pbowyer)
This PR was squashed before being merged into the 3.4 branch (closes #33487).

Discussion
----------

[HttpKernel] Fix Apache mod_expires Session Cache-Control issue

| Q             | A
| ------------- | ---
| Branch?       | 3.4 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| License       | MIT

Apaches's [mod_expires](https://httpd.apache.org/docs/current/mod/mod_expires.html) is a widely used module to set HTTP caching headers. It allows you to set a default cache lifetime as well as lifetimes by mime_type.

When an application server has set a `Cache-Control` header, mod_expires ignores this and sets its own, resulting in duplicate `Cache-Control` headers and conflicting information. It does this _unless_ the application server sets an `Expires` header, in which case mod_expires does nothing. This is documented on the link above:

> When the `Expires` header is already part of the response generated by the server, for example when generated by a CGI script or proxied from an origin server, this module does not change or add an `Expires` or `Cache-Control` header.

Symfony automatically sets a `Cache-Control` header if a session exists. This patch adds an `Expires` header to ensure it's respected by mod_expires.

## Example 1
With the following Apache config:
```apache
<IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"
</IfModule>
```
The HTTP response headers are:
### Without the patch
```
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 08:02:02 GMT
Server: Apache/2.4.37 (Ubuntu)
Cache-Control: max-age=0, must-revalidate, private
Cache-Control: max-age=2592000
Expires: Sun, 06 Oct 2019 08:02:00 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 13099
Connection: close
Content-Type: text/html; charset=UTF-8
```
### With the patch
```
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 08:21:34 GMT
Server: Apache/2.4.37 (Ubuntu)
Cache-Control: max-age=0, must-revalidate, private
Expires: Fri, 06 Sep 2019 08:21:34 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 13098
Connection: close
Content-Type: text/html; charset=UTF-8
```

## Example 2
With the following Apache config:
```apache
<IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"
    ExpiresByType text/html                             "access plus 0 seconds"
</IfModule>
```
### Without the patch
```
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 08:18:40 GMT
Server: Apache/2.4.37 (Ubuntu)
Cache-Control: max-age=0, must-revalidate, private
Cache-Control: max-age=0
Expires: Fri, 06 Sep 2019 08:18:39 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 13099
Connection: close
Content-Type: text/html; charset=UTF-8
```
### With the patch
```
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 08:20:40 GMT
Server: Apache/2.4.37 (Ubuntu)
Cache-Control: max-age=0, must-revalidate, private
Expires: Fri, 06 Sep 2019 08:20:40 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 13100
Connection: close
Content-Type: text/html; charset=UTF-8
```

Commits
-------

9e942768c9 [HttpKernel] Fix Apache mod_expires Session Cache-Control issue
2019-09-08 08:51:05 +02:00
Peter Bowyer 9e942768c9 [HttpKernel] Fix Apache mod_expires Session Cache-Control issue 2019-09-08 08:50:59 +02:00
Nicolas Grekas fbeef96d66 cs fix 2019-09-06 16:49:07 +02:00
Fabien Potencier 33c02aedec minor #33434 [Validator] Add ConstraintValidator::formatValue() tests (fancyweb)
This PR was squashed before being merged into the 3.4 branch (closes #33434).

Discussion
----------

[Validator] Add ConstraintValidator::formatValue() tests

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

So https://github.com/symfony/symfony/pull/33401 tests can be built on top of this.

Commits
-------

b688aa31ec [Validator] Add ConstraintValidator::formatValue() tests
2019-09-03 18:24:41 +02:00
Thomas Calvet b688aa31ec [Validator] Add ConstraintValidator::formatValue() tests 2019-09-03 18:24:34 +02:00
Fabien Potencier 38514cb0f4 bug #33439 [Validator] Sync string to date behavior and throw a better exception (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Sync string to date behavior and throw a better exception

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

`\DateTimeImmutable` are not compared with `\DateTimeImmutable` in the `RangeValidator` class (contrary to the behavior in the `AbstractComparisonValidator` class).
Also, let's throw a dedicated exception when the provided string value cannot be parsed to a `\DateTime` or `\DateTimeImmutable`. It's better than the default exception IMO.

Commits
-------

28d7d9444f [Validator] Sync string to date behavior and throw a better exception
2019-09-03 18:13:28 +02:00
Thomas Calvet 28d7d9444f [Validator] Sync string to date behavior and throw a better exception 2019-09-03 11:01:58 +02:00