Commit Graph

13763 Commits

Author SHA1 Message Date
David Marín
fa35597755 Sets _format attribute only if it wasn't set previously by the user.
Fixes #8787
2013-08-22 07:45:36 +02:00
Fabien Potencier
2872f839ad merged branch unkind/security-bundle-check-path-bugfix (PR #8782)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8782).

Discussion
----------

[SecurityBundle] Fix typo in the check_path validator

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

Actually, validator of `check_path` value is broken by #3005. It doesn't throw any exception even if `check_path` is an URI.

I've faced with wrong tests class hierarchy: `SecurityExtensionTest` is abstract test and I have to create the same test configuration for every format: PHP, XML, YAML. It looks like we test `Dependency Injection` and `Yaml` components. Issue with `check_path` does not depend on format, but such class hierarchy leaves me no choice. And I can't put test case into `ConfigurationTest`, because it doesn't know anything about security factories.

It looks like it's better to create new class for `SecurityExtension` tests.

Commits
-------

155dca0 [SecurityBundle] Fix typo in the check_path validator
2013-08-22 04:12:50 +02:00
Nikita Konstantinov
51022c30ae Fix typo in the check_path validator 2013-08-22 04:12:50 +02:00
Fabien Potencier
5f7219e2ab added a missing use statement (closes #8808) 2013-08-21 22:48:51 +02:00
Fabien Potencier
78e5f47849 merged branch tgabi333/2.2 (PR #8815)
This PR was merged into the 2.2 branch.

Discussion
----------

[Process] fix for Process:isSuccessful()

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

This is a rebase of https://github.com/symfony/symfony/pull/8801

If you call isSuccessful() on a running process you would get true because of 0 == null. I think that is not the expected behavior and that is not what phpdoc @return block said so.

Commits
-------

262879d fix for Process:isSuccessful()
2013-08-21 17:32:30 +02:00
Tóth Gábor
262879d8b5 fix for Process:isSuccessful() 2013-08-21 16:50:47 +02:00
Fabien Potencier
9c3c5d493f merged branch astina-forks/swiftmailer_handler (PR #8780)
This PR was merged into the 2.2 branch.

Discussion
----------

[MonologBridge] Allow SwiftMailerHandler to listen to kernel.terminate.event

This PR accompanies symfony/MonologBundle#51. Both are intended to fix symfony/symfony-standard#425.

MonologBundle configures SwiftMailerHandler as a Monolog handler and injects the proper transport service.

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

Commits
-------

62238b8 CS fix
c6ecd83 SwiftMailerHandler in Monolog bridge now able to react to kernel.terminate event
2013-08-21 09:57:29 +02:00
Fabien Potencier
36b5d19d9d merged branch romainneutron/properties-reset (PR #8806)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Process] Use a consistent way to reset data of the process latest run

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

It is actually useful when cloning or running again a process.

Commits
-------

0723c10 [Process] Use a consistent way to reset data of the process latest run
2013-08-21 09:09:53 +02:00
Romain Neutron
0723c10239 [Process] Use a consistent way to reset data of the process latest run
It is actually useful when cloning or running again a process.
2013-08-20 20:43:40 +02:00
Philipp Kräutli
62238b87bc CS fix 2013-08-19 16:09:48 +02:00
Fabien Potencier
98e1795915 merged branch jakzal/bugfix/remove-nonexisting-attr-8387 (PR #8790)
This PR was merged into the 2.2 branch.

Discussion
----------

[HttpFoundation] Fixed removing a nonexisting namespaced attribute

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

Commits
-------

85a9c9d [HttpFoundation] Fixed removing a nonexisting namespaced attribute.
2013-08-19 16:06:24 +02:00
Fabien Potencier
395f40a392 merged branch bschussek/fix-identity-translator (PR #8789)
This PR was merged into the 2.2 branch.

Discussion
----------

[Validation] Fixed IdentityTranslator to pass correct Locale to MessageSelector

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

This PR fixes the following case:

```php
\Locale::setDefault('en');
$translator = new IdentityTranslator(new MessageSelector());

echo $translator->transChoice('There is one apple|There are %count% apples', 10, array('%count' => 10));
```

Result before PR:

```
There are 1 apples
```

Result after PR:

```
There is one apple
```

The reason for the current behavior is that the locale `null` is passed to `MessageSelector`, but `MessageSelector` is not programmed to accept `null` values.

Commits
-------

191d320 [Validation] Fixed IdentityTranslator to pass correct Locale to MessageSelector
2013-08-19 16:05:27 +02:00
Jakub Zalas
85a9c9d114 [HttpFoundation] Fixed removing a nonexisting namespaced attribute. 2013-08-19 11:17:50 +01:00
Bernhard Schussek
191d3203d0 [Validation] Fixed IdentityTranslator to pass correct Locale to MessageSelector 2013-08-19 12:15:39 +02:00
Philipp Kräutli
c6ecd83b9d SwiftMailerHandler in Monolog bridge now able to react to kernel.terminate event 2013-08-18 12:41:55 +02:00
Fabien Potencier
b46e0ad556 fixed CS 2013-08-17 18:32:21 +02:00
Fabien Potencier
812900f00b merged branch klmatom/ticket_8460 (PR #8776)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8776).

Discussion
----------

{HttpFoundation] [Session] fixed session compatibility with memcached/re...

...dis session storage

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no (no new failng/errors introduced)
| Fixed tickets | 7380
| License       | MIT

Per https://bugs.php.net/bug.php?id=61470, and in fixing #7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)".  This patch applies the first fix only if the session store is "files"

Commits
-------

eb8d8eb {HttpFoundation] [Session] fixed session compatibility with memcached/redis session storage
2013-08-17 18:31:21 +02:00
Tom Avery
99adcf1f6a {HttpFoundation] [Session] fixed session compatibility with memcached/redis session storage
Per https://bugs.php.net/bug.php?id=61470, and in fixing #7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)".  This patch applies the first fix only if the session store is "files"

{HttpFoundation] [Session] fixed session compatibility with memcached/redis session storage

Per https://bugs.php.net/bug.php?id=61470, and in fixing #7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)".  This patch applies the first fix only if the session store is "files"
2013-08-17 18:31:20 +02:00
Fabien Potencier
bd4488b5c8 fixed CS 2013-08-17 18:29:09 +02:00
Fabien Potencier
be7172844c merged branch Sirian/argvinput_fix (PR #8768)
This PR was submitted for the 2.3 branch but it was merged into the 2.2 branch instead (closes #8768).

Discussion
----------

[Console] Fixes for hasParameterOption and getParameterOption methods of ArgvInput

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

Commits
-------

7ca9340 Fixes for hasParameterOption and getParameterOption methods of ArgvInput
2013-08-17 18:28:38 +02:00
Vasily Khayrulin
ab9a96b774 Fixes for hasParameterOption and getParameterOption methods of ArgvInput 2013-08-17 18:27:58 +02:00
Fabien Potencier
d60fa064f3 merged branch caponica/cache-clear-win-workaround (PR #8767)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8767).

Discussion
----------

Added sleep() workaround for windows php rename bug

For more info see links in issue #8766

Commits
-------

b3c815b Added sleep() workaround for windows php rename bug
2013-08-15 15:44:11 +02:00
Christian Morgan
dbd08551f8 Added sleep() workaround for windows php rename bug 2013-08-15 15:44:11 +02:00
Fabien Potencier
282b05cbc1 [HttpKernel] removed unused variable 2013-08-15 15:02:15 +02:00
Fabien Potencier
b146f75b3f merged branch romainneutron/slowness (PR #8749)
This PR was merged into the 2.2 branch.

Discussion
----------

[Process] Fix #8746 : slowness added in unit tests since #8741

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

Commits
-------

8c4bae3 [Process] Revert change
8d9c7c6 [Process] Fix #8746 : slowness added in unit tests since #8741
2013-08-14 14:56:31 +02:00
Romain Neutron
8c4bae3592 [Process] Revert change 2013-08-14 13:29:25 +02:00
Romain Neutron
8d9c7c6fae [Process] Fix #8746 : slowness added in unit tests since #8741 2013-08-14 12:41:24 +02:00
Fabien Potencier
f6e664d9b9 merged branch romainneutron/process-callbacks-2.2 (PR #8741)
This PR was merged into the 2.2 branch.

Discussion
----------

[Process][2.2] Fix #8739

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

This adds a fix to #8739. Whenever a call is done to to any non-blocking methods (`Process::isRunning`, `Process::isStopped`, `Process::isTerminated`, `Process::getStatus`, `Process::getPid`...), buffers are read, and callback executed.

Such code will now work :

```
$process->start(function ($type, $data) {
    echo $data;
});

while ($process->isRunning()) {
    // some stuff
    // callback is executed
}
```

Commits
-------

fa769a2 [Process] Add more precision to Process::stop timeout
57d4159 [Process] Avoid zombie process in case of unit tests failure
3ef517b [Process] Fix #8739
7716fb2 [Process] Add failing test for #8739
bff6f3c [Process] Fix CS
2013-08-13 22:10:11 +02:00
Fabien Potencier
d66db41bef merged branch shieldo/grammar_fix (PR #8745)
This PR was merged into the 2.2 branch.

Discussion
----------

Grammar fix

Commits
-------

d74eaf9 corrected English grammar (s/does not exists/does not exist)
2013-08-13 22:01:35 +02:00
Douglas Greenshields
d74eaf9603 corrected English grammar (s/does not exists/does not exist) 2013-08-13 20:56:24 +01:00
Romain Neutron
fa769a2c21 [Process] Add more precision to Process::stop timeout 2013-08-13 19:23:51 +02:00
Romain Neutron
57d4159133 [Process] Avoid zombie process in case of unit tests failure 2013-08-13 18:52:19 +02:00
Romain Neutron
3ef517b356 [Process] Fix #8739 2013-08-13 18:52:18 +02:00
Romain Neutron
7716fb25ab [Process] Add failing test for #8739 2013-08-13 18:22:32 +02:00
Romain Neutron
bff6f3c4a6 [Process] Fix CS 2013-08-13 18:22:25 +02:00
Fabien Potencier
2c466d2a25 merged branch jaikdean/documentation-grammar (PR #8722)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8722).

Discussion
----------

Fixed documentation grammar for AuthenticationManagerInterface::authenticate()

Commits
-------

8306be2 Fixed documentation grammar for AuthenticationManagerInterface::authenticate()
2013-08-13 09:47:15 +02:00
Jaik Dean
9a29e5bade Fixed documentation grammar for AuthenticationManagerInterface::authenticate() 2013-08-13 09:47:14 +02:00
Fabien Potencier
cb14afca40 merged branch marcj/ticket_8589 (PR #8728)
This PR was merged into the 2.2 branch.

Discussion
----------

[Validator] Fixed the wrong isAbstract() call in PR #8592

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

Commits
-------

18896d5a [Validator] fixed the wrong isAbstract() check against the class (fixed #8589)
2013-08-13 09:37:59 +02:00
Fabien Potencier
c07aa94664 merged branch lyrixx/twig-code-ext-warning (PR #8721)
This PR was merged into the 2.2 branch.

Discussion
----------

[TwigBridge] Prevent code extension to display warning

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

During functional testing with phpunit and browserkit (and all their friends) when the application returns a `4XX` or a `5XX` response, symfony displays the trace with code context.

During a training, few people experienced a very weird issue with php 5.4, symfony 2.3.2, phpunit 3.7, Windows 7 or 8 and SensioLabsDesktop 0.5.

When they run functional  tests, and the application returns a `404`, in the "console" there was lot of warnings. It was something like that `Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in /XXXXX on line 9` With the `@`, no more warnings.

I can't reproduce this issue on my computer (not windows). If needed, I can try to reproduce this bug on Monday at work.

Commits
-------

e8e76ec [TwigBridge] Prevent code extension to display warning
2013-08-13 09:32:38 +02:00
marcj
18896d5a9e [Validator] fixed the wrong isAbstract() check against the class (fixed #8589) 2013-08-12 23:46:36 +02:00
Grégoire Pineau
e8e76ece5a [TwigBridge] Prevent code extension to display warning 2013-08-12 10:19:38 +02:00
Fabien Potencier
36e4b8c1c2 merged branch larowlan/master (PR #8081)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8081).

Discussion
----------

Use strstr instead of strpos in ClassLoader (4% perf improvement)

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

Using ClassLoader in Drupal 8, using strstr instead of strpos nets 4% perf improvement.
XHPROF diff https://dl.dropboxusercontent.com/u/10201421/diff.html

Commits
-------

25d7b90 [ClassLoader] Use strstr instead of strpos
2013-08-09 09:17:14 +02:00
Lee Rowlands
2769c9dbb1 Use strstr instead of strpos 2013-08-09 09:16:43 +02:00
KUBO Atsuhiro
1a73b44df0 added missing support for the new output API in PHP 5.4+ 2013-08-08 14:01:00 +02:00
Fabien Potencier
484c7533bd merged branch WouterJ/fix_bug (PR #8696)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][TwigBridge] Fix form_enctype bug

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

After a copy/past error in #8675, `{{ form_enctype() }}` was not working because it results in a `Class "Symfony\Bridge\Twig\Node\FormEnctypeNode" not found` error.

This should only be merged in 2.2, as of 2.3 this is moved to the `Symfony\Bridge\Twig\Node\FormEnctypeNode` class

Commits
-------

e0c7d3d Fixed bug introduced in #8675
2013-08-08 13:59:26 +02:00
WouterJ
e0c7d3d477 Fixed bug introduced in #8675 2013-08-08 13:31:08 +02:00
Fabien Potencier
b95a3d44dd merged branch fabpot/twig-filesystem-exists (PR #8677)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8677).

Discussion
----------

[TwigBundle] made the filesystem loader compatible with Twig 2.0

| Q             | A
| ------------- | ---
| Bug fix?      | yes (for Twig 2.x)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Without adding the exists() method, the code happens to work by chance,
just because the current implementation of Twig exits() method calls
findTemplate().

But we know that it won't be the case anymore as of Twig 2.0.

Commits
-------

d00548b [TwigBundle] made the filesystem loader compatible with Twig 2.0
2013-08-08 13:00:17 +02:00
Fabien Potencier
0b965fbe7e made the filesystem loader compatible with Twig 2.0
Without adding the exists() method, the code happens to work by chance,
just because the current implementation of Twig exits() method calls
findTemplate().

But we know that it won't be the case anymore as of Twig 2.0.
2013-08-08 13:00:17 +02:00
Fabien Potencier
ec16d89e2b merged branch fabpot/twig-deprecated-features (PR #8675)
This PR was merged into the 2.2 branch.

Discussion
----------

replaced deprecated Twig features

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

As Symfony depends on Twig 1.11+, removing the usage of deprecated features will allow Symfony 2.2+ to work with Twig 2.0.

Commits
-------

322f880 replaced deprecated Twig features
2013-08-08 12:59:31 +02:00
Fabien Potencier
1bd67a5221 bumped Symfony version to 2.2.6 2013-08-07 19:08:15 +02:00