Commit Graph

29503 Commits

Author SHA1 Message Date
Fabien Potencier
65260bc346 minor #22066 fix some risky tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fix some risky tests

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

PHPUnit 6 marks tests as risky when they have no assertions (and are not marked as skipped or incomplete). This PR will update our test suite accordingly.

Component that still need to be covered:

- [ ] Config
- [ ] Form
- [ ] HttpFoundation
- [ ] Security
- [ ] Workflow

Commits
-------

abf1787dcc fix some risky tests
2017-03-21 14:36:30 -07:00
Romain Pierre
b3f341fd90 Fixes a typo in the form collector styles 2017-03-21 14:21:32 -07:00
Fabien Potencier
8ba279bc22 minor #22015 [Security] Added option to return true in the method isRememberMeRequested (WhiteEagle88)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Added option to return true in the method isRememberMeRequested

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

Replaces #21989

Commits
-------

522ec3ef0c [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 07:31:45 -07:00
Fabien Potencier
74a1cc34eb bug #22090 [WebProfilerBundle] Fix Content-Security-Policy compatibility in case of a style-src 'self' policy (romainneutron)
This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle] Fix Content-Security-Policy compatibility in case of a `style-src 'self'` policy

| Q             | A
| ------------- | ---
| Branch?       | 3.2 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22053 #20963
| License       | MIT

This fixes the compatibility of the bundle in case of a `style-src 'self'` policy.
This PR must be rebased once #22089 is merged

Commits
-------

4acec8973f [WebProfilerBundle] Fix content-security-policy compatibility
2017-03-21 07:14:48 -07:00
Romain Neutron
4acec8973f
[WebProfilerBundle] Fix content-security-policy compatibility
This fixes the compatibility of the bundle in case of a `style-src 'self'` policy.
2017-03-21 11:36:15 +01:00
Nicolas Grekas
48e90e3124 Merge branch '2.8' into 3.2
* 2.8:
  [WebProfilerBundle] Drop dead code
2017-03-21 11:32:01 +01:00
Nicolas Grekas
3d8959f4b4 minor #22089 [2.8][WebProfilerBundle] Drop dead code (romainneutron)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8][WebProfilerBundle] Drop dead code

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

As you can read in https://github.com/symfony/symfony/blob/2.8/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php#L40-L46 the `position` can only be `top` or `bottom`. I don't see any reference anywhere to a `normal` position.
The removed tests are always true.

Commits
-------

