Commit Graph

18346 Commits

Author SHA1 Message Date
Fabien Potencier
23eb033abb [HttpKernel] fixed internal fragment handling 2014-09-03 10:09:50 +02:00
Fabien Potencier
b60b5d4b24 security #11832 n/a (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

f38536a [WebProfiler] replaced the import/export feature from the web interface to a CLI tool
2014-09-03 09:40:30 +02:00
Fabien Potencier
439c5a3357 security #11831 n/a (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

654b1f2 Forced all fragment uris to be signed, even for ESI
2014-09-03 09:40:02 +02:00
Fabien Potencier
c558b159fe security #11830 n/a (aitboudad, Jérémy Derussé)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

9e1bc22 Add tests and more assertions
101a3b7 [FrameworkBundle][Translator] Validate locales.
2014-09-03 09:39:11 +02:00
Fabien Potencier
e30bb17b7e security #11829 n/a (damz, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

3b4046e [HttpFoundation] added some missing tests
cefe237 fix parsing of Authorization header
2014-09-03 09:38:23 +02:00
Fabien Potencier
0aaabbfe8b security #11828 n/a (nicolas-grekas, larowlan)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

1ee96a8 Test examples from Drupal SA-CORE-2014-003
5506ee8 Fix potential DoS when parsing HOST
2014-09-03 09:37:21 +02:00
Fabien Potencier
85d6cf8f42 minor #11825 fixing yaml indentation (cordoval)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11825).

Discussion
----------

fixing yaml indentation

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

Commits
-------

3bba329 fixing yaml indentation
2014-09-02 18:01:12 +02:00
Luis Cordova
3bba329775 fixing yaml indentation 2014-09-02 18:01:12 +02:00
Fabien Potencier
36b0e72874 minor #11823 Unexpexted "));" (dominikjaglo)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #11823).

Discussion
----------

Unexpexted "));"

removed unexpected "));"

Commits
-------

88f8b3f Unexpexted ));"
2014-09-02 15:16:13 +02:00
Dominik Jagło
88f8b3f173 Unexpexted ));" 2014-09-02 15:16:13 +02:00
Fabien Potencier
f38536ab79 [WebProfiler] replaced the import/export feature from the web interface to a CLI tool 2014-09-02 15:08:29 +02:00
Christophe Coevoet
654b1f281e Forced all fragment uris to be signed, even for ESI 2014-09-02 09:39:57 +02:00
Christophe Coevoet
5183501e0b [DI] Added safeguards against invalid config in the YamlFileLoader
Exceptions explaining the mistake are better than fatal errors or weird
notices appearing when trying to deal with such invalid data.
Closes #11333
2014-09-02 09:31:18 +02:00
Jérémy Derussé
9e1bc22388 Add tests and more assertions 2014-09-02 09:12:49 +02:00
Abdellatif Ait boudad
101a3b7b50 [FrameworkBundle][Translator] Validate locales. 2014-09-02 09:12:49 +02:00
Fabien Potencier
8fdfb6fc35 minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)
This PR was merged into the 2.4 branch.

Discussion
----------

[Security] Add more tests for StringUtils::equals

| 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

More tests for `StringUtils::equals`.

Commits
-------

a676863 [Security] Add more tests for StringUtils::equals
2014-09-02 09:07:06 +02:00
Fabien Potencier
3b4046e894 [HttpFoundation] added some missing tests 2014-09-01 23:16:21 +02:00
Fabien Potencier
b554961a5b minor #11812 [HttpFoundation] Improve string values in test codes (DQNEO)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11812).

Discussion
----------

[HttpFoundation] Improve string values in test codes

I made the meanings of string literals more clear.

| 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

Commits
-------

05f5860 [HttpFoundation] Improve string values in test codes
2014-09-01 13:58:07 +02:00
DQNEO
05f5860c56 [HttpFoundation] Improve string values in test codes 2014-09-01 13:58:07 +02:00
Kévin Dunglas
a6768635f0 [Security] Add more tests for StringUtils::equals 2014-09-01 13:47:09 +02:00
Fabien Potencier
32f1143e60 minor #11814 [Security] fixing typo in a comment (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] fixing typo in a comment

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

