Commit Graph

7752 Commits

Author SHA1 Message Date
Bart van den Burg
c60f0363de fixed typo 2011-12-22 10:57:47 +01:00
Bart van den Burg
231e79ce0f fixed entity choice list BC break 2011-12-22 10:49:27 +01:00
Fabien Potencier
0fa9e4cb69 [HttpKernel] fixed some unit tests that can fail 2011-12-22 08:06:15 +01:00
Fabien Potencier
cc8f3086df Merge branch '2.0'
* 2.0:
  [HttpKernel] fixed unit tests that can fail randomly
2011-12-21 14:29:13 +01:00
Fabien Potencier
7ea9c5b92a merged branch stloyd/missingClientTransformer (PR #2421)
Commits
-------

49d2685 [Form] Add default validation to TextType field (and related)

Discussion
----------

[Form] Add default transformer to TextType field (and related)

Bug fix: yes&no (?)
Feature addition: yes (?)
BC break: no
Symfony2 tests pass: yes
Fixes the following tickets: #1962.

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

by stloyd at 2011/12/19 03:43:37 -0800

@fabpot ping ;-)

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

by fabpot at 2011/12/19 10:58:20 -0800

Is it really needed? I have a feeling that it enforces unneeded constraints, but I can be wrong of course.

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

by hlecorche at 2011/12/20 02:31:03 -0800

It's needed because with TextType field, and without the ValueToStringTransformer, the user data (when sending the form) can be an array !!!

