Commit Graph

17819 Commits

Author SHA1 Message Date
Nicolas Grekas
ab8cc29814 [Process] Inherit env vars by default in PhpProcess 2015-10-20 18:32:03 +02:00
Fabien Potencier
613910bc9f bug #16177 [HttpFoundation] Fixes /0 subnet handling in IpUtils (ultrafez)
This PR was squashed before being merged into the 2.3 branch (closes #16177).

Discussion
----------

[HttpFoundation] Fixes /0 subnet handling in IpUtils

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16055
| License       | MIT
| Doc PR        | Not needed

Fixes bug #16055. For IP addresses with CIDR subnet length 0, the IP address must be valid - IPs with subnet masks greater than zero are implicitly validated due to the use of `ip2long` and `substr_compare` (although it's not particularly robust - there could be some future work to improve this here).

Commits
-------

d9ac571 [HttpFoundation] Fixes /0 subnet handling in IpUtils
2015-10-19 13:54:32 +02:00
Alex Silcock
d9ac57123d [HttpFoundation] Fixes /0 subnet handling in IpUtils 2015-10-19 13:54:29 +02:00
Fabien Potencier
66c99a0b95 minor #16238 [Form] Remove unneeded catch and re-throw in DateTimeToStringTransformer (MisatoTremor)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16238).

Discussion
----------

[Form] Remove unneeded catch and re-throw in DateTimeToStringTransformer

| Q             | A
| ------------- | ---
| Fixed tickets | #16237
| License       | MIT

Also fixed PHPDoc param for ``transform``.

Commits
-------

2c9b283 [Form] Simplify DateTimeToStringTransformer Avoid unneeded catch and re-throw of the same exception.
2015-10-19 13:40:25 +02:00
Steffen Roßkamp
2c9b283e01 [Form] Simplify DateTimeToStringTransformer
Avoid unneeded catch and re-throw of the same exception.
2015-10-19 13:40:24 +02:00
Fabien Potencier
c94f18693e minor #16281 [HttpKernel] Remove a duplicate test for the EsiFragmentRenderer (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Remove a duplicate test for the EsiFragmentRenderer

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

Since the request was made a required argument to the `render()` method in #6829, this [test became a duplicate](23f51450bd/src/Symfony/Component/HttpKernel/Tests/RenderingStrategy/EsiRenderingStrategyTest.php (L28-L38)) of `testRenderFallbackToInlineStrategyIfEsiNotSupported()`.

Commits
-------

44d57a3 [HttpKernel] Remove a duplicate test for the EsiFragmentRenderer
2015-10-19 11:31:14 +02:00
Jakub Zalas
44d57a340f [HttpKernel] Remove a duplicate test for the EsiFragmentRenderer
Since the request was made a required argument to the `render()` method in #6829, this test became a duplicate of `testRenderFallbackToInlineStrategyIfEsiNotSupported()`.
2015-10-18 21:45:35 +01:00
Fabien Potencier
2f205d47a6 minor #16277 [Routing] use constants in tests (Tobion)
This PR was squashed before being merged into the 2.3 branch (closes #16277).

Discussion
----------

[Routing] use constants in tests

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

Use constants in tests instead of hardcoded values in preparation for #16276

Commits
-------

608c8d2 [Routing] use constants in tests
2015-10-18 22:22:26 +02:00
Tobias Schultze
608c8d25a3 [Routing] use constants in tests 2015-10-18 22:22:24 +02:00
Fabien Potencier
b06a938e63 bug #16259 [Validator] Allow an empty path in a URL with only a fragment or a query (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Allow an empty path in a URL with only a fragment or a query

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

URLs like `http://symfony.com?query=1` or `http://symfony.com#` should be valid.

According to the [RFC3986](https://tools.ietf.org/html/rfc3986#page-16):

> When authority is present, the path must either be empty or begin with a slash ("/") character.
> When authority is not present, the path cannot begin with two slash characters ("//").

Since the RFC describes URIs, the second sentence doesn't apply here as the authority is required in URLs .

Commits
-------

b3a5411 [Validator] Allow an empty path in a URL with only a fragment or a query
2015-10-17 07:39:03 +02:00
Jakub Zalas
b3a54117c8 [Validator] Allow an empty path in a URL with only a fragment or a query 2015-10-16 14:12:47 +01:00
Fabien Potencier
751f2bebdb bug #16226 [filesystem] makeRelativePath does not work correctly from root (jaytaph, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[filesystem] makeRelativePath does not work correctly from root

| Q             | A
| ------------- | ---
| Bug fix?      | yes/no
| New feature?  | yes/no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #1234
| License       | MIT
| Doc PR        | #14066, #14067

When using `makeRelativePath`, it returns an incorrect path when trying to fetch an entry from the root:

      $fs->makePathRelative('/foo/bar/baz', '/');

Actual result:

      ../foo/bar/baz

Expected result:

      foo/bar/baz

As we have specified an absolute path, there is no point on having an `..` added. It works, because a root directory has a `..` which points to itself, but it could result in issues when the relative path is actually prefixed or concatted.

Commits
-------

791b124 fixed CS
7bb394e Added separated handling of root paths
2015-10-16 13:57:06 +02:00
Fabien Potencier
4397a031ef minor #16228 [HttpFoundation] Fix some typo in the Request doc (alOneh)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix some typo in the Request doc

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

Commits
-------

481fc12 [HttpFoundation] Fix some typo in the Request doc
2015-10-14 19:23:48 +02:00
Nicolas Grekas
84f6b30147 minor #16225 [appveyor] fix ini matrix race conditions (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[appveyor] fix ini matrix race conditions

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

Commits
-------

8e59d4a [appveyor] fix ini matrix race conditions
2015-10-13 18:03:19 +02:00
Hippolyte Alain
481fc12861 [HttpFoundation] Fix some typo in the Request doc 2015-10-13 17:57:12 +02:00
Nicolas Grekas
8e59d4ae17 [appveyor] fix ini matrix race conditions 2015-10-13 17:38:14 +02:00
Fabien Potencier
791b1247f9 fixed CS 2015-10-13 17:24:19 +02:00
Joshua Thijssen
7bb394e2c4 Added separated handling of root paths 2015-10-13 17:18:25 +02:00
Fabien Potencier
d949fcc8d6 minor #16221 [Http*] Mock time() to fix transient tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Http*] Mock time() to fix transient tests

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

Commits
-------

fa604d3 [Http*] Mock time() to fix transient tests
2015-10-13 16:31:59 +02:00
Nicolas Grekas
fa604d3c6f [Http*] Mock time() to fix transient tests 2015-10-13 16:19:21 +02:00
Nicolas Grekas
8ced3c63f3 minor #16222 [ci] Cache phpunit install (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ci] Cache phpunit install

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

Commits
-------

e6d343a [ci] Cache phpunit install
2015-10-13 12:03:41 +02:00
Nicolas Grekas
e6d343a126 [ci] Cache phpunit install 2015-10-13 10:50:50 +02:00
Fabien Potencier
17499f550e minor #16218 [WebProfilerBundle] [toolbar] Changed profiler toolbar green color to comply with WCAG 2.0AA (spreston)
This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] [toolbar] Changed profiler toolbar green color to comply with WCAG 2.0AA

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -
[WebProfilerBundle] Modified green icon colors for min contrast of 4.5
(resubmitting this on the 2.3 branch. Previous PR was #15827)

Commits
-------

58f5168 [WebProfiler] [toolbar] Changed profiler toolbar color to comply with WCAG 2.0AA contrast standards
2015-10-13 08:30:56 +02:00
Steve Preston
58f5168b4b [WebProfiler] [toolbar] Changed profiler toolbar color to comply with WCAG 2.0AA contrast standards 2015-10-12 16:28:48 -04:00
Nicolas Grekas
ed40dc3300 [travis] Load memcache.so 2015-10-12 14:38:55 +02:00
Nicolas Grekas
bb07c761b8 minor #16213 [2.3] Cherry-pick @group time-sensitive annotations (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Cherry-pick @group time-sensitive annotations

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

From 34a08464ce

Commits
-------

c9f92ba [2.3] Cherry-pick @group time-sensitive annotations
2015-10-12 14:29:39 +02:00
Nicolas Grekas
e9993d39c8 minor #16208 [ci] load php_memcache.dll and apcu.so (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ci] load php_memcache.dll and apcu.so

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

Commits
-------

2704033 [ci] load php_memcache.dll and apcu.so
2015-10-12 14:28:17 +02:00
Nicolas Grekas
c9f92baad7 [2.3] Cherry-pick @group time-sensitive annotations 2015-10-12 13:59:00 +02:00
Nicolas Grekas
27040333cf [ci] load php_memcache.dll and apcu.so 2015-10-12 13:42:34 +02:00
Nicolas Grekas
f14aa486d9 minor #16207 [ci] Fix tests requirements (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ci] Fix tests requirements

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

Commits
-------

3c0b441 [ci] Fix tests requirements
2015-10-12 11:18:33 +02:00
Nicolas Grekas
3c0b441371 [ci] Fix tests requirements 2015-10-12 11:06:32 +02:00
Nicolas Grekas
d1d0e041c2 [ci] SymfonyTestsListener is now auto-registered 2015-10-11 11:37:49 +02:00
Fabien Potencier
c5966ba6b9 minor #16099 [Validator] Adds some missing validation messages translations for IT (micheleorselli)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16099).

Discussion
----------

[Validator] Adds some missing validation messages translations for IT

Commits
-------

4ac8ff7 adds validation messages missing italian translations
2015-10-11 09:51:52 +02:00
Michele Orselli
4ac8ff7e26 adds validation messages missing italian translations 2015-10-11 09:51:52 +02:00
Nicolas Grekas
47f09d808a minor #16195 [phpunit] Upgrade when a change is detected and when install subcommand is used (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[phpunit] Upgrade when a change is detected and when install subcommand is used

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

When a change is merged in our local ./phpunit script, this will upgrade already installed ones.

Commits
-------

31fb362 [phpunit] Upgrade when a change is detected and when install subcommand is used
2015-10-11 09:36:48 +02:00
Nicolas Grekas
31fb362a08 [phpunit] Upgrade when a change is detected and when install subcommand is used 2015-10-11 09:13:05 +02:00
Nicolas Grekas
1ee8d2b821 minor #16191 [HttpFoundation] Extend ClockMock to session storage tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Extend ClockMock to session storage tests

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

Commits
-------

93a06df [HttpFoundation] Extend ClockMock to session storage tests
2015-10-10 18:37:41 +02:00
Nicolas Grekas
93a06dffa1 [HttpFoundation] Extend ClockMock to session storage tests 2015-10-10 18:18:50 +02:00
Nicolas Grekas
803ff9faf3 minor #16192 [Process] Don't use @requires on abstract class (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Don't use @requires on abstract class

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

Commits
-------

23fc32f [Process] Don't use @requires on abstract class
2015-10-10 18:09:26 +02:00
Nicolas Grekas
23fc32f78f [Process] Don't use @requires on abstract class 2015-10-10 18:01:13 +02:00
Nicolas Grekas
4c431d6c67 minor #16190 [ci] Enable collecting and replaying skipped tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ci] Enable collecting and replaying skipped tests

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

Commits
-------

4032c88 [ci] Enable collecting and replaying skipped tests
2015-10-10 11:14:14 +02:00
Fabien Potencier
f9940f3285 minor #16185 [2.3][tests] Use @requires annotation when possible (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][tests] Use @requires annotation when possible

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

Commits
-------

4061d37 [tests] Use @requires annotation when possible
2015-10-10 11:06:16 +02:00
Nicolas Grekas
4061d37e87 [tests] Use @requires annotation when possible 2015-10-10 10:57:40 +02:00
Nicolas Grekas
4032c88a21 [ci] Enable collecting and replaying skipped tests 2015-10-10 10:46:02 +02:00
Tobias Schultze
5206086266 bug #16182 [Process] Workaround buggy PHP warning (cbj4074)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16182).

Discussion
----------

[Process] Workaround buggy PHP warning

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

This temporary workaround is intended to address an uncaught exception that may occur, until https://bugs.php.net/bug.php?id=69240 is fixed.

Obviously the `@` operator is another option, but I'm erring towards the notion that the Symfony authors/maintainers may wish to implement more elegant exception-handling logic than simply using `@`.

Commits
-------

b1bd093 [Process] Workaround buggy PHP warning
2015-10-09 23:59:27 +02:00
Ben
b1bd093f8a [Process] Workaround buggy PHP warning 2015-10-09 23:59:27 +02:00
Fabien Potencier
2406cc7b43 bug #16095 [Console] Add additional ways to detect OS400 platform (johnkary)
This PR was squashed before being merged into the 2.3 branch (closes #16095).

Discussion
----------

[Console] Add additional ways to detect OS400 platform

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

This PR adds support for detecting the OS400 platform when the PHP function `php_uname()` is disabled. OS400 platform detection was added in #15058 to fix character encoding issues present on OS400. See that PR for more info.

This PR fixes regression introduced in #16053, which did not work on the IBM OS400 server I have access to. The constant `PHP_OS` being checked outputs "AIX" on my IBM OS400 server. I can't say for sure if it works on other IBM platforms... but I preserved this check just in case.

User @eloigranado [commented here](https://github.com/symfony/symfony/pull/15058#issuecomment-130743928) asking if we could switch to using `PHP_OS` constant instead of `php_uname()` because he claims some admins might "[hide] the exact kernel build from any attacker who discovers a remote PHP code execution vulnerability". I personally don't think we should accommodate this use case, but I was able to find alternate approaches.

### Why use case insensitive string matching stristr() instead of in_array()?

Here are the various outputs on my OS400 server:

    echo PHP_OS; // "AIX"
    echo getenv('OSTYPE'); // "os400"
    echo php_uname('s'); // "OS400"

So we have various case issues here, and possible blank values on platforms where OSTYPE var doesn't exist or php_uname() is disabled. Concatenating these optional values together delimited by ; then case-insensitive searching the string for "OS400" seemed like a fair compromise. I would've probably done `in_array()` if case wasn't an issue.

Commits
-------

96a4071 [Console] Add additional ways to detect OS400 platform
2015-10-07 14:28:08 +02:00
John Kary
96a4071891 [Console] Add additional ways to detect OS400 platform 2015-10-07 14:28:06 +02:00
Fabien Potencier
bd9997e5e7 bug #15793 [Yaml] Allow tabs before comments at the end of a line (superdav42)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Allow tabs before comments at the end of a line

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

If a yml file has a tab character before a line ending comment the comment will be included in the parsed value. Yaml spec allows tab or space as whitespace characters so we need to check for tab as well. See included test.
Recently caused an odd and hard to find bug in our project.

See spec:
http://www.yaml.org/spec/1.2/spec.html#s-b-comment
http://www.yaml.org/spec/1.2/spec.html#s-separate-in-line
http://www.yaml.org/spec/1.2/spec.html#s-white

This is a new PR replacing https://github.com/symfony/symfony/pull/15747

@fabpot

Commits
-------

d040be7 [Yaml] Allow tabs before comments at the end of a line
2015-10-07 12:28:58 +02:00
Nicolas Grekas
65b9adc9c6 minor #16158 [ci] fix phpunit wrapper (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ci] fix phpunit wrapper

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

Our phpunit wrapper doing the root composer up was a mistake as it breaks testing deps=low.

Commits
-------

25fbcc3 [ci] fix phpunit wrapper
2015-10-07 09:04:51 +02:00