As reported [here](https://github.com/symfony/symfony/pull/11574/files#r16934052).

Commits
-------

faefd66 fixing typo in a comment
2014-09-01 13:45:45 +02:00
Fabien Potencier
2aed56f6e8 minor #11811 [HttpFoundation] fix comment: not fourth but sixth argument (DQNEO)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11811).

Discussion
----------

[HttpFoundation] fix comment: not fourth but sixth argument

$server is the **sixth** argument, not fourth.

| 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

Commits
-------

42841e8 fix comment: not fourth but sixth argument
2014-09-01 13:44:29 +02:00
DQNEO
42841e845b fix comment: not fourth but sixth argument 2014-09-01 13:44:28 +02:00
Christian Flothmann
faefd66b10 fixing typo in a comment 2014-09-01 09:40:12 +02:00
Christian Flothmann
ffc4090d21 make the stopwatch service always available
Previously, one had to be careful to check if the debug.stopwatch
service was available before using it. Otherwise, the application
would break in the prod environment.
2014-08-31 19:59:21 +02:00
Fabien Potencier
1a239afc85 [Monolog] added NotFoundActivationStrategy from MonologBundle 2014-08-31 07:28:33 +02:00
Fabien Potencier
c51f3f36ab [SecurityBundle] fixed dep on symfony/security 2014-08-31 06:20:43 +02:00
Fabien Potencier
800b7b2752 feature #11324 [SecurityBundle] error helper added symfony/symfony#11147 (i3or1s)
This PR was squashed before being merged into the 2.6-dev branch (closes #11324).

Discussion
----------

[SecurityBundle] error helper added symfony/symfony#11147

Added helper that extracts last authentication error and username.

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

Commits
-------

1722f60 [SecurityBundle] error helper added symfony/symfony#11147
2014-08-31 06:19:40 +02:00
Boris Vujicic
1722f60d42 [SecurityBundle] error helper added symfony/symfony#11147 2014-08-31 06:19:38 +02:00
Fabien Potencier
62bc2c4cf5 [FrameworkBundle] fixed CS 2014-08-31 06:17:40 +02:00
Fabien Potencier
d0c3ffa288 bug #10197 [FrameworkBundle] PhpExtractor bugfix and improvements (mtibben)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10197).

Discussion
----------

[FrameworkBundle] PhpExtractor bugfix and improvements

PhpExtractor currently only handles simple strings which match an overly-specific token sequence.

This change adds support for
- heredoc / nowdoc
- inconsistent whitespace when parsing
- escaped sequences in strings
- `transChoice`

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

Commits
-------

a8a40fc [FrameworkBundle] PhpExtractor bugfix and improvements
2014-08-31 06:14:43 +02:00
Michael Tibben
a8a40fcb9e [FrameworkBundle] PhpExtractor bugfix and improvements 2014-08-31 06:14:42 +02:00
Fabien Potencier
e85ab46b17 feature #9235 [Console] Skip commands from ConsoleCommandEvent (tPl0ch)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Console] Skip commands from ConsoleCommandEvent

Use case: We have different variations of the same application, for which
only certain commands are allowed. Right now this is done in a custom
Application class, but it would be much easier to just be able to skip
commands from a listener, where you can disable commands via the Event
object.

This patch provides this feature and corresponding test cases.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes - for Console tests
| Fixed tickets | None
| License       | MIT
| Doc PR        | symfony/symfony-docs#4058

Commits
-------

acb1ae6 [Console] Skip commands from ConsoleCommandEvent
2014-08-31 06:11:39 +02:00
Fabien Potencier
55d17fad19 minor #11635 [Finder] Fix findertest readability (1emming)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11635).

Discussion
----------

[Finder] Fix findertest readability

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | part of #11631, #11588
| License       | MIT

When running on Ubuntu it is hard to setup an account that allows the `chmod` to downgrade the rights on a directory but is not allow to read from the downgraded directory.

Commits
-------

8a47b62 [Finder] Fix findertest readability
2014-08-31 06:03:33 +02:00
1emming
8a47b62bd3 [Finder] Fix findertest readability 2014-08-31 06:03:32 +02:00
Fabien Potencier
0f59bca7b0 feature #11501 [OptionsResolver] Changed order of validation (WouterJ)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[OptionsResolver] Changed order of validation

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no (I don't think it causes breaks)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | -

It's both a new feature and bug fix actually... I let @fabpot decide on this one.

<s>@sstok can you please confirm if this fixes #4500 ? I couldn't fully follow
that ticket and then I discovered this error. If not, can you please add more
information to your ticket about the problems?</s>

Commits
-------

a4f208b Changed order of validation
2014-08-31 05:52:06 +02:00
Fabien Potencier
b5d0501860 minor #11574 [Security] Made optimization on constant-time algorithm removing modulus operator (yosmanyga)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Made optimization on constant-time algorithm removing modulus operator

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

This fix improves the constant-time algorithm used to compare strings, as it removes the `%` operator inside the loop.

Commits
-------

000bd0d Made optimization deprecating modulus operator
2014-08-31 05:48:56 +02:00
Fabien Potencier
77aa12fcd3 feature #11703 [Validator] deprecate member metadata accessors (Tobion)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] deprecate member metadata accessors

| Q             | A
| ------------- | ---
| Bug fix?      | sort of
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/11614/files#r16385109
| License       | MIT
| Doc PR        |

deprecate member metadata accessors in favor of existing property metadata accessors

Commits
-------

14d3f97 [Validator] add getConstraints to MetadataInterface
04eb61b [Validator] deprecate member metadata accessors in favor of existing property metadata accessors
2014-08-31 05:47:52 +02:00
Fabien Potencier
69d4dd9a19 feature #11709 [Validator] Expression validator now processes null values (tommygnr)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Validator] Expression validator now processes null values

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

The ExpressionValidator was incorrectly skipping validation of null or empty string values.

For example the following was (incorrectly) considered valid if hairColour is null because the validator was skipped
```php
<?php

namespace Acme\DemoBundle\Model\Person;

use Symfony\Component\Validator\Constraints as Assert;

class Person
{
    private $hasHair;

    /**
     * @Assert\Expression(
     *     "!(this.hasHair() and value == null)",
     *     message="If you have hair you must pick its colour!"
     * )
     */
    private $hairColour;
}
```

This is a follow on from #11590 but is targeted against master as the BC break introduced was considered undesirable for currently released versions of symfony.

I will squash and create a documentation PR once there is consensus that this is ready to be merged.

Commits
-------

580e1a7 [Validator] fixed: Expressions always valid for null values
2014-08-31 05:42:10 +02:00
Fabien Potencier
94990a2769 minor #11707 [Validator] Test that validateProperty() works if no constraint is defined (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Test that validateProperty() works if no constraint is defined

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (2.3 has to be merged into 2.5 first)
| Fixed tickets | #11604, #11614
| License       | MIT
| Doc PR        |

Adds a test case for #11604 to avoid regressions. The actual issue has been fixed in Symfony 2.3 with the merge of #11615.

Commits
-------

a47a884 add test for #11604
2014-08-31 05:34:15 +02:00
Fabien Potencier
c00c8fd70a minor #11684 [DX] Removed strict alias name check (WouterJ)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[DX] Removed strict alias name check

Symfony allows to change the DI alias by overriding `Extension#getAlias()`, but it does throw an exception when it is anything else than the default. That doesn't sound nice and it makes it harder to change the alias. This can result in problems when the bundle is called WouterJEloquentBundle for instance (which has a default alias of `wouter_j_eloquent_bundle`, where I want it to be `wouterj_eloquent_bundle`).

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

Commits
-------

69d71c1 Made the exception message nicer
2014-08-31 05:32:49 +02:00
Fabien Potencier
bdb01a68d2 bug #11772 [Filesystem] Add FTP stream wrapper context option to enable overwrite (Damian Sromek)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11772).

Discussion
----------

[Filesystem] Add FTP stream wrapper context option to enable overwrite

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

Without this change it's not possible to override a file on FTP by calling Filesystem::copy($originFile, $targetFile, true) as PHP/FTP server responds with error like:

fopen(ftp://...@ftp/file.txt): failed to open stream: Remote file already exists and overwrite context option not specified FTP server reports 213 166440 []

TODO: Write an integration tests? How? Use some real FTP server?

Commits
-------

c056a9c [Filesystem] Add FTP stream wrapper context option to enable overwrite (override)
2014-08-31 05:30:41 +02:00
Damian Sromek
c056a9c426 [Filesystem] Add FTP stream wrapper context option to enable overwrite (override) 2014-08-31 05:30:23 +02:00
Fabien Potencier
4b53873d7a Merge branch '2.5'
* 2.5:
  fix typos
  [HttpKernel] add use statement for phpdoc
  fixed DateComparator if file does not exist
  Disabled the PHPUnit self-update on Travis
  fix mustRun() in sigchild environments
  [ClassLoader] simplified phpdoc
  [ClassLoader] Add a __call() method to XcacheClassLoader
  fix some minor typos in tests
  [Yaml] fixed mapping keys containing a quoted #
  Added fixture to test parsing of hash keys ending with a space and #
  [Validator] Pass strict argument into the strict email validator
  [Filesystem Component] mkdir race condition fix #11626
  [Validator] reverted permissions change on translation files
  Fixed Factory services not within the ServiceReferenceGraph.
  [CssSelector] Fix URL to SimonSapin/cssselect repo
  [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
  Remove hard dependency of RequestContext in AssetsExtension
  added useful reminder about form.vars.errors into UPGRADE-2.5 notes
  [YAML] resolve variables in inlined YAML
  Disallow abstract definitions from doctrine event listener registration

Conflicts:
	src/Symfony/Component/Yaml/Inline.php
	src/Symfony/Component/Yaml/Parser.php
	src/Symfony/Component/Yaml/Tests/InlineTest.php
2014-08-31 05:28:38 +02:00
Fabien Potencier
6ff62cc675 Merge branch '2.4' into 2.5
* 2.4:
  fix typos
  [HttpKernel] add use statement for phpdoc
  Disabled the PHPUnit self-update on Travis
  [ClassLoader] simplified phpdoc
  [ClassLoader] Add a __call() method to XcacheClassLoader
  fix some minor typos in tests
  [Yaml] fixed mapping keys containing a quoted #
  Added fixture to test parsing of hash keys ending with a space and #
  [Filesystem Component] mkdir race condition fix #11626
  [Validator] reverted permissions change on translation files
  Fixed Factory services not within the ServiceReferenceGraph.
  [CssSelector] Fix URL to SimonSapin/cssselect repo
  [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
  [YAML] resolve variables in inlined YAML
  Disallow abstract definitions from doctrine event listener registration

Conflicts:
	src/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
	src/Symfony/Component/Yaml/Inline.php
2014-08-31 05:22:04 +02:00
Fabien Potencier
e99dfdf87a Merge branch '2.3' into 2.4
* 2.3:
  [HttpKernel] add use statement for phpdoc
  Disabled the PHPUnit self-update on Travis
  [ClassLoader] simplified phpdoc
  [ClassLoader] Add a __call() method to XcacheClassLoader
  fix some minor typos in tests
  [Yaml] fixed mapping keys containing a quoted #
  Added fixture to test parsing of hash keys ending with a space and #
  [Filesystem Component] mkdir race condition fix #11626
  [Validator] reverted permissions change on translation files
  Fixed Factory services not within the ServiceReferenceGraph.
  [CssSelector] Fix URL to SimonSapin/cssselect repo
  [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
  [YAML] resolve variables in inlined YAML
  Disallow abstract definitions from doctrine event listener registration

Conflicts:
	src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php
	src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php
	src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php
	src/Symfony/Component/Filesystem/Filesystem.php
2014-08-31 05:18:18 +02:00
Fabien Potencier
fb3be10089 minor #11804 fix typos (Tobion)
This PR was merged into the 2.4 branch.

Discussion
----------

fix typos

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

Commits
-------

e91269b fix typos
2014-08-31 05:02:59 +02:00
Tobias Schultze
e91269bd7c fix typos 2014-08-30 22:47:12 +02:00
WouterJ
69d71c17dc Made the exception message nicer 2014-08-30 19:12:40 +02:00
Fabien Potencier
06de353635 bug #11791 [Process] fix mustRun() in sigchild environments (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[Process] fix mustRun() in sigchild environments

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

When being run in sigchild environments, the sigchild compatibility mode needs to be enabled to be able to call `getExitCode()`. Since `mustRun()` uses `getExitCode()` to determine whether or not a process terminated successfully, it cannot be used in sigchild environments when the sigchild compatibility mode is disabled.

Commits
-------

b764f6c fix mustRun() in sigchild environments
2014-08-30 09:50:17 +02:00