Commit Graph

45032 Commits

Author SHA1 Message Date
Fabien Potencier
5b531b6f76 feature #33579 Adding .gitattributes to remove Tests directory from "dist" (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

Adding .gitattributes to remove Tests directory from "dist"

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

This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.

Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.

### Reasons for keeping the tests with the source

* You can look at the tests to understand how the code works
* It is convenient

In the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.

### Reasons for removing them (merging this PR)

* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`
* Smaller packages when deploying with Docker or on Serverless.
* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))

## How to decide?

Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.

## Other PRs and issues related to this:

Add .gitattributes file (https://github.com/symfony/symfony/pull/29277)
Added .gitattributes files to root and all components (https://github.com/symfony/symfony/pull/26472)
Exclude non-essential files from Composer package (https://github.com/symfony/symfony/issues/25414)
[HttpFoundation] optimize files for distribution (https://github.com/symfony/symfony/pull/24427)
Add .gitattributes files (https://github.com/symfony/symfony/pull/23926)
[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (https://github.com/symfony/symfony/issues/20057)
Add lightweight and root only .gitattributes (https://github.com/symfony/symfony/pull/18004)
Add .gitattributes to exclude tests from ZIPs (https://github.com/symfony/symfony/pull/17995)
[RFC] Move tests out of the source and source out of the tests (https://github.com/symfony/symfony/issues/17749)
Removal of development & testing files using .gitattributes (https://github.com/symfony/symfony/issues/16174)
Please add .gitattributes files and fix line endings (https://github.com/symfony/symfony/issues/13521)
making use of .gitattributes (https://github.com/symfony/symfony/issues/11810)

## Workarounds

There are workarounds for both sides. Example:

### Workaround if merged

* `composer update --prefer-source`

### Workaround if closed

* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`
* https://github.com/editorconfig/editorconfig/issues/228
* https://github.com/dg/composer-cleaner

Commits
-------

ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
2019-09-16 10:15:34 +02:00
Nyholm
ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist" 2019-09-16 10:12:51 +02:00
Christian Flothmann
4c70de6c8f ensure compatibility with type resolver 0.5 2019-09-16 10:02:06 +02:00
Thomas Calvet
997ca70385 [WebProfilerBundle] Clean time.js 2019-09-16 10:00:25 +02:00
Christian Flothmann
b468776b44 fix tests 2019-09-16 08:43:17 +02:00
Fabien Potencier
7f81cb5308 bug #32970 [Messenger] Don't deep-merge senders configuration (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Don't deep-merge senders configuration

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

Commits
-------

20d19ac100 [Messenger] Don't deep merge routing.senders config option
2019-09-16 08:21:04 +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
Christian Flothmann
0354395ee9 Merge branch '4.4'
* 4.4:
  [Mailer] Fix SmtpEnvelope renaming to Envelope
  fixed "link" to Contracts packages
  [WebProfilerBundle] Fix time panel legend buttons
  Some styling tweaks
  Fixed cache pools affecting each other due to an overwritten seed variable
  don't change state in case of exception
  properly catch legacy tag syntax usages
  minor tweaks to the welcome page
2019-09-16 07:06:55 +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
e82fdbf97f bug #33582 [Mailer] Fix SmtpEnvelope renaming to Envelope (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Fix SmtpEnvelope renaming to Envelope

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

Commits
-------

5796c780ba [Mailer] Fix SmtpEnvelope renaming to Envelope
2019-09-15 10:47:53 +02:00
Fabien Potencier
428367f8cf Merge branch '4.3' into 4.4
* 4.3:
  fixed "link" to Contracts packages
  [WebProfilerBundle] Fix time panel legend buttons
  Fixed cache pools affecting each other due to an overwritten seed variable
  properly catch legacy tag syntax usages
2019-09-15 10:41:08 +02:00
Fabien Potencier
1a9c6338f3 bug #33575 [WebProfilerBundle] Fix time panel legend buttons (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[WebProfilerBundle] Fix time panel legend buttons

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/33536
| License       | MIT
| Doc PR        | -

It fixes the buttons multiple generations and the toggle behavior as well.

Commits
-------

