Commit Graph

12039 Commits

Author SHA1 Message Date
Victor Berchet
aab60e33a9 [HttpKernel] fix public Kernel::stripComments() 2012-12-13 17:56:02 +01:00
Fabien Potencier
7200703089 fixed CS 2012-12-11 15:06:57 +01:00
Fabien Potencier
8bbc64d3ec merged branch robqu/patch-progressbar (PR #6266)
This PR was merged into the master branch.

Commits
-------

ea74610 jumping progress bar fix for windows & unix
6a0ee27 [Console] fixed progress bar jumping

Discussion
----------

[Console] fixed progress bar jumping for windows & unix env

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

---------------------------------------------------------------------------

by pborreli at 2012-12-11T13:58:25Z

Good implementation but could you please check http://symfony.com/doc/current/contributing/code/standards.html
2012-12-11 15:05:51 +01:00
Robert Queck
ea74610723 jumping progress bar fix for windows & unix 2012-12-11 14:31:22 +01:00
Fabien Potencier
51bcb6e7ee merged branch Tobion/collection-api (PR #6022)
This PR was squashed before being merged into the master branch (closes #6022).

Commits
-------

8c7a169 [Routing] clean up of RouteCollection API

Discussion
----------

[Routing] clean up of RouteCollection API

BC break: only the internal behavior of addPrefix()
Deprecations:
- some params of addCollection and addPrefix that still work but should not be used anymore
- getPrefix (you cannot rely on it how my added test shows that failed previously but was fixed with https://github.com/symfony/symfony/pull/6120/files#L5L109
and it's also useless since we dont have a tree anymore)

Reasoning see commits and changelog.

---------------------------------------------------------------------------

by Tobion at 2012-12-06T19:15:53Z

@fabpot this is finished and rebased. I switched from `addConfigs` to addDefaults(), addRequirements(), and addOptions() as you suggested. I also deprecated getPrefix(). Reasoning see above and in the changelog.
2012-12-11 14:02:38 +01:00
Tobias Schultze
8c7a169a4a [Routing] clean up of RouteCollection API 2012-12-11 14:02:38 +01:00
Fabien Potencier
7464833ece [Filesystem] added a missing CHANGELOG item and fixed some CS 2012-12-11 13:58:05 +01:00
Fabien Potencier
b3c58e7b90 merged branch mylen/master (PR #6014)
This PR was squashed before being merged into the master branch (closes #6014).

Commits
-------

2b13760 [Filesystem] [mirror] added "delete" option

Discussion
----------

[Filesystem] [mirror] added "delete" option

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#123

I added a "delete" option to the mirror function. If set to true, then
files present in target dir and not in origin dir will be removed.

Added also unit test for these feature.

---------------------------------------------------------------------------

by pborreli at 2012-11-16T00:58:19Z

Symfony2 code standard use lowercase `true` and `false`

---------------------------------------------------------------------------

by mylen at 2012-11-16T20:25:19Z

I have problem to believe that the last commit (merging two if together) was to blame for the segfault on  travis...
when I run the unit testing on my machine, I get:

I'm using PHP 5.4.7 by the way...

Time: 2 seconds, Memory: 3.25Mb

OK, but incomplete or skipped tests!
Tests: 80, Assertions: 106, Skipped: 14.

---------------------------------------------------------------------------

by pborreli at 2012-11-16T20:38:40Z

Can you fix end-of-lines ?

---------------------------------------------------------------------------

by mylen at 2012-11-16T20:52:37Z

I put UNIX line feed and UTF8 charset

---------------------------------------------------------------------------

by mylen at 2012-11-16T20:53:59Z

Sorry, I add to clone the symfony repo with github and did small editing using pspad, I forgot to setup charset and line feed...
2012-12-11 13:55:45 +01:00
Alexandre Melard
2b13760e90 [Filesystem] [mirror] added "delete" option 2012-12-11 13:55:45 +01:00
Fabien Potencier
fdb11be242 fixed CS 2012-12-11 11:49:22 +01:00
Fabien Potencier
3c010db2cb Merge branch '2.1'
* 2.1:
  fixed CS
  fixed CS
  [Security] fixed path info encoding (closes #6040, closes #5695)
  [HttpFoundation] added some tests for the previous merge and removed dead code (closes #6037)
  Improved Cache-Control header when no-cache is sent
  removed unneeded comment
  Fix to allow null values in labels array
  fix date in changelog
  removed the Travis icon (as this is not stable enough -- many false positive, closes #6186)
  Revert "merged branch gajdaw/finder_splfileinfo_fpassthu (PR #4751)" (closes #6224)
  Fixed a typo
  Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly
  [Form] Fix const inside an anonymous function
  [Config] Loader::import must return imported data
  [DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed
  [Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text"
  [HttpFoundation] fixed a small regression

Conflicts:
	src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
2012-12-11 11:41:51 +01:00
Fabien Potencier
7f3be5c49d fixed CS 2012-12-11 11:40:22 +01:00
Fabien Potencier
d2885adffe Merge branch '2.0' into 2.1
* 2.0:
  fixed CS
  removed the Travis icon (as this is not stable enough -- many false positive, closes #6186)
  [Config] Loader::import must return imported data
  [HttpFoundation] fixed a small regression

Conflicts:
	README.md
	src/Symfony/Bridge/Twig/Extension/FormExtension.php
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php
	src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
	src/Symfony/Component/Form/Form.php
	src/Symfony/Component/HttpFoundation/Request.php
	src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
	tests/Symfony/Tests/Bridge/Doctrine/Logger/DbalLoggerTest.php
2012-12-11 11:33:11 +01:00
Fabien Potencier
a7cd5f54ef fixed CS 2012-12-11 11:27:06 +01:00
Fabien Potencier
f25750e378 merged branch symfony/deprecated (PR #6232)
This PR was squashed before being merged into the master branch (closes #6232).

Commits
-------

7428bf9 [WebProfilerBundle] Some eye candy for deprecated calls

Discussion
----------

[WebProfilerBundle] Some eye candy for deprecated calls

![Ohhh](https://lh4.googleusercontent.com/-T9DKsHWf4YU/UMIRqT0g_II/AAAAAAAAJ84/tRDRP8IMwRM/s840/stack.jpg).

@fabpot is [`|raw`](https://github.com/symfony/symfony/pull/new/deprecated#L0R117) a twig defect ?

---------------------------------------------------------------------------

by Baachi at 2012-12-08T09:12:12Z

Really nice 👍

---------------------------------------------------------------------------

by vicb at 2012-12-11T10:00:24Z

should be ready now
2012-12-11 11:14:29 +01:00
Victor Berchet
7428bf9aa4 [WebProfilerBundle] Some eye candy for deprecated calls 2012-12-11 11:14:29 +01:00
Fabien Potencier
d6a402a283 [Security] fixed path info encoding (closes #6040, closes #5695) 2012-12-11 10:40:23 +01:00
Fabien Potencier
47dfb9cb6a [HttpFoundation] added some tests for the previous merge and removed dead code (closes #6037) 2012-12-11 10:29:13 +01:00
Florin Patan
1ab492394c Improved Cache-Control header when no-cache is sent 2012-12-11 10:22:17 +01:00
Fabien Potencier
de44087bfd merged branch bamarni/display-errors (PR #6259)
This PR was merged into the master branch.

Commits
-------

5d98fb1 [HttpKernel] ExceptionHandler is actually displaying PHP errors

Discussion
----------

[HttpKernel] ExceptionHandler is actually displaying all PHP errors

So there is no need to set display_errors to true in that case.

Partially fixes #6254.
2012-12-11 10:05:21 +01:00
Fabien Potencier
fe194cb03f merged branch hason/tests_2_2 (PR #6202)
This PR was merged into the master branch.

Commits
-------

abe244f [TwigBundle] Fixed tests on windows

Discussion
----------

[TwigBundle] Fixed tests on windows
2012-12-11 09:58:49 +01:00
Fabien Potencier
e3ef9368df [FrameworkBundle] tweaked previous merge 2012-12-11 09:31:58 +01:00
Fabien Potencier
57b8447ae1 merged branch dantleech/twig_loader_pass (PR #6171)
This PR was merged into the master branch.

Commits
-------

f48b22a Added configuration pass that adds Twig Loaders

Discussion
----------

[Twig] [DI Pass] Added configuration pass that adds Twig Loaders

Bug fix: [no]
Feature addition: [yes]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]
Todo: Documentation?
License of the code: MIT

- Defined new Chain loader service with symfony Filesystem loader added
  by default.
- Added compiler class which picks up any services tagged "twig.loader"
- If there are any instances of "twig.loader" the "twig.loader" alias is
  set to the Twig_Loader_Chain service ID instead of the filesystem
  loader.

I think I still like the explicitness of the other pull request, but I defer to your judgment :) This is certainly much easier for the developer.

---------------------------------------------------------------------------

by dantleech at 2012-12-03T08:31:08Z

Will update the PR later today / tomorrow

---------------------------------------------------------------------------

by dantleech at 2012-12-03T18:19:09Z

ok, updated. I throw a `Symfony\Component\DependencyInjection\Exception\LogicException` if there are no loaders -- not sure if that is the best thing to do, or if that is the best exception.

---------------------------------------------------------------------------

by fabpot at 2012-12-05T15:28:24Z

Looks good to me. Can you add a note in the CHANGELOG about this new possibility and update the documentation accordingly? Thanks.

---------------------------------------------------------------------------

by dantleech at 2012-12-05T17:50:37Z

ok. updated change log and changed both count() comparisons to be strict. @fabpot which documentation should I update? or should I add `cookbook/templating/registering_multiple_loaders.rst`?

---------------------------------------------------------------------------

by stof at 2012-12-05T20:07:37Z

@dantleech at least the DIC tags reference need to be updated to mention the new tag. I'm not sure a dedicated article is needed for it (but @weaverryan will decide if it is worth it)

---------------------------------------------------------------------------

by dantleech at 2012-12-06T17:57:20Z

Made a PR for documentation: https://github.com/symfony/symfony-docs/pull/2005

---------------------------------------------------------------------------

by dantleech at 2012-12-07T16:44:00Z

ok. have updated the correct CHANGELOG and squashed to one commit
2012-12-11 09:30:20 +01:00
Fabien Potencier
f853fc3906 removed unneeded comment 2012-12-11 09:06:32 +01:00
Fabien Potencier
20dd9d9351 merged branch kaywalker/master (PR #5394)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5394).

Commits
-------

08bd95e Fix to allow null values in labels array

Discussion
----------

Fix to allow null values in labels array

Fixed false positives on array key is null

---------------------------------------------------------------------------

by stof at 2012-08-30T19:03:02Z

@kaywalker This is still throwing a notice

---------------------------------------------------------------------------

by bschussek at 2012-08-31T09:13:33Z

Could you please add a test?

---------------------------------------------------------------------------

by fabpot at 2012-10-05T16:52:11Z

@bschussek Is it mergeable now?

---------------------------------------------------------------------------

by bschussek at 2012-10-05T16:58:34Z

The coding conventions in the test are not correct (too much indentation). Also, please reference this PR in a comment to the test. Last, the test should contain assertions to actually check something. Example:

```
    // https://github.com/symfony/symfony/pull/5394
    public function testLabelsContainingNull()
    {
        $this->list = new ChoiceList(
                array($this->obj1, $this->obj2),
                array('A', null)
        );

        $this->assertEquals(array(0 => new ChoiceView($this->obj1, '0', 'A'), 1 => new ChoiceView($this->obj2, '1', null)), $this->list->getRemainingViews());
    }
```

---------------------------------------------------------------------------

by fmeynard at 2012-11-13T17:36:59Z

I just tried the last commit and everything works correctly.
2012-12-11 09:06:04 +01:00
kaywalker
4e909bd016 Fix to allow null values in labels array 2012-12-11 09:06:04 +01:00
Fabien Potencier
a22111b913 merged branch le6o/patch-1 (PR #6260)
This PR was merged into the 2.1 branch.

Commits
-------

bae5cff fix date in changelog

Discussion
----------

fix typo with date in changelog
2012-12-10 20:51:05 +01:00
Martin Ledgard
bae5cffe7e fix date in changelog 2012-12-10 19:38:43 +00:00
Bilal Amarni
5d98fb1248 [HttpKernel] ExceptionHandler is actually displaying PHP errors
Since even fatal errors are catched and turned into exceptions by
ErrorHandler, all PHP errors can nicely be displayed by
ExceptionHandler. There is no need to set display_errors to true
anymore then.

Partially fixes #6254 on github.
2012-12-10 18:52:47 +01:00
Fabien Potencier
5c15496b5c merged branch hason/config_import (PR #6226)
This PR was merged into the 2.0 branch.

Commits
-------

8bb3208 [Config] Loader::import must return imported data

Discussion
----------

[2.0][2.1][2.2] [Config] Loader::import must return imported data

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

---------------------------------------------------------------------------

by fabpot at 2012-12-07T13:40:58Z

why?

---------------------------------------------------------------------------

by hason at 2012-12-07T20:57:06Z

We should support both approaches to importing. The first case assumes shared object accross all the loaders (loading DI configuration) and the second case requires returning of imported object (merging route collections).

---------------------------------------------------------------------------

by stof at 2012-12-07T21:38:42Z

@fabpot As ``load`` can have a return value, this PR makes sense IMO

---------------------------------------------------------------------------

by fabpot at 2012-12-10T12:44:09Z

This change should be done in master then.

---------------------------------------------------------------------------

by stof at 2012-12-10T14:43:18Z

@fabpot I would consider it as a bugfix. The routing loaders are simply broken (as of 2.0) if the loader does not extend from FileLoader (which overwrites the ``import`` method and takes care to return the value). the routing loaders expect to receive the loaded data when importing instead of loosing the imported data entirely: https://github.com/symfony/Routing/blob/2.0/Loader/XmlFileLoader.php#L80
2012-12-10 15:59:31 +01:00
Fabien Potencier
1ec59f174e merged branch vicb/finder-adapters (PR #6253)
This PR was squashed before being merged into the master branch (closes #6253).

Commits
-------

e62b5f7 [Finder] cleanup, fixes, improvements

Discussion
----------

[Finder] cleanup, fixes, improvements
2012-12-10 14:52:40 +01:00
Victor Berchet
e62b5f78af [Finder] cleanup, fixes, improvements 2012-12-10 14:52:39 +01:00
Fabien Potencier
c68dd37c0e removed the Travis icon (as this is not stable enough -- many false positive, closes #6186) 2012-12-10 14:50:56 +01:00
Fabien Potencier
d665584de9 merged branch hason/patch-1 (PR #6222)
This PR was merged into the master branch.

Commits
-------

e458600 [DependencyInjection] Add deleted argument in Extension::processConfiguration

Discussion
----------

[DependencyInjection] Add deleted argument in Extension::processConfigur...

...ation
2012-12-10 13:48:09 +01:00
Fabien Potencier
a1734ddf72 Revert "merged branch gajdaw/finder_splfileinfo_fpassthu (PR #4751)" (closes #6224)
This reverts commit 5608c0c3ee, reversing
changes made to 38c30b71bd.

Conflicts:
	src/Symfony/Component/Finder/SplFileInfo.php
2012-12-10 13:46:54 +01:00
Fabien Potencier
0e2370e65e merged branch Tobion/patch-1 (PR #6237)
This PR was merged into the master branch.

Commits
-------

76e5bce no need to set the compiled route to null when cloning

Discussion
----------

[Routing] no need to set the compiled route to null when cloning

The compiled reference can be reused when cloning. When the route is changed, the compiled reference is set to null anyway. So if you just clone the route, this improves performance as it does not need to recompile.
2012-12-10 13:43:10 +01:00
Fabien Potencier
947a48dbf6 merged branch DenisGorbachev/patch-2 (PR #6240)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6240).

Commits
-------

0f6d534 Fixed a typo

Discussion
----------

Fixed a typo
2012-12-10 13:42:21 +01:00
Denis Gorbachev
9cf1d142b2 Fixed a typo 2012-12-10 13:42:21 +01:00
Fabien Potencier
33cfd02f1f merged branch patrickallaert/HeaderBag/QuotedZeroNotParsedCorrectly (PR #6252)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6252).

Commits
-------

97d9bf0 Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly

Discussion
----------

Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly

When having a Cache-Control header like:

    max-age="0"

```isset($match[2])``` is true but ```$match[2]``` containing: ```"0"```, it is evaluated
as ```false```. The result is that ```true``` will be set to "max-age" entry instead of ```"0"```.
2012-12-10 13:41:09 +01:00
Patrick Allaert
9e4681963d Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly
When having a Cache-Control header like:

    max-age="0"

isset($match[2]) is true but $match[2] containing: "0", it is evaluated
as false and 'true' will be set to "max-age" entry instead of "0".
2012-12-10 13:41:09 +01:00
Fabien Potencier
d63a317b21 merged branch vicb/finder (PR #6249)
This PR was merged into the master branch.

Commits
-------

cc0be8e [Finder] fluid, calling in() not required after append()

Discussion
----------

[Finder] fluid, calling in() not required after append()
2012-12-10 13:39:22 +01:00
Fabien Potencier
d451933ca1 merged branch franmomu/fix_const_in_anonymous_function (PR #6244)
This PR was merged into the 2.1 branch.

Commits
-------

a37e5e3 [Form] Fix const inside an anonymous function

Discussion
----------

[Form] Fix const inside an anonymous function for PHP5.3

Related with the comment in #6217

---------------------------------------------------------------------------

by lsmith77 at 2012-12-10T09:14:20Z

+1 .. would be good to get this merged ASAP // @fabpot @bschussek
2012-12-10 10:16:44 +01:00
Victor Berchet
cc0be8edf2 [Finder] fluid, calling in() not required after append() 2012-12-10 09:52:01 +01:00
Fran Moreno
a37e5e323b [Form] Fix const inside an anonymous function 2012-12-09 23:59:18 +01:00
Tobias Schultze
76e5bce801 no need to set the compiled route to null when cloning 2012-12-07 22:24:45 +01:00
dantleech
f48b22a44e Added configuration pass that adds Twig Loaders
- Added compiler class which picks up any services tagged "twig.loader"
- If there is one loader registered we set the alias to this loader
- If there is more than one we set the alias to a chain loader and all
  the loaders to it
- If there is no loaders we throw an Exception
2012-12-07 17:39:55 +01:00
Fabien Potencier
74c8b0150a merged branch bschussek/issue6141_2 (PR #6217)
This PR was merged into the 2.1 branch.

Commits
-------

6e7e08f [Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text"

Discussion
----------

[Form] Fixed the "format" option in DateType

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6141
Todo: -
License of the code: MIT
Documentation PR: -

This PR fixes a regression introduced in #4839. To quote that PR:

> This PR changes DateType and DateTimeType to support HTML5 by default when setting the option "widget" to "single_text".

In reality, the "format" option now defaults to the HTML5 format always, not just when "widget" is "single_text". This is fixed here.

The second commit in this PR removes special characters between select/text fields. What, with German locale, was

```
<day input>.<month input>.<year input>
```

before is now

```
<day input><month input><year input>
```

This is the way date fields are represented on the majority of websites. If you *need* separators, you can have them by setting the "format" option to a custom value:

```php
$builder->add('myDate', 'date', array(
    'format' => 'dd.MM.yyyy',
));
```

---------------------------------------------------------------------------

by fabpot at 2012-12-07T08:52:21Z

The second commit should probably be done on master and it changes the behavior.

---------------------------------------------------------------------------

by bschussek at 2012-12-07T12:23:22Z

Ok, I removed the second commit now and removed the entries from the CHANGELOG.
2012-12-07 14:34:54 +01:00
Martin Hasoň
8bb3208ab8 [Config] Loader::import must return imported data 2012-12-07 14:24:02 +01:00
Fabien Potencier
992707ea6c merged branch bschussek/issue6190 (PR #6216)
This PR was merged into the 2.1 branch.

Commits
-------

ca5d9ac [DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed

Discussion
----------

[DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6190
Todo: -
License of the code: MIT
Documentation PR: n/a

---------------------------------------------------------------------------

by craue at 2012-12-06T18:31:43Z

👍

---------------------------------------------------------------------------

by lstrojny at 2012-12-06T18:35:04Z

What about a test?

---------------------------------------------------------------------------

by bschussek at 2012-12-07T12:39:51Z

Removed CHANGELOG entries and added tests.

---------------------------------------------------------------------------

by craue at 2012-12-07T13:14:02Z

I'm not sure if @fabpot is objected to the changelog entry entirely or just the version number. What is the segfault about for PHP 5.4 in Travis?
2012-12-07 14:19:21 +01:00
Bernhard Schussek
ca5d9acb19 [DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed 2012-12-07 13:39:00 +01:00