2de494f [WebProfilerBundle] Drop dead code
2017-03-21 11:29:56 +01:00
Romain Neutron
2de494f60b
[WebProfilerBundle] Drop dead code 2017-03-21 11:01:33 +01:00
Fabien Potencier
35e66ae0a9 bug #22079 [HttpKernel] Fixed bug with purging of HTTPS URLs (ausi)
This PR was squashed before being merged into the 2.7 branch (closes #22079).

Discussion
----------

[HttpKernel] Fixed bug with purging of HTTPS URLs

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

I found two bugs in `HttpCache\Store::purge()` with HTTPS URLs:

1. `->purge('https://example.com/')` only purges the `http` version not the `https` one.
2. If a cache entry exists for both `http` and `https`, only the `http` version gets purged, the `https` version stays in the cache.

I think this issues were introduced with #21582.

This pull request fixes both issues and adds tests for them.

Commits
-------

f50915066f [HttpKernel] Fixed bug with purging of HTTPS URLs
2017-03-20 17:24:39 -07:00
Martin Auswöger
f50915066f [HttpKernel] Fixed bug with purging of HTTPS URLs 2017-03-20 17:24:37 -07:00
Christian Flothmann
abf1787dcc fix some risky tests 2017-03-20 16:03:41 +01:00
Fabien Potencier
2ba564d984 minor #22012 [DI] [YamlFileLoader] change error message of a non existing file (jordscream)
This PR was squashed before being merged into the 2.7 branch (closes #22012).

Discussion
----------

[DI] [YamlFileLoader] change error message of a non existing file

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

This PR replaces the error message when non existing Yaml file is loaded. It gives more sense for the user.

Commits
-------

1c2ea97585 [DI] [YamlFileLoader] change error message of a non existing file
2017-03-20 07:02:55 -07:00
Jordan Samouh
1c2ea97585 [DI] [YamlFileLoader] change error message of a non existing file 2017-03-20 07:02:54 -07:00
Fabien Potencier
ece42c50f8 bug #22045 [WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly (romainneutron)
This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly

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

This header should have been handled from the beginning.
Content-Security-Policy recommendation specify this header, it needs to be correctly handled

Commits
-------

b0ba698111 [WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly
2017-03-20 06:59:21 -07:00
Nicolas Grekas
ab08fd69b4 Merge branch '2.8' into 3.2
* 2.8:
  [Yaml] CS
2017-03-20 10:45:15 +01:00
Nicolas Grekas
c80a0ae90f Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] CS
2017-03-20 10:41:44 +01:00
Nicolas Grekas
3185dc9c8f [Yaml] CS 2017-03-20 10:41:03 +01:00
Nicolas Grekas
d7e74b964f Merge branch '2.8' into 3.2
* 2.8:
  [DI] Fix PhpDumper generated doc block
  #20411 fix Yaml parsing for very long quoted strings
  [Doctrine Bridge] fix priority for doctrine event listeners
  Use PHP functions as array_map callbacks when possible
  [Validator] revert wrong Phpdoc change
  Use proper line endings
2017-03-20 10:32:19 +01:00
Nicolas Grekas
5dd83adb1b minor #22065 [DI] Fix PhpDumper generated doc block (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Fix PhpDumper generated doc block

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

Commits
-------

58b3ee7 [DI] Fix PhpDumper generated doc block
2017-03-20 09:47:13 +01:00
Nicolas Grekas
5d06acadd3 Merge branch '2.7' into 2.8
* 2.7:
  #20411 fix Yaml parsing for very long quoted strings
  [Doctrine Bridge] fix priority for doctrine event listeners
  Use PHP functions as array_map callbacks when possible
  [Validator] revert wrong Phpdoc change
  Use proper line endings
2017-03-20 09:46:40 +01:00
Nicolas Grekas
58b3ee7616 [DI] Fix PhpDumper generated doc block 2017-03-20 09:19:13 +01:00
Christian Flothmann
923bbdbf9f [Security] simplify the SwitchUserListenerTest 2017-03-17 23:55:35 +01:00
Romain Neutron
b0ba698111
[WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly 2017-03-17 17:52:43 +01:00
Fabien Potencier
ab1d9383b9 bug #21523 #20411 fix Yaml parsing for very long quoted strings (RichardBradley)
This PR was squashed before being merged into the 2.7 branch (closes #21523).

Discussion
----------

#20411 fix Yaml parsing for very long quoted strings

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

This is a second fix for the issue discussed in #20411. My first PR (#21279) didn't fix the bug in all cases, sorry.

If a YAML string has too many spaces in the value, it can trigger a `PREG_BACKTRACK_LIMIT_ERROR` error in the Yaml parser.

There should be no behavioural change other than the bug fix

I have included a test which fails before this fix and passes after this fix.

I have also added checks that detect other PCRE internal errors and throw a more descriptive exception. Before this patch, the YAML engine would often give incorrect results, rather than throwing, on a PCRE `PREG_BACKTRACK_LIMIT_ERROR` error.

Commits
-------

c9a1c09182 #20411 fix Yaml parsing for very long quoted strings
2017-03-17 09:20:26 -07:00
Richard Bradley
c9a1c09182 #20411 fix Yaml parsing for very long quoted strings 2017-03-17 09:20:23 -07:00
Fabien Potencier
ac109f154b bug #22001 [Doctrine Bridge] fix priority for doctrine event listeners (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[Doctrine Bridge] fix priority for doctrine event listeners

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

This fixes handling the priorities for doctrine event listeners. As found out by @chapterjason in https://github.com/symfony/symfony/issues/21977 the priority was incorrectly handled as soon as a listener had more than one tag (so listening to multiple events).

With this changes all tagged listeners are globally sorted by priority (using the same stable sort approach as in the later available `PriorityTaggedServiceTrait`) and then added one by one to the event manager.

I also updated the tests a bit as it was not covering all cases.

We also have to extend the docs for it I think as it does not mention the `priority` and `lazy` option at all? http://symfony.com/doc/current/doctrine/event_listeners_subscribers.html

Commits
-------

9d9d4efb88 [Doctrine Bridge] fix priority for doctrine event listeners
2017-03-17 09:17:57 -07:00
Grégoire Pineau
d50885cc16 bug #22040 [FrameworkBundle] improve message when workflows are missing (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] improve message when workflows are missing

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

Commits
-------

46c12c9d1d improve message when workflows are missing
2017-03-17 16:59:28 +01:00
Grégoire Pineau
fb5e6cec57 minor #22042 [Workflow] add Phpdoc for better IDE support (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] add Phpdoc for better IDE support

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

Allow IDEs to provide more precise auto-completion support.

Commits
-------

916a97c834 [Workflow] add Phpdoc for better IDE support
2017-03-17 16:57:43 +01:00
Christian Flothmann
916a97c834 [Workflow] add Phpdoc for better IDE support
Allow IDEs to provide more precise auto-completion support.
2017-03-17 16:32:08 +01:00
Fabien Potencier
813a7e9ef3 minor #22041 [FrameworkBundle] fix package name in conflict rule (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] fix package name in conflict rule

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

Commits
-------

71e93dddf2 fix package name in conflict rule
2017-03-17 07:56:05 -07:00
Nicolas Grekas
ce55ce7d97 minor #22037 [Cache] cache/integration-tests is now compatible with phpunit namespaces (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] cache/integration-tests is now compatible with phpunit namespaces

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

2e2d018 [Cache] cache/integration-tests is now compatible with phpunit namespaces
2017-03-17 15:49:01 +01:00
Christian Flothmann
71e93dddf2 fix package name in conflict rule 2017-03-17 15:28:59 +01:00
Christian Flothmann
46c12c9d1d improve message when workflows are missing 2017-03-17 15:26:20 +01:00
Nicolas Grekas
2e2d018dd8 [Cache] cache/integration-tests is now compatible with phpunit namespaces 2017-03-17 14:59:28 +01:00
Nicolas Grekas
3fe34be1ed bug #22032 [FrameworkBundle] Fix translation dep constraint (chalasr)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Fix translation dep constraint

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

The framework Translator makes use of the Translator component domain exceptions which exist since 3.2 only, leading to a fatal error when one of these exceptions is thrown in the framework using `symfony/translations:<3.2`. Bug introduced in https://github.com/symfony/symfony/pull/20012

Commits
-------

e1caf7d [FrameworkBundle] Fix translation dep constraint
2017-03-17 13:00:40 +01:00
Nicolas Grekas
6315c1d5aa bug #21996 [Cache] Enhance error reporting for FilesystemAdapter (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Enhance error reporting for FilesystemAdapter

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

So that we can provide feedback for cases like #21995

Commits
-------

ebb316d [Cache] Enhance error reporting for FilesystemAdapter
2017-03-17 12:53:30 +01:00
Robin Chalas
e1caf7da7f [FrameworkBundle] Fix translation dep constraint 2017-03-17 11:28:35 +01:00
Robin Chalas
5af47c40dc Revert "bug #21841 [Console] Do not squash input changes made from console.command event (chalasr)"
This reverts commit b8b6774634, reversing
changes made to 82790559de.
2017-03-16 17:10:10 +01:00
Grégoire Pineau
067ce70b34 minor #22020 [Workflow] Added more tests (lyrixx)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Added more tests

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

---

It's not the first time that people try to fix the workflow because they don't understand how it works. Basically, it's because the default configuration is using the "workflow" and not the "state_machine" type. It was a mistake but it's too late because it will be BC break. May be we could solve that by triggering a deprecation if the type is not explicit. But nobody will see it because it will be triggered during the compilation. It could also be fixed with more documentation.

Anyway, I want to add more tests to cover that with a little comment in the test suite. Right now, only one tests failed. With this PR more tests are failing.

Commits
-------

e47cfe903e [Workflow] Added more tests
2017-03-16 11:26:54 +01:00
Grégoire Pineau
e47cfe903e [Workflow] Added more tests 2017-03-16 10:59:44 +01:00
Dmytro Boiko
522ec3ef0c [Security] Added option to return true in the method isRememberMeRequested 2017-03-16 00:06:02 +02:00
Nicolas Grekas
ebb316d616 [Cache] Enhance error reporting for FilesystemAdapter 2017-03-14 22:48:08 +01:00
David Maicher
9d9d4efb88 [Doctrine Bridge] fix priority for doctrine event listeners 2017-03-14 21:52:39 +01:00
Fabien Potencier
dd8e50baa1 minor #21994 Use PHP functions as array_map callbacks when possible (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Use PHP functions as array_map callbacks when possible

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

We already do that in 99% of the cases ... but there were 3 occurrences where we didn't do it.

Commits
-------

405bd4cc81 Use PHP functions as array_map callbacks when possible
2017-03-14 12:43:03 -07:00
Fabien Potencier
26198cf60a bug #21981 [Console] Use proper line endings in BufferedOutput (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Use proper line endings in BufferedOutput

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

`BufferOutput` should be consistent with `StreamOutput` when writing newlines.

I faced an issue using this class in tests where the expected output was platform dependent (using `PHP_EOL` too).

Commits
-------

33946e69c0 Use proper line endings
2017-03-14 11:38:54 -07:00
Javier Eguiluz
405bd4cc81 Use PHP functions as array_map callbacks when possible 2017-03-14 12:32:10 +01:00
Nicolas Grekas
71b2c3a52e minor #21993 [Validator] revert wrong Phpdoc change (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] revert wrong Phpdoc change

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

Commits
-------

86e8afa [Validator] revert wrong Phpdoc change
2017-03-14 09:43:35 +01:00
Christian Flothmann
86e8afaea0 [Validator] revert wrong Phpdoc change 2017-03-14 09:04:19 +01:00
Nicolas Grekas
efa74c5eab Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:56:22 +01:00
Nicolas Grekas
6b4cfd6a25 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:55:42 +01:00