7f4c8d3271 [WebProfilerBundle] Fix time panel legend buttons
2019-09-15 10:39:57 +02:00
Fabien Potencier
5796c780ba [Mailer] Fix SmtpEnvelope renaming to Envelope 2019-09-15 10:37:41 +02:00
Yonel Ceruto
f531ef57e0 minor #33576 [DX] Fix "link" to sub-contracts packages (yceruto)
This PR was merged into the 4.3 branch.

Discussion
----------

[DX] Fix "link" to sub-contracts packages

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

pending update after split in one package per sub-contracts https://github.com/symfony/symfony/pull/31571

Commits
-------

3470f5b fixed "link" to Contracts packages
2019-09-13 13:12:35 -04:00
Yonel Ceruto
3470f5bbf2 fixed "link" to Contracts packages 2019-09-13 12:50:50 -04:00
Thomas Calvet
7f4c8d3271 [WebProfilerBundle] Fix time panel legend buttons 2019-09-13 18:20:59 +02:00
Fabien Potencier
60e3de6334 bug #33510 Minor tweaks to the welcome page (yceruto, javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

Minor tweaks to the welcome page

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

/cc @fabpot

Commits
-------

acd50615e7 Some styling tweaks
ddffc972a8 minor tweaks to the welcome page
2019-09-13 16:44:53 +01:00
Javier Eguiluz
acd50615e7
Some styling tweaks 2019-09-13 17:40:37 +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
Fabien Potencier
5d94ace5ea bug #33568 [Validator] don't change state in case of exception (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] don't change state in case of exception

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

Commits
-------

dcd47335a8 don't change state in case of exception
2019-09-13 15:19:20 +01:00
Fabien Potencier
fbcb690318 Merge branch '4.4'
* 4.4:
  rename SmtpEnvelope to Envelope
2019-09-13 15:16:45 +01:00
Fabien Potencier
b07df9d205 feature #33562 [Mailer] rename SmtpEnvelope to Envelope (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] rename SmtpEnvelope to Envelope

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

Drop the Smtp prefix so that arbitrary transports do not have to depend
on SMTP specific concepts.

Commits
-------

5e2c6da349 rename SmtpEnvelope to Envelope
2019-09-13 15:15:15 +01:00
rtek
52650803bf [Console] Get dimensions from stty on windows if possible 2019-09-13 13:40:57 +01:00
Robin Chalas
20d19ac100 [Messenger] Don't deep merge routing.senders config option 2019-09-13 13:13:51 +01:00
Nicolas Grekas
4a866d066f bug #33570 Fixed cache pools affecting each other due to an overwritten seed variable (roed)
This PR was merged into the 4.3 branch.

Discussion
----------

Fixed cache pools affecting each other due to an overwritten seed variable

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33561
| License       | MIT

Due to the fact the adapter was added to the cache seed calculation for cache pools, multiple pool definitions could affect each other. The how and why is described in #33561. This PR resolves that issue by using a copy of the seed and mutating only that copy.

Commits
-------

