Commit Graph

14233 Commits

Author SHA1 Message Date
Fabien Potencier
1003c39a10 uncommented a commented test 2013-05-10 11:39:39 +02:00
Fabien Potencier
5b6da97c49 merged branch alexpods/guess_client_extension_fix (PR #7990)
This PR was squashed before being merged into the master branch (closes #7990).

Discussion
----------

[HttpFoundation][File][UploadedFile] Fix guessClientExtension() method

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

1) Change getMimeType() by getClientMimeType() (we are guessing extension based on client information after all)
2) Add use of missing namespace (ExtensionGuesser)
3) Add tests for getClientExtension() method

Commits
-------

be42dbc [HttpFoundation][File][UploadedFile] Fix guessClientExtension() method
2013-05-10 08:00:03 +02:00
alexpods
be42dbc82a [HttpFoundation][File][UploadedFile] Fix guessClientExtension() method 2013-05-10 08:00:03 +02:00
Fabien Potencier
db8a25b331 merged branch stof/composer_replace (PR #7995)
This PR was merged into the master branch.

Discussion
----------

Added the replace constraint for ProxyManagerBridge

Commits
-------

912a383 Added the replace constraint for ProxyManagerBridge
2013-05-10 07:53:16 +02:00
Christophe Coevoet
912a383c5f Added the replace constraint for ProxyManagerBridge 2013-05-10 01:04:29 +02:00
Fabien Potencier
7fc0768b48 merged branch fabpot/console-fix (PR #7982)
This PR was merged into the master branch.

Discussion
----------

Console fix

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes (possibly)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony/symfony-standard#256
| License       | MIT
| Doc PR        | n/a

Everything is explained in the commits.

Commits
-------

bd0c48c [Console] moved the IO configuration to its own method
fdb4b1f [Console] moved --help support to allow proper behavior with other passed options
2013-05-09 15:01:06 +02:00
Fabien Potencier
d8d38e33f6 merged branch jakzal/httpkernel-tests-fix (PR #7984)
This PR was merged into the master branch.

Discussion
----------

[HttpKernel] Fixed ContainerAwareHttpKernelTest

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes, although not all of them yet (security tests fail on PHP 5.3.3)
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

d5e7bdf [HttpKernel] Fixed ContainerAwareHttpKernelTest.
2013-05-09 13:25:34 +02:00
Jakub Zalas
d5e7bdf5ee [HttpKernel] Fixed ContainerAwareHttpKernelTest. 2013-05-09 11:31:24 +01:00
Fabien Potencier
bd0c48cc00 [Console] moved the IO configuration to its own method
The IO configuration was also moved earlier in the process so that
options are taken into account as early as possible.

That's useful for instance in Symfony FrameworkBundle, where
commands are registered in the doRun() method. If an exception
occurs during registration, the -q, -v, ... options would not
have any effect.
2013-05-09 11:00:31 +02:00
Fabien Potencier
fdb4b1fd75 [Console] moved --help support to allow proper behavior with other passed options 2013-05-09 10:42:56 +02:00
Fabien Potencier
af4c9d6626 merged branch tucksaun/patch-1 (PR #7952)
This PR was submitted for the 2.1 branch but it was merged into the master branch instead (closes #7952).

Discussion
----------

[TwigBridge] Make getNodeVisitors call getTranslationNodeVisitor()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Applies to | 2.1+
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Commits
-------

20977e2 [TwigBridge] Eased translationNodeVisitor overriding in TranslationExtension
2013-05-09 10:16:05 +02:00
Tugdual Saunier
dd0e138f8c Eased translationNodeVisitor overriding in TranslationExtension 2013-05-09 10:16:05 +02:00
Fabien Potencier
eceec63402 merged branch dlsniper/translation-update (PR #7980)
This PR was merged into the master branch.

Discussion
----------

[Validator] Updated translation

| 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

This updates the Romanian translations to match the latest changes.

Commits
-------

3532f2d Updated translation
2013-05-09 10:09:53 +02:00
Fabien Potencier
853f681957 fixed request scope issues (refs #7457) 2013-05-09 09:53:36 +02:00
Florin Patan
3532f2de28 Updated translation 2013-05-09 10:15:42 +03:00
Fabien Potencier
e9bd48e9b2 made the dist autoloader to return the autoloder 2013-05-09 09:12:11 +02:00
Fabien Potencier
642c610189 merged branch ikerib/basque-trans (PR #7975)
This PR was merged into the master branch.

Discussion
----------

[Validator] Basque translations for new validators from #790

Commits
-------

971f551 Basque translations for new validators from #790
2013-05-08 13:03:39 +02:00
ikerib
971f5511e0 Basque translations for new validators from #790 2013-05-08 12:34:44 +02:00
Fabien Potencier
11b0758fbb merged branch hason/czech_validator (PR #7970)
This PR was merged into the master branch.

Discussion
----------

[Validator] Updated czech translation of comparison validators

Commits
-------

1416595 [Validator] Updated czech translation of comparison validators
2013-05-07 21:21:26 +02:00
Martin Hasoň
141659588a [Validator] Updated czech translation of comparison validators 2013-05-07 21:07:22 +02:00
Fabien Potencier
daa84d01b9 merged branch ricoli/master (PR #7966)
This PR was merged into the master branch.

Discussion
----------

[Validator] Added Portuguese translation for the comparison validators

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

Commits
-------

759ed17 [Validator] Added Portuguese translation for the comparison validators
2013-05-07 16:25:12 +02:00
Ricardo Oliveira
759ed17b25 [Validator] Added Portuguese translation for the comparison validators 2013-05-07 15:16:53 +01:00
Fabien Potencier
758e886267 merged branch vitaliytv/patch-1 (PR #7949)
This PR was merged into the master branch.

Discussion
----------

[Validator] Update validators.uk.xlf

append translation

Commits
-------

7bc9e09 Update validators.uk.xlf
2013-05-07 12:06:41 +02:00
Fabien Potencier
14cb1fa3d0 Merge branch '2.2'
* 2.2:
  bumped Symfony version to 2.1.11-DEV
  updated VERSION for 2.1.10
  update CONTRIBUTORS for 2.1.10
  updated CHANGELOG for 2.1.10
  fixed CS
  [Process] Cleanup tests & prevent assertion that kills randomly Travis-CI
  [Filesystem] Fix regression introduced in 10dea948

Conflicts:
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
2013-05-06 22:03:44 +02:00
Fabien Potencier
66433c5626 Merge branch '2.1' into 2.2
* 2.1:
  bumped Symfony version to 2.1.11-DEV
  updated VERSION for 2.1.10
  update CONTRIBUTORS for 2.1.10
  updated CHANGELOG for 2.1.10
  fixed CS
  [Process] Cleanup tests & prevent assertion that kills randomly Travis-CI
  [Filesystem] Fix regression introduced in 10dea948

Conflicts:
	src/Symfony/Component/Form/Extension/Core/DataTransformer/DataTransformerChain.php
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php
	src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
2013-05-06 22:02:13 +02:00
Fabien Potencier
17a214a1c7 bumped Symfony version to 2.1.11-DEV 2013-05-06 21:45:53 +02:00
Vitaliy Tverdokhlib
7bc9e09b35 Update validators.uk.xlf
append translation
2013-05-06 15:29:08 +03:00
Fabien Potencier
7cced0a0e8 updated VERSION for 2.1.10 2013-05-06 13:01:51 +02:00
Fabien Potencier
1b03681045 update CONTRIBUTORS for 2.1.10 2013-05-06 13:01:36 +02:00
Fabien Potencier
4db4e6243d updated CHANGELOG for 2.1.10 2013-05-06 13:00:54 +02:00
Fabien Potencier
9f522de0d5 fixed CS 2013-05-06 12:48:41 +02:00
Fabien Potencier
de98954016 merged branch stloyd/bugfix/process_tests (PR #7947)
This PR was merged into the 2.1 branch.

Discussion
----------

[Process] Cleanup tests & prevent assertion that kills randomly Travis-CI

Commits
-------

05b987f [Process] Cleanup tests & prevent assertion that kills randomly Travis-CI
2013-05-06 12:36:22 +02:00
Fabien Potencier
991829ca52 merged branch stloyd/bugfix/fix_regression (PR #7944)
This PR was merged into the 2.1 branch.

Discussion
----------

[Filesystem] Fix regression introduced in 10dea94

This is one of ideas to fix the regression from 10dea948, @kachkaev what do you think?

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature? | no
| Tests pass?  | yes
| Fixed tickets | #7920
| License       | MIT

Commits
-------

e4913f8 [Filesystem] Fix regression introduced in 10dea948
2013-05-06 12:30:15 +02:00
Joseph Bielawski
05b987f381 [Process] Cleanup tests & prevent assertion that kills randomly Travis-CI 2013-05-06 12:21:56 +02:00
Joseph Bielawski
e4913f8f04 [Filesystem] Fix regression introduced in 10dea948 2013-05-06 12:06:16 +02:00
Fabien Potencier
4196fea090 merged branch Ocramius/hotfix/issue-#7945 (PR #7946)
This PR was merged into the master branch.

Discussion
----------

Dependency check should be on ProxyManager directly - fixes #7945

Hotfix for #7945 and symfony/symfony-standard#542

Yes yes, I know, the headers - coming after meeting time

Commits
-------

0aeed90 Dependency check should be on ProxyManager directly - fixes #7945
2013-05-06 11:55:27 +02:00
Marco Pivetta
0aeed90e9a Dependency check should be on ProxyManager directly - fixes #7945 2013-05-06 11:51:21 +02:00
Fabien Potencier
f1c227be22 Merge branch '2.2'
* 2.2:
  added additional tests to cover invalid argument exceptions in OutputFormatterStyle component
  added a missing check for the provider key
  [Validator] fixed wrong URL for XSD
  [Validator] Fixed: $traverse and $deep is passed to the visitor from Validator::validate()
  [Form] Fixed transform()/reverseTransform() to always throw TransformationFailedExceptions
  [Form] Fixed: String validation groups are never interpreted as callbacks
  if the repository method returns an array ensure that it's internal poin...
  [Form] Improved multi-byte handling of NumberToLocalizedStringTransformer
  Fix wrong method in findTaggedServiceIds(), add example to docblock.

Conflicts:
	src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToBooleanArrayTransformer.php
	src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php
2013-05-06 10:44:35 +02:00
Fabien Potencier
b9bc5b4770 Merge branch '2.1' into 2.2
* 2.1:
  added additional tests to cover invalid argument exceptions in OutputFormatterStyle component
  added a missing check for the provider key
  [Validator] fixed wrong URL for XSD
  [Form] Fixed transform()/reverseTransform() to always throw TransformationFailedExceptions
  [Form] Fixed: String validation groups are never interpreted as callbacks
  if the repository method returns an array ensure that it's internal poin...
  Fix wrong method in findTaggedServiceIds(), add example to docblock.

Conflicts:
	src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php
	src/Symfony/Component/Form/Extension/Core/DataTransformer/DataTransformerChain.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoicesToValuesTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToArrayTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php
2013-05-06 10:37:50 +02:00
Fabien Potencier
59867f921e merged branch fabpot/yaml-optim (PR #7935)
This PR was merged into the master branch.

Discussion
----------

made some optimization when parsing YAML files

| 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

This change makes a small speed optimization when loading a YAML file, but more important, it allows to use local stream wrappers instead of regular files on the filesystem.

Commits
-------

0586c7e made some optimization when parsing YAML files
2013-05-06 10:32:05 +02:00
Fabien Potencier
6604ff8719 merged branch pborreli/patch-9 (PR #7943)
This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] Reverted a part of #7931

refs: #7931

Commits
-------

09c2114 Reverted a part of f5e7f24819
2013-05-06 10:31:17 +02:00
Fabien Potencier
31a35aa8a6 tweaked previous merge 2013-05-06 10:30:13 +02:00
Pascal Borreli
09c21148be Reverted a part of f5e7f24819 2013-05-06 10:11:45 +02:00
Fabien Potencier
dfd605fc1b merged branch Ocramius/feature/proxy-manager-bridge (PR #7890)
This PR was squashed before being merged into the master branch (closes #7890).

Discussion
----------

ProxyManager Bridge

As of @beberlei's suggestion, I re-implemented #7527 as a new bridge to avoid possible hidden dependencies.

Everything is like #7527 except that the new namespace (and possibly package/subtree split) `Symfony\Bridge\ProxyManager` is introduced

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6140 (supersedes) #5012 #6102 (maybe) #7527 (supersedes)
| License       | MIT (attached code) - BSD-3-Clause (transitive dependency)
| Doc PR        | Please pester me to death so I do it

This PR introduces lazy services along the lines of zendframework/zf2#4146

It introduces an **OPTIONAL** dependency to [ProxyManager](https://github.com/Ocramius/ProxyManager) and transitively to [`"zendframework/zend-code": "2.*"`](https://github.com/zendframework/zf2/tree/master/library/Zend/Code).

## Lazy services: why? A comprehensive example

For those who don't know what this is about, here's an example.

Assuming you have a service class like following:

```php
class MySuperSlowClass
{
    public function __construct()
    {
        // inject large object graph or do heavy computation
        sleep(10);
    }

    public function doFoo()
    {
        echo 'Foo!';
    }
}
```

The DIC will hang for 10 seconds when calling:

```php
$container->get('my_super_slow_class');
```

With this PR, this can be avoided, and the following call will return a proxy immediately.

```php
$container->getDefinitions('my_super_slow_class')->setLazy(true);
$service = $container->get('my_super_slow_class');
```

The 10 seconds wait time will be delayed until the object is actually used:

```php
$service->doFoo(); // wait 10 seconds, then 'Foo!'
```

A more extensive description of the functionality can be found [here](https://github.com/Ocramius/ProxyManager/blob/master/docs/lazy-loading-value-holder.md).

## When do we need it?

Lazy services can be used to optimize the dependency graph in cases like:

 * Webservice endpoints
 * Db connections
 * Objects that cause I/O in general
 * Large dependency graphs that are not always used

This could also help in reducing excessive service location usage as I've explained [here](http://ocramius.github.com/blog/zf2-and-symfony-service-proxies-with-doctrine-proxies/).

## Implementation quirks of this PR

There's a couple of quirks in the implementation:

 * `Symfony\Component\DependencyInjection\CompilerBuilder#createService` is now public because of the limitations of PHP 5.3
 * `Symfony\Component\DependencyInjection\Dumper\PhpDumper` now with extra mess!
 * The proxies are dumped at the end of compiled containers, therefore the container class is not PSR compliant anymore

Commits
-------

78e3710 ProxyManager Bridge
2013-05-06 08:38:39 +02:00
Marco Pivetta
78e3710de8 ProxyManager Bridge 2013-05-06 08:38:39 +02:00
Stefan Warman
7deb923236 added additional tests to cover invalid argument exceptions in OutputFormatterStyle component 2013-05-06 08:31:43 +02:00
Fabien Potencier
e0d2065344 fixed CS 2013-05-06 08:26:30 +02:00
Fabien Potencier
616e0ac2f9 merged branch entering/crawler-add-node-argument (PR #7924)
This PR was squashed before being merged into the master branch (closes #7924).

Discussion
----------

[Crawler] Add proper validation of node argument of method add

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

Crawler method add, fix PHPdoc and

Commits
-------

41805c0 [Crawler] Add proper validation of node argument of method add
2013-05-06 08:24:44 +02:00
entering
41805c042d [Crawler] Add proper validation of node argument of method add 2013-05-06 08:24:44 +02:00
Fabien Potencier
87cc7dc2a8 merged branch Seldaek/methodmap (PR #7933)
This PR was merged into the master branch.

Discussion
----------

[DependencyInjection] Add a method map to avoid computing method names from service names

/cc @schmittjoh @stof

The diff is a bit messy because of indenting, but all this adds really is an `if(isset($this->methodMap[$id])) { $method = $this->methodMap[$id]; }` that bypasses the method_exists + strtr calls. It's not a huge improvements but saves some cycles on something that's typically called a few hundred times per request.

Commits
-------

f1c2ab7 [DependencyInjection] Add a method map to avoid computing method names from service names
2013-05-06 08:21:51 +02:00