Commit Graph

22913 Commits

Author SHA1 Message Date
Nicolas Grekas
814d96165d [tests] Use @requires annotation when possible 2015-10-10 10:11:41 +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
864a58faa3 bug #16173 [FrameworkBundle] Replace PhpFileCache by FilesystemCache (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Replace PhpFileCache by FilesystemCache

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

Commits
-------

a6cb1c0 [FrameworkBundle] Replace PhpFileCache by FilesystemCache
2015-10-08 22:24:56 +02:00
Christophe Coevoet
f52b3a0a83 Fix the BC layer for the key->secret renaming for remember_me 2015-10-08 16:14:01 +02:00
Nicolas Grekas
a6cb1c0d97 [FrameworkBundle] Replace PhpFileCache by FilesystemCache 2015-10-08 11:44:44 +02:00
Fabien Potencier
491c12c510 minor #16165 [FrameworkBundle] composer suggest fix (Miliooo)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] composer suggest fix

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | no
Since cache is now required (See https://github.com/symfony/symfony/pull/16159), it makes no sense to suggest it

Commits
-------

9786868 [FrameworkBundle] composer suggest fix
2015-10-07 17:35:44 +02:00
Michiel Boeckaert
97868686a8 [FrameworkBundle] composer suggest fix
| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [yes|no]
| BC breaks?    | [yes|no]

Since cache is now required, it makes no sense to suggest it
2015-10-07 17:07:32 +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
a954fea00e minor #16155 Added more tests for PropertyAccess (pierredup)
This PR was merged into the 2.7 branch.

Discussion
----------

Added more tests for PropertyAccess

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

This is a follow up for [16090#issuecomment-145183635](https://github.com/symfony/symfony/pull/16090#issuecomment-145183635)

Commits
-------

378db75 Added more tests for PropertyAccess
2015-10-07 14:25:40 +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
5326df084e cs fix 2015-10-07 12:24:12 +02:00
Fabien Potencier
bd275a1b09 minor #16160 [FrameworkBundle] Deprecate the security.secure_random service (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Deprecate the security.secure_random service

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

Since the SecureRandom class and interface are already deprecated, so should be the service.

Commits
-------

8b55520 [FrameworkBundle] Deprecate the security.secure_random service
2015-10-07 12:14:23 +02:00
Nicolas Grekas
8b555209af [FrameworkBundle] Deprecate the security.secure_random service 2015-10-07 09:47:15 +02:00
Nicolas Grekas
f35a0d202f Merge branch '2.7' into 2.8
Conflicts:
	appveyor.yml
2015-10-07 09:09:15 +02:00
Nicolas Grekas
508ff48999 minor #16159 [FraworkBundle] Add missing doctrine/cache to composer.json (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FraworkBundle] Add missing doctrine/cache to composer.json

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

Commits
-------

f377643 [FraworkBundle] Add missing doctrine/cache to composer.json
2015-10-07 09:08:23 +02:00
Nicolas Grekas
481f39d9e6 Merge branch '2.3' into 2.7
Conflicts:
	src/Symfony/Component/Validator/Constraints/UrlValidator.php
2015-10-07 09:06:36 +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
Nicolas Grekas
f377643544 [FraworkBundle] Add missing doctrine/cache to composer.json 2015-10-07 08:40:17 +02:00
Nicolas Grekas
25fbcc3746 [ci] fix phpunit wrapper 2015-10-07 08:18:38 +02:00
David Stone
d040be773c [Yaml] Allow tabs before comments at the end of a line
In Yaml 1.2 spec white space is space or tab
2015-10-06 20:53:26 -06:00
Pierre du Plessis
378db759e0 Added more tests for PropertyAccess 2015-10-07 01:02:43 +02:00
Fabien Potencier
141f9eb46d feature #15879 Deprecate the SecureRandom class (pierredup)
This PR was merged into the 2.8 branch.

Discussion
----------

Deprecate the SecureRandom class

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

Deprecate the `Symfony\Component\Security\Core\Util\SecureRandom` and encourage the usage of the `random_bytes` function instead

Commits
-------

f02973a Deprecate the SecureRandom class
2015-10-06 20:17:23 +02:00
Pierre du Plessis
f02973acd8 Deprecate the SecureRandom class 2015-10-06 20:09:25 +02:00
Fabien Potencier
2dc28eaaf0 bug #16152 Fix URL validator failure with empty string (fabpot, bocharsky-bw)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix URL validator failure with empty string

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

Fix validator failure if method `__toString` of passed object return an empty string.

Commits
-------

e0910d9 Fix URL validator failure with empty string
0f61859 [Validator] added a failing test
2015-10-06 19:41:54 +02:00
Nicolas Grekas
72365716c2 Merge branch '2.7' into 2.8
Conflicts:
	src/Symfony/Component/Security/Http/Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
	src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php
	src/Symfony/Component/Security/composer.json
2015-10-06 19:12:59 +02:00
Victor Bocharsky
e0910d9f49 Fix URL validator failure with empty string 2015-10-06 18:40:02 +02:00
Fabien Potencier
0f61859679 [Validator] added a failing test 2015-10-06 18:38:49 +02:00
Fabien Potencier
a1c7af1fbf feature #16001 [DI] Warn when a definition relies on a deprecated class in ContainerBuilder::createService() (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Warn when a definition relies on a deprecated class in ContainerBuilder::createService()

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

The new feature is in the DI component and it enlighten a deprecation from Doctrine that we ignored in FrameworkBundle, that is also fixed in this PR.

See https://github.com/symfony/symfony/pull/16001/files?w=1

Commits
-------

ca69fa3 [DI] Warn when a definition relies on a deprecated class in ContainerBuilder::createService()
2015-10-06 18:29:07 +02:00
Fabien Potencier
45a5b005d5 minor #16147 [VarDumper] consistent signature of getDump() in class + trait (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] consistent signature of getDump() in class + trait

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

Commits
-------

48a9e83 consistent signature of getDump() in class + trait
2015-10-06 18:18:14 +02:00
Fabien Potencier
5aa1233d0b minor #16151 [FrameworkBundle][VarDumper] tweak some deprecation messages (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle][VarDumper] tweak some deprecation messages

| Q             | A
| ------------- | ---
| Fixed tickets | #16129, #16135
| License       | MIT

I was a bit too slow with reviewing.

Commits
-------

536045f tweak some deprecation messages
2015-10-06 18:15:19 +02:00
Christian Flothmann
536045f865 tweak some deprecation messages 2015-10-06 17:57:37 +02:00
Fabien Potencier
1c43a4e622 fixed CS 2015-10-06 17:46:46 +02:00
Fabien Potencier
d93e513707 minor #16135 [FrameworkBundle] [Routing] DelegatingLoader: deprecate logger argument (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] [Routing] DelegatingLoader: deprecate logger argument

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

Related to #16117

Commits
-------

af0eba7 [FrameworkBundle] [Routing] DelegatingLoader: deprecate logger argument
2015-10-06 17:46:11 +02:00
Fabien Potencier
21e50d59ca feature #14044 [Console] [Helper] [Table] Columns styles (MAXakaWIZARD)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #14044).

Discussion
----------

[Console] [Helper] [Table] Columns styles

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

This PR introduces ability to set styles for individual columns in table. For example, we can apply STR_PAD_LEFT for the last column (useful for money, file size etc).

Code:
```php
use Symfony\Component\Finder\Finder;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Helper\TableStyle;

$table = new Table($output);
$table->setHeaders(['#', 'Path', 'Size']);

$style = new TableStyle();
$style->setPadType(STR_PAD_LEFT);

$table->setColumnStyle(2, $style);

$finder = new Finder();
$finder->files()->in("/path/to/dir")->name('*.php')
$counter = 0;
foreach ($finder as $file) {
    $counter++;
    $table->addRow([$counter, $file->getRealPath(), number_format($file->getSize(), 0, '.', ' ')]);
}

$table->render();
```
Output:
```
+---+---------------------+--------+
| # | Path                |   Size |
+---+---------------------+--------+
| 1 | autoload.php        |    183 |
| 2 | ApplicationTest.php | 47 794 |
| 3 | CommandTest.php     | 14 965 |
| 4 | ListCommandTest.php |  2 369 |
+---+---------------------+--------+
```

Commits
-------

668c502 [Console] [Helper] [Table] Add ability to set styles for individual columns
2015-10-06 17:25:52 +02:00
MAXakaWIZARD
668c502982 [Console] [Helper] [Table] Add ability to set styles for individual columns 2015-10-06 17:25:39 +02:00
ogizanagi
af0eba7d26 [FrameworkBundle] [Routing] DelegatingLoader: deprecate logger argument 2015-10-06 17:24:04 +02:00
Fabien Potencier
07e1d25b6b bug #15121 fixed #15118 [Filesystem] mirroring a symlink copies absolute file path (danepowell)
This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #15121).

Discussion
----------

fixed #15118 [Filesystem] mirroring a symlink copies absolute file path

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

This reverts the code change in a8b8d33e94 and adjusting the test case accordingly.

Commits
-------

a83d525 fixed #15118 [Filesystem] mirroring a symlink copies absolute file path
2015-10-06 17:23:29 +02:00
Dane Powell
a83d525b90 fixed #15118 [Filesystem] mirroring a symlink copies absolute file path 2015-10-06 17:23:28 +02:00
Fabien Potencier
2a0f6fbea3 bug #15161 avoid duplicated path with addPrefix (remicollet)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #15161).

Discussion
----------

avoid duplicated path with addPrefix

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

Having UniversalClassLoader deprecated raise various issues... and ClassLoader doesn't provide the same features... :(

This one avoid duplication of paths for a given prefix, so can improve perf is such case.

Notice: I open this PR against 2.7, first version where UniversalClassLoader is deprecated, but feel free to apply only if 2.8 or 3.0, as you prefer.

Context on how this class is used in various fedora packages, see
http://blog.remirepo.net/post/2015/06/30/PHP-SIG-autoloader

Commits
-------

af420c1 avoid duplicated path with addPrefix
2015-10-06 17:11:44 +02:00
Remi Collet
af420c120d avoid duplicated path with addPrefix 2015-10-06 17:11:44 +02:00
Fabien Potencier
380e2ba103 minor #16131 [2.7] Fix docblocks about callables (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Fix docblocks about callables

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

Commits
-------

7b12fe9 [2.7] Fix docblocks about callables
2015-10-06 17:07:22 +02:00
Nicolas Grekas
b362c961f7 Merge branch '2.3' into 2.7
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
	src/Symfony/Component/Security/Tests/Core/SecurityContextTest.php
2015-10-06 17:02:37 +02:00
Fabien Potencier
dd385402ec bug #16146 [Security] sync translations and add a test for it (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] sync translations and add a test for it

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

Commits
-------

08333ec [Security] sync translations and add a test for it
2015-10-06 16:57:43 +02:00
Christian Flothmann
08333ecb11 [Security] sync translations and add a test for it 2015-10-06 16:47:20 +02:00
Fabien Potencier
2539af63ad minor #16145 [FrameworkBundle] Fix deps=low/high tests (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix deps=low/high tests

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

Commits
-------

26ca3dc [FrameworkBundle] Fix deps=low/high tests
2015-10-06 16:42:38 +02:00
Fabien Potencier
4d57d587c1 minor #14491 [2.3][SECURITY] Add remember me cookie configuration (klaascuvelier)
This PR was squashed before being merged into the 2.3 branch (closes #14491).

Discussion
----------

[2.3][SECURITY] Add remember me cookie configuration

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

Commits
-------

e8f0e5a [2.3][SECURITY] Add remember me cookie configuration
2015-10-06 16:28:56 +02:00
Klaas Cuvelier
e8f0e5afd8 [2.3][SECURITY] Add remember me cookie configuration 2015-10-06 16:28:55 +02:00
Nicolas Grekas
26ca3dc6c2 [FrameworkBundle] Fix deps=low/high tests 2015-10-06 16:14:42 +02:00