Commit Graph

12060 Commits

Author SHA1 Message Date
Tobias Schultze
6703fb59d3 added changelog entries 2013-01-02 22:49:54 +01:00
Tobias Schultze
1997e2e978 fix phpdoc of UrlGeneratorInterface that missed some exceptions and improve language of exception message 2012-12-13 20:13:12 +01:00
Tobias Schultze
f0415ed3d1 [Routing] made reference type fully BC and improved phpdoc considerably 2012-12-13 20:13:11 +01:00
Tobias Schultze
7db07d91aa [Routing] added tests for generating relative paths and network paths 2012-12-13 20:13:10 +01:00
Tobias Schultze
75f59ebe01 [Routing] add support for path-relative and scheme-relative URL generation 2012-12-13 20:13:09 +01:00
Fabien Potencier
18c520a5e8 merged branch Tobion/loaders (PR #6172)
This PR was merged into the master branch.

Commits
-------

237bbd0 fixed and refactored YamlFileLoader in the same sense as the XmlFileLoader
392d785 removed covers annotation from loader tests and unneeded use statements
45987eb added tests for the previous XmlFileLoader fixes
b20d6a7 ensure id, pattern and resource are specified
8361b5a refactor the XMlFileLoader
83fc5ff fix namespace handling in xml loader; it could not handle prefixes
1a60a3c make resource and key attributes required in xsd
02e01b9 improve exception messages in xml loader
51fbffe remove unneeded cast
358e9c4 fix some phpdoc

Discussion
----------

[Routing] improve loaders

BC break: no

Main points:
- fixed Xml loader that could not handle namespace prefixes but is valid xml
- fixed Yaml loader where some nonsesense configs were not validated correctly like an imported resource with a pattern key.

Added tests for all. Some refactoring + a few tweaks like better exception messages and more consistency between Xml loader and yaml loader. See also commits.

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

by Tobion at 2012-12-07T18:16:08Z

@fabpot this is ready

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

by Tobion at 2012-12-11T17:30:10Z

@fabpot rebased. Please don't squash to one big commit where one does not see what changed why.

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

by fabpot at 2012-12-11T17:32:40Z

I only squash when most commits are CS fixes and feedback.

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

by Tobion at 2012-12-11T17:37:49Z

Well, you squashed #6022 so it's not possible to revert a specific deprecation.
2012-12-11 18:46:52 +01:00
Tobias Schultze
237bbd0578 fixed and refactored YamlFileLoader in the same sense as the XmlFileLoader
some nonsesense configs were not validated correctly like an imported resource with a pattern key. added tests for such things too.
2012-12-11 18:26:19 +01:00
Tobias Schultze
392d785d91 removed covers annotation from loader tests and unneeded use statements 2012-12-11 18:03:52 +01:00
Tobias Schultze
45987eb2b7 added tests for the previous XmlFileLoader fixes 2012-12-11 18:03:51 +01:00
Tobias Schultze
b20d6a7960 ensure id, pattern and resource are specified
the yaml loader also requires the pattern to be given, so the xml loader should do the same
2012-12-11 18:03:50 +01:00
Tobias Schultze
8361b5a58b refactor the XMlFileLoader 2012-12-11 18:03:49 +01:00
Fabien Potencier
2578f1ef58 merged branch stloyd/feature/form-labels (PR #6262)
This PR was merged into the master branch.

Commits
-------

d5426f0 [Form] Add tests to prove that label is not rendered when is marked as false
120547c [Form][TwigBridge] Don't set label attributes if is marked as not to be rendered [Form][FrameworkBundle] Add option to disable rendering of label for fields
36e4556 [Form] Option for not displaying a label by setting label to false. [Form] Fixed formatting & translation ..

Discussion
----------

[Form] Added option for not displaying a form-label by setting label to false

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Replaces: #5421

@fabpot @BenjaminBeck: I was just not sure what to do with "table based" forms, so I left `<td></td>` rendered when there is no label, because I'm not sure that we can hide it easily.

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

by XWB at 2012-12-11T09:30:14Z

👍
2012-12-11 17:55:20 +01:00
Fabien Potencier
1072f0e88e merged branch vicb/typo (PR #6268)
This PR was merged into the master branch.

Commits
-------

70a69d4 [Routing] fix typo

Discussion
----------

[Routing] fix typo
2012-12-11 17:53:13 +01:00
Tobias Schultze
83fc5ff72f fix namespace handling in xml loader; it could not handle prefixes 2012-12-11 17:52:57 +01:00
Tobias Schultze
1a60a3ceb5 make resource and key attributes required in xsd 2012-12-11 17:52:56 +01:00
Tobias Schultze
02e01b9798 improve exception messages in xml loader 2012-12-11 17:52:55 +01:00
Tobias Schultze
51fbffec26 remove unneeded cast 2012-12-11 17:52:53 +01:00
Tobias Schultze
358e9c47b9 fix some phpdoc 2012-12-11 17:52:53 +01:00
Victor Berchet
70a69d4874 [Routing] fix typo 2012-12-11 17:22:27 +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
Joseph Bielawski
d5426f0a76 [Form] Add tests to prove that label is not rendered when is marked as false 2012-12-11 09:55:44 +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
Joseph Bielawski
120547c8bc [Form][TwigBridge] Don't set label attributes if is marked as not to be rendered
[Form][FrameworkBundle] Add option to disable rendering of label for fields
2012-12-11 09:29:21 +01:00
BenjaminBeck
36e4556805 [Form] Option for not displaying a label by setting label to false.
[Form] Fixed formatting & translation ..
2012-12-11 09:21:58 +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