For example:
- if there is a TextType field
- and if there is a MaxLengthValidator
- and if the user data (when sending the form) is an array
So the exception "Expected argument of type string, array given in src\Symfony\Component\Validator\Constraints\MaxLengthValidator.php at line 40" is thrown
2011-12-21 12:55:51 +01:00
Fabien Potencier
3dd1072edc [HttpKernel] fixed unit tests that can fail randomly 2011-12-20 20:21:56 +01:00
Fabien Potencier
5803146a9e merged 2.0 2011-12-20 20:16:39 +01:00
Fabien Potencier
ebc9979a57 [Process] fixed unit tests on PHP 5.4 2011-12-20 20:16:11 +01:00
Fabien Potencier
89bd0d7874 merged branch Tobion/patch-3 (PR #2931)
Commits
-------

1eb5583 fixes #2906

Discussion
----------

Fix for #2906

closes #2906
2011-12-20 19:20:41 +01:00
Tobias Schultze
1eb5583168 fixes #2906 2011-12-20 18:12:37 +01:00
Fabien Potencier
34f1b5893c merged branch aerialls/webprofiler (PR #2925)
Commits
-------

b0987a3 [WebProfilerBundle] fixed toolbar height

Discussion
----------

[WebProfilerBundle] fixed toolbar height

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: none
Todo: none
2011-12-19 19:53:40 +01:00
Fabien Potencier
a4edc1b724 updated CHANGELOG for 2.1 2011-12-19 19:52:36 +01:00
Fabien Potencier
05285e429c merged branch dustin10/cache-clearers (PR #2857)
Commits
-------

3ae976c fixed CS
84ad40d added cache clear hook

Discussion
----------

[Cache][2.1] Added cache clear hook

Allows bundles to hook into the `cache:clear` command by using the `kernel.cache_clearer` tag instead of using the `event_dispatcher` service.

See #1884

Bug fix: No
Feature addition: Yes
Backwards compatibility break: No
Symfony2 tests pass: Yes
Fixes the following tickets: #1884
References the following tickets: #1884

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

by dustin10 at 2011/12/16 11:03:54 -0800

Rebased to squash all commits into one.

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

by lsmith77 at 2011/12/17 05:27:29 -0800

@fabpot: we figured that priorities wouldn't be needed for cleaning .. haven't tested the PR, but conceptually it looks good to me and aside from the priority stuff its modeled after the cache warners.

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

by dustin10 at 2011/12/19 09:46:26 -0800

@fabpot Updated to pass cache dir to `clear` method.

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

by dustin10 at 2011/12/19 10:02:21 -0800

@stof and @fabpot Another thought I just had. Should the `$this->getContainer()->get('cache_clearer')->clear($realCacheDir);` call in the `CacheClearCommand` be done before the warming?

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

by stof at 2011/12/19 10:03:59 -0800

indeed. the clearing should be done before the warming.

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

by dustin10 at 2011/12/19 10:19:28 -0800

Squashed all commits into one. Let me know if there is anything else.

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

by dustin10 at 2011/12/19 10:31:50 -0800

Fixed extra lines.
2011-12-19 19:52:15 +01:00
Fabien Potencier
f58cfc0dcb merged branch stof/entity_provider_proxy (PR #2922)
Commits
-------

649fa52 [DoctrineBridge] Fixed the entity provider to support proxies
29f4111 [DoctrineBridge] Added a failing test showing the issue for proxy users

Discussion
----------

Fixed the entity provider to support proxies

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

If a proxy object was used, the ``supportsClass`` method would fail becasue it does a string comparison for the class name.

This issue has not been reported by users yet because it is an edge case:

- ``supportsClass`` is used only in the RememberMe system
- getting a proxy in the entity provider is possible only if a listener running before the firewall loaded an object which has a relation to the user, which is far from being a standard use case.

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

by schmittjoh at 2011/12/19 10:07:46 -0800

How about using the new proxy tools that Doctrine has?

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

by stof at 2011/12/19 10:20:37 -0800

the new tool will only be available in 2.2 so only for Symfony 2.1. Once merged into master, we could eventually refactor it in the master branch to use ``Doctrine\Common\Util\ClassUtils``
2011-12-19 19:50:04 +01:00
Fabien Potencier
ce41b8eafa merged branch stof/entity_provider (PR #2923)
Commits
-------

f1199c0 [DoctrineBridge] Decoupled the EntityUserProvider from the ORM

Discussion
----------

[DoctrineBridge] Decoupled the EntityUserProvider from the ORM

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

The entity provider can now be used by any Doctrine project implementing the interfaces from Doctrine Common 2.2.
2011-12-19 19:48:33 +01:00
Fabien Potencier
ddf6534cc6 merged branch stof/doctrine_choice_list (PR #2921)
Commits
-------

200ed54 [DoctrineBridge] Extracted the common type and made the choice list generic
3c81b62 [Doctrine] Cleanup and move loader into its own method
7646a5b [Doctrine] Dont allow null in ORMQueryBuilderLoader
988c2a5 Adjust check
3b5c617 [DoctrineBridge] Remove large parts of the EntityChoiceList code that were completly unnecessary (code was unreachable).
b919d92 [DoctrineBridge] Optimize fetching of entities to use WHERE IN and fix other inefficencies.
517eebc [DoctrineBridge] Refactor entity choice list to be ORM independant using an EntityLoader interface.

Discussion
----------

[DoctrineBridge] Refactor EntityChoiceList

Bug fix: no
Feature addition: yes
Backwards compatibility break: no (99%)
Symfony2 tests pass: yes

This decouples the ORM from the EntityChoiceList and makes its much more flexible. Instead of having a "query_builder" to do smart or complex queries you can now create "loader" instances which can arbitrarily help loading entities.

Additionally i removed lots of code that was unnecessary and not used by the current code.

There is a slight BC break in that the EntityChoiceList class is now accepting an EntityLoaderInterface instead of a querybuilder. However that class was nested inside the EntityType and should not be widely used or overwritten.

The abstract class DoctrineType is meant to be used as base class by other Doctrine project to share the logic by simply using a different type name and a different loader implementation.

This PR replaces #2728.

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

by beberlei at 2011/12/19 09:20:43 -0800

Thanks for doing the last refactorings, this is now fine from my side as well.
2011-12-19 19:46:30 +01:00
Julien Brochet
b0987a3c9c [WebProfilerBundle] fixed toolbar height 2011-12-19 19:44:57 +01:00
Dustin Dobervich
3ae976cd5a fixed CS 2011-12-19 12:30:32 -06:00
Dustin Dobervich
84ad40dcc8 added cache clear hook 2011-12-19 12:17:48 -06:00
Christophe Coevoet
649fa5219f [DoctrineBridge] Fixed the entity provider to support proxies 2011-12-19 18:32:21 +01:00
Christophe Coevoet
29f4111f3e [DoctrineBridge] Added a failing test showing the issue for proxy users 2011-12-19 18:31:29 +01:00
Christophe Coevoet
f1199c0c68 [DoctrineBridge] Decoupled the EntityUserProvider from the ORM
It can now be used by any Doctrine project implementing the interfaces
from Doctrine Common 2.2.
2011-12-19 18:20:00 +01:00
Christophe Coevoet
200ed5490b [DoctrineBridge] Extracted the common type and made the choice list generic 2011-12-19 17:53:23 +01:00
Fabien Potencier
694c74da30 merged branch stloyd/proper_asserts (PR #2916)
Commits
-------

fd174a2 [Tests] Use proper assertion for counting

Discussion
----------

[Tests] Use proper assertion for counting

```
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
```

Docs PR: symfony/symfony-docs#924
2011-12-19 17:50:54 +01:00
Benjamin Eberlei
3c81b62955 [Doctrine] Cleanup and move loader into its own method 2011-12-19 17:46:18 +01:00
Benjamin Eberlei
7646a5bc6d [Doctrine] Dont allow null in ORMQueryBuilderLoader 2011-12-19 17:46:09 +01:00
Benjamin Eberlei
988c2a525e Adjust check 2011-12-19 17:46:04 +01:00
Benjamin Eberlei
3b5c617ad0 [DoctrineBridge] Remove large parts of the EntityChoiceList code that were completly unnecessary (code was unreachable). 2011-12-19 17:45:59 +01:00
Benjamin Eberlei
b919d92b52 [DoctrineBridge] Optimize fetching of entities to use WHERE IN and fix other inefficencies. 2011-12-19 17:45:50 +01:00
Benjamin Eberlei
517eebcb31 [DoctrineBridge] Refactor entity choice list to be ORM independant using an EntityLoader interface. 2011-12-19 17:32:04 +01:00
Joseph Bielawski
fd174a228b [Tests] Use proper assertion for counting 2011-12-19 10:00:41 +01:00
Fabien Potencier
30f2be3b70 merged branch juliendidier/twig-security-class (PR #2835)
Commits
-------

60ebaaa [SecurityBundle] fix service class by adding a parameter, on twig extension

Discussion
----------

[SecurityBundle] fix service class by adding a parameter, on twig extension

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

To override the is_granted twig function, the class of TwigExtension is now set in a parameter.

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

by stof at 2011/12/10 10:38:38 -0800

First thing, you could overwrite the extension at the twig level by simply registering another twig extension with the same ``getName`` method.

And second point, replacing core Twig functions is probably one of the best way to forbid you to use third party bundles as the change will also impact their code. Do you really need to do it (especially considering that this function simply calls the security context and all the logic is in the context) ?

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

by juliendidier at 2011/12/10 15:43:08 -0800

Yes, overriding ```is_granted``` function is probably a bad example. But having it set as parameter allow you to redefine it (if you know what you are doing).
2011-12-19 08:06:39 +01:00
Fabien Potencier
e6e78f6a81 [TwigBundle] added Twig Debug extension support 2011-12-18 20:55:28 +01:00
Fabien Potencier
5d6a7d35b0 merged 2.0 2011-12-18 14:48:17 +01:00
Fabien Potencier
4316595dbb fixed CS 2011-12-18 14:42:59 +01:00
Fabien Potencier
8d7a6e598d added a rule to check_cs 2011-12-18 14:42:56 +01:00
Fabien Potencier
3ba767703a merged branch stloyd/profiler_design_fix (PR #2907)
Commits
-------

d1fa8cc [WebProfiler] Fix some design glitches (closes #2867)

Discussion
----------

[WebProfiler] Fix some design glitches

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2867

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

by jalliot at 2011/12/17 04:54:11 -0800

Thanks @stloyd.
However it only fixes the second and third issues related in #2867. The filesystem provider bug is much more annoying!

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

by stloyd at 2011/12/17 05:38:13 -0800

@jalliot Did you cleaned profiler dir after update to latest master commit ? This is mentioned and kinda known BC break... I'm asking because I cannot reproduce this issue.

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

by jalliot at 2011/12/17 08:17:21 -0800

@stloyd It has nothing to do with your recent PR adding HTTP method as I had the bug even before that.
I've tested on a fresh Symfony (master) install (before and after the merge) and have the bug each time.
I thought maybe it was related to some of the bundles I installed but the bug occurs even in a freshly installed SE.
2011-12-18 14:39:41 +01:00
Fabien Potencier
bbec4bb32b merged branch canni/fix_type_hint (PR #2912)
Commits
-------

e417153 [BugFix][Console] Fix type hint for output formatter

Discussion
----------

[BugFix][Console] Fix type hint for OutputFormatter in OutputStream constructors

I consider this as a bug, cause it disables ability to change formatter implementation

BugFix: yes
Feature addition: no
Sysmfony2 test pass: yes

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

by fabpot at 2011/12/18 00:23:05 -0800

It's not a bug fix as existing code that extend these classes will now fail.

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

by stof at 2011/12/18 03:51:38 -0800

@fabpot does the constructor enforces its signature for child classes ? I don't think so.
2011-12-18 14:37:49 +01:00
Fabien Potencier
d08c2ef8b4 removed unused use statements 2011-12-18 14:36:25 +01:00
Fabien Potencier
6504d05804 fixed CS 2011-12-18 14:36:25 +01:00
Fabien Potencier
73fc8f6ec5 updated CHANGELOG for 2.1 2011-12-18 14:36:25 +01:00
Fabien Potencier
3f4d718c5b [Console] fixed previous merge 2011-12-18 14:36:20 +01:00
Fabien Potencier
a13d2270ed merged branch andrewtch/plain-commands (PR #2914)
Commits
-------

2181f6c Fixed space
5f98b73 Raw output of commands in app/console list

Discussion
----------

Raw output of commands in app/console list

Breaks compatibility: no
Feature addition: yes
Symfony test pass: yes, with appropriate modifications

Simply, it adds ```--raw``` parameter to ```app/console list``` command. With this key, ```list``` returns simply command names.

This is mainly useful in command completion / embedding, like https://github.com/andrewtch/oh-my-zsh/tree/symfony2-completion/plugins/symfony2 ; I know about the presence of --xml, but in some environments (like shell scripts) parsing XML could be a problem.

This is an unobtrusive feature addition that is not likely to add problems in future.

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

by andrewtch at 2011/12/18 04:09:58 -0800

fixed
2011-12-18 14:28:52 +01:00
Fabien Potencier
997f354d53 tweaked the README files 2011-12-18 14:22:28 +01:00
Andrew Tch
2181f6c8b6 Fixed space 2011-12-18 14:03:17 +02:00
Fabien Potencier
0f2caf1106 merged branch lsmith77/component_readmes (PR #2561)
Commits
-------

1e370d7 typo fix
93d8d44 added some more infos about Config
27efd59 added READMEs for the bridges
34fc866 cosmetic tweaks
d6af3f1 fixed README for Console
6a72b8c added basic README files for all components

Discussion
----------

added basic README files for all components and bridges

heavily based on http://fabien.potencier.org/article/49/what-is-symfony2 and the official Symfony2 documentation

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

by jmikola at 2011/11/03 13:36:07 -0700

Great work. For syntax highlighting on the PHP snippets, you could add "php" after the three backticks.

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

by lsmith77 at 2011/11/03 13:41:29 -0700

done

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

by stealth35 at 2011/11/03 13:49:31 -0700

Nice job, but you also need to add `<?php`

ex :

``` php
<?php
use Symfony\Component\DomCrawler\Crawler;

$crawler = new Crawler();
$crawler->addContent('<html><body><p>Hello World!</p></body></html>');

print $crawler->filter('body > p')->text();
```

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

by lsmith77 at 2011/11/03 13:56:57 -0700

done

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

by ericclemmons at 2011/11/03 19:57:57 -0700

@lsmith77 Well done!  This makes consumption of individual components that much easier, *especially* now that `composer.json` files have been added.

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

by lsmith77 at 2011/11/04 01:18:23 -0700

ok .. fixed the issues you mentioned @fabpot

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

by lsmith77 at 2011/11/11 15:00:27 -0800

@fabpot anything else left? seems like an easy merge .. and imho there is considerable benefit for our efforts to spread the word about the components with this PR merged.

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

by drak at 2011/11/11 18:54:13 -0800

You know, it might be a nice idea to put a link to the documentation for each component if there is some at symfony.com

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

by lsmith77 at 2011/11/12 00:59:14 -0800

i did that in some. but i might have missed a few places.
On 12.11.2011, at 03:54, Drak <reply@reply.github.com> wrote:

> You know, it might be a nice idea to put a link to the documentation for each component if there is some at symfony.com
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/2561#issuecomment-2715762

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

by breerly at 2011/11/21 10:28:36 -0800

Pretty excited with this.

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

by dbu at 2011/11/24 00:02:50 -0800

is there anything we can help with to make this ready to be merged?

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

by lsmith77 at 2011/12/18 02:39:23 -0800

@fabpot: seriously .. if you are not going to deliver something "better" and don't provide a reason what is wrong with this .. then its beyond frustrating. i obviously do not claim that these README's are perfect (and certainly still no replacement for proper documentation), but I do claim that in their current form they are a radical step forward to potential users of the Symfony2 components.
2011-12-18 12:42:02 +01:00
Fabien Potencier
7b619e7b32 added nl2br use as it is now part of Twig core 2011-12-18 12:39:28 +01:00
Fabien Potencier
d82e673505 updated CHANGELOG for 2.1 2011-12-18 12:39:06 +01:00
Fabien Potencier
b59bc5e374 merged branch canni/stderr_in_console_commands (PR #2900)
Commits
-------

cab0334 [Console] Enable stderr support

Discussion
----------

[Console] Enable stderr support

Bug fix: no
Feature addition: yes
BC break: no
Symfony2 test pass: yes, but some tests had to be modified

Now all error messages goes to stdout, we cannot separate error
from normal behaviour, this enables writing to stderr stream,
so scripts ran e.g. from cron, can benefit from this well known concept.

There are 2 much nicer implememntations, but:
1) First requires to break the `@api` tagged interfaces.
2) Second requires rewrite of `execute` command declatarion all commands in bundles.

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

by canni at 2011/12/16 07:08:29 -0800

@stof corrected, thx
2011-12-18 09:25:56 +01:00
Andrew Tch
5f98b73e7c Raw output of commands in app/console list 2011-12-18 01:19:10 +02:00