Commit Graph

24617 Commits

Author SHA1 Message Date
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
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
Nicolas Grekas
3185dc9c8f [Yaml] CS 2017-03-20 10:41:03 +01:00
Christian Flothmann
923bbdbf9f [Security] simplify the SwitchUserListenerTest 2017-03-17 23:55:35 +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
Dmytro Boiko
522ec3ef0c [Security] Added option to return true in the method isRememberMeRequested 2017-03-16 00:06:02 +02: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
ac89b1c548 minor #21972 [FrameworkBundle] Fix cleaning of test dirs (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix cleaning of test dirs

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

I spent an hour or two today debugging a non existent issue that was related to a non removed temporary file.
Let's cleanup properly now in the base WebTestCase.

Commits
-------

4842c86 [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:31:41 +01:00
Nicolas Grekas
4842c86324 [FrameworkBundle] Fix cleaning of test dirs 2017-03-13 22:39:55 +01:00
Julien Falque
33946e69c0
Use proper line endings 2017-03-13 08:27:40 +01:00
Nicolas Grekas
6831b984e1 [VarDumper] ExceptionCaster robustness fix 2017-03-12 17:00:52 +01:00
Fabien Potencier
641092fa16 bug #21957 [Form] Choice type int values (BC Fix) (mcfedr)
This PR was squashed before being merged into the 2.7 branch (closes #21957).

Discussion
----------

[Form] Choice type int values (BC Fix)

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

#21267 unnecessarily forced all choice values to be strings, this was a BC braking change.

Everything can work fine if they are strings or ints. specifically the issue was because `array_flip` is used on the `choices` array, but this function will work fine with ints as well as strings.

Normally, when using HTML forms all data comes as strings, but the `symfony/form` component has use cases beyond this, specifically, I use it with JSON data, where valid values for a `ChoiceType` might not be strings.

Commits
-------

ed211e9c74 [Form] Choice type int values (BC Fix)
2017-03-10 11:10:40 -08:00
Fred Cox
ed211e9c74 [Form] Choice type int values (BC Fix) 2017-03-10 11:10:39 -08:00
Fabien Potencier
a0945fc182 bug #21923 [travis] Test with hhvm 3.18 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] Test with hhvm 3.18

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

Needs #21922 on master to be green also.
Works around  facebook/hhvm#7722.

Commits
-------

7f1f0cb630 [travis] Test with hhvm 3.18
2017-03-08 11:42:39 -08:00
Nicolas Grekas
68f810919c minor #21920 Rename StackOverflow to Stack Overflow (lex111)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #21920).

Discussion
----------

Rename StackOverflow to Stack Overflow

| 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

Renamed StackOverflow to Stack Overflow in README.md.

Commits
-------

e3ac705 Rename StackOverflow to Stack Overflow
2017-03-08 11:34:04 +01:00
Alexey Pyltsyn
e3ac705b69 Rename StackOverflow to Stack Overflow 2017-03-08 11:34:04 +01:00
Nicolas Grekas
7f1f0cb630 [travis] Test with hhvm 3.18 2017-03-08 10:42:29 +01:00
Nicolas Grekas
bdebb713c4 minor #21915 [travis] Disable HHVM JIT - makes tests twice as fast (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] Disable HHVM JIT - makes tests twice as fast

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

Commits
-------

0691639 [travis] Disable HHVM JIT - makes tests twice as fast
2017-03-07 22:14:40 +01:00
Nicolas Grekas
0691639063 [travis] Disable HHVM JIT - makes tests twice as fast 2017-03-07 22:12:28 +01:00
Fabien Potencier
f3217c3bd1 minor #21903 [Yaml] Fix the tests (GuilhemN)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] Fix the 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        |

Fix tests that are currently useless (previously part of https://github.com/symfony/symfony/pull/19782).

Commits
-------

5107b94baf [Yaml] Fix the tests
2017-03-06 13:38:40 -08:00
Guilhem Niot
5107b94baf
[Yaml] Fix the tests 2017-03-06 21:37:41 +01:00
Fabien Potencier
44dc67dca8 minor #21898 [github] Add a reminder about CHANGELOG.md files (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[github] Add a reminder about CHANGELOG.md files

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

Instead of calling for that each time, maybe this can help?

Commits
-------

cb452ee154 [github] Add a reminder about CHANGELOG.md files
2017-03-06 12:33:55 -08:00
Nicolas Grekas
cb452ee154 [github] Add a reminder about CHANGELOG.md files 2017-03-06 21:03:23 +01:00
Fabien Potencier
fda2472b02 minor #21902 [Filesystem] respect the umask argument in dumpFile() (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] respect the umask argument in dumpFile()

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

In #21823 we introduced a small BC break: The `dumpFile()` method of the `Filesystem` class allowed to pass the desired file permissions (support for this feature was dropped in Symfony 3.0).

Commits
-------

3a7cd08fe7 respect the umask argument in dumpFile()
2017-03-06 11:24:50 -08:00
Christian Flothmann
3a7cd08fe7 respect the umask argument in dumpFile() 2017-03-06 19:56:39 +01:00
Fabien Potencier
c91db73fbb bug #21823 dumpFile(), preserve existing file permissions (chs2)
This PR was squashed before being merged into the 2.7 branch (closes #21823).

Discussion
----------

dumpFile(), preserve existing file permissions

When calling Filesystem::dumpFile() on an already existing file, its permissions are lost.

| Q             | A
| ------------- | ---
| Branch?       | master
| 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        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

040a9abdbf dumpFile(), preserve existing file permissions
2017-03-06 10:29:47 -08:00
ChS
040a9abdbf dumpFile(), preserve existing file permissions 2017-03-06 10:29:45 -08:00
Fabien Potencier
3effed88e0 bug #21865 [Security] context listener: hardening user provider handling (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] context listener: hardening user provider handling

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

After the wrong fix in #21791 this is the second attempt to solve #4498. If more than one user provider support the user for the current context, all of them will be applied instead of returning prematurely when the first user provider does not find the logged in user.

Commits
-------

0fb09293fd context listener: hardening user provider handling
2017-03-06 08:15:02 -08:00
Fabien Potencier
ec134c7014 bug #21883 [HttpKernel] fix Kernel name when stored in a directory starting with a number (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] fix Kernel name when stored in a directory starting with a number

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

replaces #20750

Commits
-------

f244eb8414 [HttpKernel] fixed Kernel name when stored in a directory starting with a number
2017-03-06 07:51:41 -08:00
Nicolas Grekas
24f3135b11 minor #21886 [Form] Add validate method to mockec validator in form TypeTestCase (pierredup)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Add validate method to mockec validator in form TypeTestCase

| 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

When using the `Symfony\Component\Form\Tests\Extension\Validator\Type\TypeTestCase` class to unit test forms, the `validate` method is not mocked, which causes errors when the unit tests run.

Commits
-------

4013e7b Add validate method to mockec validator in form TypeTestCase
2017-03-06 10:17:24 +01:00
Pierre du Plessis
4013e7b998 Add validate method to mockec validator in form TypeTestCase 2017-03-06 09:20:15 +02:00
Fabien Potencier
7311ef36e9 bumped Symfony version to 2.7.26 2017-03-05 18:34:03 -08:00
Fabien Potencier
e22beacc93 Merge pull request #21884 from fabpot/release-2.7.25
released v2.7.25
2017-03-05 17:33:53 -08:00
Fabien Potencier
cb24ce3b52 updated VERSION for 2.7.25 2017-03-05 17:33:35 -08:00
Fabien Potencier
48c19f67e1 update CONTRIBUTORS for 2.7.25 2017-03-05 17:33:23 -08:00
Fabien Potencier
f90c78efe1 updated CHANGELOG for 2.7.25 2017-03-05 17:33:13 -08:00
Fabien Potencier
f244eb8414 [HttpKernel] fixed Kernel name when stored in a directory starting with a number 2017-03-05 14:37:48 -08:00
Fabien Potencier
4816f65c04 minor #21882 [Form] Fixed typo in a test after #21877 (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed typo in a test after #21877

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

Reviewing the diff on GitHub, I realized I've missed some typos in a new test of #21877. Sorry!

Commits
-------

b21a0978de [Form] Fixed typo in a test after #21877
2017-03-05 11:48:05 -08:00
Fabien Potencier
511e0c372a minor #21868 [Form] backport DependencyInjectionExtension tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] backport DependencyInjectionExtension 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        |

Commits
-------

97361f1815 [Form] backport DependencyInjectionExtension tests
2017-03-05 11:42:52 -08:00