Commit Graph

15074 Commits

Author SHA1 Message Date
Fabien Potencier
7eaaec1468 [FrameworkBundle] made code more generic 2013-08-09 14:53:54 +02:00
Fabien Potencier
3248c1b3e0 merged branch Tatsh/di-cache-namespace (PR #8639)
This PR was squashed before being merged into the master branch (closes #8639).

Discussion
----------

[DoctrineBridge] [ORM] Use custom cache namespace option if it is specified

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

This allows an option `namespace` to be used instead of having Symfony generate the hash. If the option is not set, the original behaviour will occur.

While this code will execute on the current version, this change depends on https://github.com/doctrine/DoctrineBundle/pull/198 to fully work.

Commits
-------

e6687d9 [DoctrineBridge] [ORM] Use custom cache namespace option if it is specified
2013-08-09 14:50:40 +02:00
Andrew Udvare
e6687d9d51 [DoctrineBridge] [ORM] Use custom cache namespace option if it is specified 2013-08-09 14:50:38 +02:00
Fabien Potencier
2b2c1167ef merged branch jakzal/2.3-form-button-fix (PR #8349)
This PR was squashed before being merged into the 2.3 branch (closes #8349).

Discussion
----------

[Form] Moved auto_initialize option to the BaseType

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

I'm not fully confident in this change, so let someone review it before mergin please. My thinking was - since "auto_initialized" option is always passed to a form factory, it should be required by the base type.

Commits
-------

6ed0fdf [Form] Moved auto_initialize option to the BaseType
2013-08-09 14:45:16 +02:00
Jakub Zalas
6ed0fdfda4 [Form] Moved auto_initialize option to the BaseType 2013-08-09 14:45:15 +02:00
William DURAND
50435aad80 [Propel1] Refactor PropelLogger
Implement BasicLogger interface (Propel)
2013-08-09 12:07:54 +02:00
Fabien Potencier
728d194d23 merged branch deeky666/fix-filesystem-exception-message (PR #8587)
This PR was squashed before being merged into the master branch (closes #8587).

Discussion
----------

[Filesystem] fixed exception message when not a able to write to a directory

| 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

This simply fixes an exception message in the Filesystem Component when a directory is not writable while dumping a file via `dumpFile()`.

Commits
-------

8b32a4b [Filesystem] fixed exception message when not a able to write to a directory
2013-08-09 09:26:54 +02:00
Steve Müller
8b32a4ba9b [Filesystem] fixed exception message when not a able to write to a directory 2013-08-09 09:26:54 +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
Fabien Potencier
af2bb343ef merged branch romainneutron/process-array-prefixes (PR #8179)
This PR was submitted for the 2.3 branch but it was merged into the master branch instead (closes #8179).

Discussion
----------

[2.3][Process] Add possibility to use array prefixes

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

This can be useful to use `'/opt/custom-php/bin/php' 'composer.phar'` as a prefix, it is not possible with the current implementation.

I submit the patch on 2.3 as `ProcessBuilder::setPrefix` method has been added for release 2.3. If it's too late for such modification, let me know, I'll open the PR against master.

Commits
-------

ab4812f [Process] Add possibility to use array prefixes
2013-08-09 09:03:53 +02:00
Romain Neutron
b28d280b1e Add possibility to use array prefixes
This can be useful to use /opt/custom-php/bin/php composer.phar as a prefix, it is not possible with the current implementation
2013-08-09 09:03:52 +02:00
Fabien Potencier
2f34c052b1 merged branch Tobion/cast-optimization (PR #8201)
This PR was submitted for the 2.3 branch but it was merged into the master branch instead (closes #8201).

Discussion
----------

Cast optimization

bc break: no
test pass: yes

I searched for some unneeded casts esp. for `$array[(string) $stringOrInteger]`. But found only a few. When doing so I mainly fixed some phpdocs.

Commits
-------

2c41a31 [Serializer] fix phpdoc and add typehints to private methods
ebe7015 optimize some unneeded casts (esp. when casting something to string for array access)
2013-08-09 08:59:23 +02:00
Tobias Schultze
869fd2c6e5 fix phpdoc and add typehints to private methods 2013-08-09 08:59:22 +02:00
Tobias Schultze
49c4a79a1d optimize some unneeded casts (esp. when casting something to string for array access) 2013-08-09 08:59:22 +02:00
Fabien Potencier
0f16673765 fixed typo 2013-08-09 08:03:04 +02:00
Fabien Potencier
041b04feb9 merged branch lyrixx/console-verbosity (PR #8640)
This PR was squashed before being merged into the master branch (closes #8640).

Discussion
----------

[Console] Added more semantic commands to detect verbosity

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

Commits
-------

0fa3a74 [Console] Added more semantic commands to detect verbosity
2013-08-09 08:02:40 +02:00
Grégoire Pineau
0fa3a7475f [Console] Added more semantic commands to detect verbosity 2013-08-09 08:01:50 +02:00
Fabien Potencier
11393def7e merged branch lyrixx/console-set-dimension (PR #8603)
This PR was squashed before being merged into the master branch (closes #8603).

Discussion
----------

[Console] Added a way to set terminal dimensions

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

Commits
-------

ce32981 [Console] Added a way to set terminal dimensions
2013-08-09 08:00:31 +02:00
Grégoire Pineau
ce329815d5 [Console] Added a way to set terminal dimensions 2013-08-09 08:00:31 +02:00
Fabien Potencier
059fc48685 merged branch kriswallsmith/kernel/is-master-request (PR #8702)
This PR was merged into the master branch.

Discussion
----------

[HttpKernel] added convenience method $event->isMasterRequest()

Prettier code and easier mocking.

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

Commits
-------

554f95f [HttpKernel] added $event->isMasterRequest()
2013-08-09 07:57:13 +02:00
Kris Wallsmith
554f95fd9f [HttpKernel] added $event->isMasterRequest() 2013-08-08 14:41:21 -07:00
Fabien Potencier
0d16f5dd45 merged branch ShiraNai7/master (PR #8688)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #8688).

Discussion
----------

[Debug] Make sure ContextErrorException is loaded during compile time errors

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

### Description

When the `ErrorHandler->handle()` attempts to throw a `ContextErrorException` the script might die with a Fatal Error because the class is not found.

    FatalErrorException: Error: Class 'Symfony\Component\Debug\Exception\ContextErrorException' not found in ...

That effectively hides the original error and causes confusion.

### Cause

The cause is a bug/limitation of PHP that makes class autoloading completely inactive during "compiling".

Relevant PHP source code in `zend_execute_API.c`:

    /* The compiler is not-reentrant. Make sure we __autoload() only during run-time
     * (doesn't impact functionality of __autoload()
    */
    if (!use_autoload || zend_is_compiling(TSRMLS_C)) {

#### More information about the PHP bug/limitation:
- https://bugs.php.net/bug.php?id=65322
- many duplicates/relevant: https://www.google.com/search?btnG=1&pws=0&q=site%3Abugs.php.net+autoload+error+handling

### The fix

The most simple way to fix this is to manually ensure that `ContextErrorException` is loaded and if not, load it. This is what I did.

Another way is to detect if autoloading is available (possible by prepending a temporary autoloader) and act accordingly (how?).

### The test

I also added a test case that would fail with a fatal error if the error handler does not successfully throw an exception in case of a compile time error. But I'm not sure if this is the best way or if there should be a test case at all.

###

Commits
-------

b0082ab [Debug] Make sure ContextErrorException is loaded during compile time errors
2013-08-08 16:16:27 +02:00
ShiraNai7
e47657dba1 Make sure ContextErrorException is loaded during compile time errors 2013-08-08 16:16:10 +02:00
Fabien Potencier
ffe5567955 merged branch EmmanuelVella/validators (PR #8577)
This PR was merged into the 2.3 branch.

Discussion
----------

Validators

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

This PR avoid comparison validators to be executed if the compared value is null.

Commits
-------

48338fc Ignore null value in comparison validators
2013-08-08 16:01:12 +02:00
Fabien Potencier
fa2c71adf7 merged branch helmer/processutils_patch (PR #8691)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #8691).

Discussion
----------

[Process] Fix empty process argument escaping on Windows

PR #6796 introduced a regression on Windows platform (symfony 2.3.0+), forgetting to escape explicitly requested empty arguments to ```""``` and return an empty string instead.

This behaviour is imo unintended and renders the component unusable for corner-cases, where you indeed want to specify an empty argument. One good example of this is assetic and compass, which (up to this day) relies on existence of empty parameters on windows.

Some panic and related links on the topic:
https://github.com/kriswallsmith/assetic/issues/455
https://github.com/kriswallsmith/assetic/pull/471
http://stackoverflow.com/questions/17001517/symfony2-3-with-compass ([diff](http://marker.to/KrctHM))
http://stackoverflow.com/questions/17135219/symfony-2-compass-with-assetic-on-windows-xp

Please consider a merge to master and a backport to 2.3.x

Commits
-------

a91537a Fix empty process argument escaping on Windows
2013-08-08 14:56:07 +02:00
Helmer Aaviksoo
98f6969e9c Fix empty process argument escaping on Windows 2013-08-08 14:56:07 +02:00
Joseph Bielawski
0d07af896b [BrowserKit] Pass headers when followRedirect() is called 2013-08-08 14:24:29 +02:00
Fabien Potencier
5cbfe302c2 merged branch gnugat/dic-test-constants (PR #8663)
This PR was squashed before being merged into the master branch (closes #8663).

Discussion
----------

[DependencyInjection] Test constants

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

Added a test for constant support in XML configuration files.
Related PR: #8661

Commits
-------

9acedb7 [DependencyInjection] Test constants
2013-08-08 14:16:00 +02:00
Loïc Chardonnet
9acedb7227 [DependencyInjection] Test constants 2013-08-08 14:16:00 +02:00
Fabien Potencier
fa1d7f540a Merge branch '2.3'
* 2.3:
  added missing support for the new output API in PHP 5.4+
  Fixed bug introduced in #8675
  made the filesystem loader compatible with Twig 2.0
  bumped Symfony version to 2.3.4-DEV
  updated VERSION for 2.3.3
  updated CHANGELOG for 2.3.3
  bumped Symfony version to 2.2.6
  updated VERSION for 2.2.5
  update CONTRIBUTORS for 2.2.5
  updated CHANGELOG for 2.2.5
  [Intl] Updated stubs to reflect ICU 51.2
  replaced deprecated Twig features

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2013-08-08 14:02:55 +02:00
Fabien Potencier
b463a70d73 Merge branch '2.2' into 2.3
* 2.2:
  added missing support for the new output API in PHP 5.4+
  Fixed bug introduced in #8675
  made the filesystem loader compatible with Twig 2.0
  bumped Symfony version to 2.2.6
  updated VERSION for 2.2.5
  update CONTRIBUTORS for 2.2.5
  updated CHANGELOG for 2.2.5
  replaced deprecated Twig features

Conflicts:
	src/Symfony/Bridge/Twig/Extension/FormExtension.php
	src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
	src/Symfony/Component/HttpKernel/Kernel.php
2013-08-08 14:02:32 +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
Fabien Potencier
227e1dd7cb merged branch iteman/support_for_php_new_output_api (PR #8692)
This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] add missing support for the new output API in PHP 5.4...

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

As of PHP 5.4, the new output API has been introduced:

* https://github.com/php/php-src/blob/master/README.NEW-OUTPUT-API
* 11d24c1593
* https://bugs.php.net/bug.php?id=64977

Commits
-------

188c0ce [HttpFoundation] added missing support for the new output API in PHP 5.4+
2013-08-08 13:53:27 +02:00
WouterJ
e0c7d3d477 Fixed bug introduced in #8675 2013-08-08 13:31:08 +02:00
Fabien Potencier
cb03a54348 merged branch hacfi/security_profiler_tpl (PR #8673)
This PR was merged into the master branch.

Discussion
----------

Adapt security collector template name to webprofiler conventions

| Q             | A
| ------------- | ---
| Bug fix?      | no, but syntax consistency & future compatibility(?)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | fabpot/Twig#1156 which was reverted but will be merged in the future
| License       | MIT

Use Twig namespace syntax instead of bundle syntax for security webprofiler template to be consistent with @WebProfiler template names.

Commits
-------

66c792b Adapt security collector template name to webprofiler conventions
2013-08-08 13:01:03 +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
879e271fb8 merged branch bschussek/icu51 (PR #8680)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Updated stubs to reflect ICU 51.2

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

In addition to the upgrade of the ICU component to ICU 51.2, this PR upgrades the stub classes to behave like their C counterparts do with ICU 51.2.

Commits
-------

8fa0453 [Intl] Updated stubs to reflect ICU 51.2
2013-08-08 12:59:14 +02:00
KUBO Atsuhiro
188c0ce624 [HttpFoundation] added missing support for the new output API in PHP 5.4+ 2013-08-08 15:56:17 +09:00
Fabien Potencier
6cc192957d bumped Symfony version to 2.3.4-DEV 2013-08-07 20:24:25 +02:00
Fabien Potencier
17aefe6c8e updated VERSION for 2.3.3 2013-08-07 19:11:16 +02:00
Fabien Potencier
4369af2fc8 updated CHANGELOG for 2.3.3 2013-08-07 19:11:00 +02:00
Fabien Potencier
1bd67a5221 bumped Symfony version to 2.2.6 2013-08-07 19:08:15 +02:00
Fabien Potencier
88a6833e17 updated VERSION for 2.2.5 2013-08-07 17:57:43 +02:00
Fabien Potencier
6a3e850aea update CONTRIBUTORS for 2.2.5 2013-08-07 17:57:21 +02:00
Fabien Potencier
318c580ec0 updated CHANGELOG for 2.2.5 2013-08-07 17:56:56 +02:00
Fabien Potencier
57531d47bd Merge branch '2.3'
* 2.3:
  added trusted hosts check
2013-08-07 16:02:33 +02:00