29ba7a8cf1 Fixed cache pools affecting each other due to an overwritten seed variable
2019-09-13 14:10:35 +02:00
Ruud Arentsen
29ba7a8cf1 Fixed cache pools affecting each other due to an overwritten seed variable 2019-09-13 12:59:08 +02:00
Christian Flothmann
dcd47335a8 don't change state in case of exception 2019-09-13 12:19:20 +02:00
Maxime Helias
45b4edc2dc [Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee' 2019-09-13 12:10:01 +02:00
Christian Flothmann
c8119440c5 Merge branch '4.4'
* 4.4:
  [Mailer] Rename an exception class
  [Workflow] Use a better exception message when many workflow are found
  use debug.file_link_formatter service when possible
2019-09-13 11:01:25 +02:00
Robin Chalas
b60e0c1454 Fix lint commands frozen on empty stdin 2019-09-12 20:34:14 +01:00
Fabien Potencier
6e7182f9e3 feature #33565 [Mailer] Rename an exception class (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Rename an exception class

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

Commits
-------

2c58dcc34b [Mailer] Rename an exception class
2019-09-12 20:25:02 +01:00
Fabien Potencier
2c58dcc34b [Mailer] Rename an exception class 2019-09-12 19:43:44 +01:00
Christian Flothmann
5e2c6da349 rename SmtpEnvelope to Envelope
Drop the Smtp prefix so that arbitrary transports do not have to depend
on SMTP specific concepts.
2019-09-12 16:17:57 +02:00
Fabien Potencier
74d5fa62ce minor #33549 [Workflow] Use a better exception message when many workflows are found (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Workflow] Use a better exception message when many workflows are found

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | (asked by @OskarStark on slack)
| License       | MIT
| Doc PR        |

Commits
-------

1862cb3ec5 [Workflow] Use a better exception message when many workflow are found
2019-09-12 11:48:36 +02:00
Grégoire Pineau
1862cb3ec5 [Workflow] Use a better exception message when many workflow are found 2019-09-12 11:37:54 +02:00
Yonel Ceruto
4b701bb953 minor #33557 [FrameworkBundle][ErrorRenderer] Use FileLinkFormatter service when possible (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][ErrorRenderer] Use FileLinkFormatter service when possible

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

Consistent the way TwigBundle defines the `Symfony\Bridge\Twig\Extension\CodeExtension` service:
789448b65c/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml (L88)

Commits
-------

d4a6867 use debug.file_link_formatter service when possible
2019-09-11 15:08:12 -04:00
Yonel Ceruto
d4a68673be use debug.file_link_formatter service when possible 2019-09-11 12:31:57 -04:00
Fabien Potencier
3db419ef26 minor #33554 [DoctrineBridge] getMetadataDriverClass() is abstract now (xabbuh)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[DoctrineBridge] getMetadataDriverClass() is abstract now

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

Commits
-------

b89b71fb26 getMetadataDriverClass() is abstract now
2019-09-11 17:43:08 +02:00
Fabien Potencier
5914a1fdef bug #33517 [Yaml] properly catch legacy tag syntax usages (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Yaml] properly catch legacy tag syntax usages

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

Commits
-------

d5894a4ff9 properly catch legacy tag syntax usages
2019-09-11 17:41:19 +02:00
Christian Flothmann
b89b71fb26 getMetadataDriverClass() is abstract now 2019-09-11 16:07:29 +02:00
Christian Flothmann
d5894a4ff9 properly catch legacy tag syntax usages 2019-09-11 15:36:32 +02:00
Nicolas Grekas
ee94e8595c Merge branch '4.4'
* 4.4:
  Re-enable push support for HttpClient
  [DependencyInjection] Accept existing interfaces as valid named args
  Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property
  [Cache] Added reserved characters constant for CacheItem
  [DI] cascade preloading only to public parameters/properties
  Move Anonymous config to a SecurityFactory
2019-09-11 10:39:10 +02:00
Nicolas Grekas
789448b65c Merge branch '4.3' into 4.4
* 4.3:
  Re-enable push support for HttpClient
  [DependencyInjection] Accept existing interfaces as valid named args
  Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property
2019-09-11 10:38:59 +02:00
Nicolas Grekas
6ea7f30b89 bug #33546 [DependencyInjection] Accept existing interfaces as valid named args (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[DependencyInjection] Accept existing interfaces as valid named args

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/33531
| License       | MIT
| Doc PR        | -

Commits
-------

6612e9a939 [DependencyInjection] Accept existing interfaces as valid named args
2019-09-11 10:33:14 +02:00
Nicolas Grekas
22b4586c01 bug #33547 [HttpClient] Re-enable Server Push support (dunglas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Re-enable Server Push support

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| 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 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

 #33444 disabled Server Push support for the CURL implementation, but `HttpClient::create()` has been forgotten and override this parameter, consequently for most users Server Push wasn't disabled at all. The root issue affecting the tests are actually a misconfiguration of Akamai servers (we need our own test infrastructure).

According to my testing, Server Push support works very smoothly. Also, it can cause problems only if the server actually pushes responses (which is still rare).

So I propose to re-enable Push Support everywhere.

Commits
-------

8483842888 Re-enable push support for HttpClient
2019-09-11 10:32:37 +02:00
Kévin Dunglas
8483842888
Re-enable push support for HttpClient 2019-09-11 09:53:13 +02:00
Thomas Calvet
6612e9a939 [DependencyInjection] Accept existing interfaces as valid named args 2019-09-11 09:42:51 +02:00
Fabien Potencier
27383a5ca8 bug #33521 Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property (a-menshchikov)
This PR was squashed before being merged into the 4.3 branch (closes #33521).

Discussion
----------

Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property

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

Commits
-------

954dad44a1 Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property
2019-09-11 07:04:03 +02:00
Zmey
954dad44a1 Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property 2019-09-11 07:03:51 +02:00