Commit Graph

91 Commits

Author SHA1 Message Date
Igor Wiedler
575771380b [composer] add doctrine and twig dependencies 2011-10-15 16:55:54 +02:00
Fabien Potencier
5c760b0d40 merged branch igorw/composer (PR #2275)
Commits
-------

731b28b [composer] add missing deps for FrameworkBundle
9c8f100 [composer] change ext/intl to the new ext-intl syntax
d535afe [composer] fix monolog-bridge composer.json, add more inter-component deps
9ade639 [composer] add composer.json

Discussion
----------

Composer

This PR adds a composer.json file for [composer](https://github.com/composer/composer) ([more info](packagist.org/about-composer)).

For discussion you can also go into #composer-dev on freenode and argue with naderman, seldaek and everzet.

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

by naderman at 2011/09/26 15:51:51 -0700

You haven't entered any keywords, they might come in handy when searching for packages on packagist.

But really this is just a +1 ;-)

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

by stof at 2011/09/26 16:12:21 -0700

See my comments on your previous (non-rebased) commit: f1c0242b5a

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

by igorw at 2011/09/27 00:04:36 -0700

Following dependencies do not have a composer.json yet: Twig, Doctrine (orm, dbal, common), swiftmailer.

Also missing from the standard edition: assetic, twig-extensions, jsm-metadata, SensioFrameworkExtraBundle, JMSSecurityExtraBundle, SensioDistributionBundle, SensioGeneratorBundle, AsseticBundle.

The point is, those can be added later on. Having the components composerized is already a leap forward. Also, doctrine depends on some symfony components, we've got to start somewhere.

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

by Seldaek at 2011/09/27 00:36:41 -0700

Also, just for information, the plan is to have `symfony/framework-bundle` be the "framework", with all dependencies to doctrine etc, though we should really only have strict requirements in there, and then in symfony-standard we ship a composer.json that requires the framework-bundle, doctrine-orm and things like that that are not essential to core. Otherwise people don't have a choice about what they use anymore.

Just a comment btw, the json is invalid, all / should be escaped. However json_decode is nice enough to parse those without complaining, browsers do too, even Crockford's json2.js does, so I'm not sure if we should privilege readability over strictness, since it seems nobody really cares about this escaping.

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

by igorw at 2011/09/27 00:41:39 -0700

So, I've implemented all of @stof's suggestions, except (for reasons stated above):

* doctrine to DoctrineBundle
* swiftmailer to SwiftmailerBundle
* twig to TwigBundle
* doctrine-common to Validator
* FrameworkBundle (what exactly does it depend on?)

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

by stof at 2011/09/27 00:52:31 -0700

@igorw at least HttpKernel, Routing, Templating, EventDispatcher, Doctrine Common (annotations cannot be disabled), Translator, Form (optional), Validator (optional), Console (optional). See the service definitions to see the others

@Seldaek FrameworkBundle does not depend on Doctrine, except for Common

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

by beberlei at 2011/09/27 03:15:34 -0700

What does the symfony/ or ext/ prefix control in composer?

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

by Seldaek at 2011/09/27 03:33:52 -0700

symfony/ is just the (mandatory) vendor namespace. Also ext/ has been renamed to ext- now, so it's not in any vendor, and should avoid potential issues.

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

by beberlei at 2011/09/27 05:07:03 -0700

@Seldaek Mandatory? So every package name is "vendor/package"? I like that because previously i thought package names are not namespaced, and thus clashes could occur between different communities easily.

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

by Seldaek at 2011/09/27 05:16:20 -0700

@beberlei: Mandatory. As of yesterday http://packagist.org/ will tell you you have an invalid package name if there's no slash in it. See 1306d1ca82 (diff-3)
2011-09-29 17:27:38 +02:00
Fabien Potencier
d429594afb removed separator of choice widget when the separator is null 2011-09-29 10:14:34 +02:00
Igor Wiedler
9ade639bb4 [composer] add composer.json 2011-09-27 00:55:43 +02:00
Fabien Potencier
c248f8123d merged branch craue/patch-9 (PR #1787)
Commits
-------

c558b78 avoid rendering the `ChoiceType` separator if all `choices` are `preferred_choices`

Discussion
----------

avoid rendering the `ChoiceType` separator if all `choices` are `preferred_choices`

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

by fabpot at 2011/07/24 00:51:21 -0700

The same change should be made to the PHP template.

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

by fabpot at 2011/07/25 00:31:39 -0700

I forgot to ask you to add some unit tests too. Thanks.

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

by craue at 2011/07/25 10:23:34 -0700

Are you asking for PHPUnit tests? If so, unfortunately, I'm not able to add those because I haven't used PHPUnit yet. ;)

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

by lenar at 2011/07/25 12:47:51 -0700

I would prefer ```choises | length``` without spaces as everywhere else.

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

by lenar at 2011/07/25 12:50:32 -0700

@fabpot: Since <option disabled> is unclickable in browser (by HTML spec) this really doesn't change anything (something not there is as unclickable) except the the look when rendered. I have hard time to imagine what could become unit-testable here by this change.

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

by stof at 2011/07/25 13:03:47 -0700

@lenar unit testing is not about what the browser could do. What should be unit-tested is that an example will only preferred choices does not output the separator, which is exactly what this PR is about

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

by stof at 2011/07/25 13:04:03 -0700

@lenar unit testing is not about what the browser could do. What should be unit-tested is that an example will only preferred choices does not output the separator, which is exactly what this PR is about

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

by lenar at 2011/07/25 13:08:33 -0700

@stof: ok, put this way you are definitely right.

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

by craue at 2011/07/25 13:37:50 -0700

@lenar: You're right about the spaces. I'm using them in my projects but will remove them here for the sake of consistency.

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

by stloyd at 2011/07/25 13:40:40 -0700

@craue I will write today/tomorrow test to cover your code and send you PR.

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

by craue at 2011/07/25 14:00:26 -0700

@stloyd: That would be nice. But I'm still not that familiar with Git(Hub). Is there anything I have to take care of?

Also, I'd like to squash my three commits into one ... if this is possible for an open PR and if I find out how to do that easily. :D

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

by fabpot at 2011/07/26 00:18:22 -0700

@craue: yes, you should squash your commits into one and use `--force` when you push (the PR will automatically be updated accordingly).
2011-07-27 07:59:53 +02:00
Fabien Potencier
c6308a5daf merged branch stof/trans_locale (PR #1808)
Commits
-------

85c0087 [TwigBridge] Made the locale configurable for the trans and transchoice tags
3ea31a0 [TwigBridge] Made the locale configurable for the trans and transchoice filters

Discussion
----------

Trans locale

This allows setting the locale when translating in a Twig template. This was already allowed in the Translator and in the PHP templates
2011-07-27 07:44:42 +02:00
Christian Raue
c558b78bc6 avoid rendering the ChoiceType separator if all choices are preferred_choices 2011-07-26 12:55:46 +02:00
Fabien Potencier
04ac1fdba2 [Routing] changed UrlGeneratorInterface::generate() signature to allow passing objects instead of arrays 2011-07-26 08:00:41 +02:00
Christophe Coevoet
85c0087825 [TwigBridge] Made the locale configurable for the trans and transchoice tags 2011-07-26 01:27:09 +02:00
Christophe Coevoet
3ea31a0263 [TwigBridge] Made the locale configurable for the trans and transchoice filters 2011-07-26 01:25:25 +02:00
marc.weistroff
2b4cc9bd06 [Form] Changed collection prototype rendering.
Based on PR 1500. It is now rendered inside an attribute of collection
tag.
2011-07-22 11:01:55 +02:00
Fabien Potencier
634131bc77 [Twig] made a small optimization to avoid problems with XDebug when rendering forms with deep nested collections 2011-07-16 20:40:19 +02:00
Christian Raue
d34caeea3a merged and unified blocks field_label and form_label into generic_label 2011-07-11 12:06:28 -07:00
Fabien Potencier
9a6aafa83f added missing required classes on form label 2011-07-11 18:37:09 +02:00
Jordi Boggiano
52fdd53af8 [Bridge/Twig] Add required class to labels that match required fields 2011-07-04 20:04:44 +02:00
Fabien Potencier
339ad861bb added missing translator calls in form templates 2011-06-29 19:26:59 +02:00
cyrillej
4e7b16f769 Added "trans" Twig filters to labels in the "widget_choice_options" block 2011-06-29 15:14:45 +02:00
stloyd
7bc19f9675 Added to DateTimeType extension possibility to render form as single_text (similar to DateType option) (issue #1323 it requires fix for #1205) 2011-06-23 17:02:55 +02:00
stloyd
17b41b2c51 Added to TimeType extension possibility to render form as single_text (similar to DateType option) (issue #1205)
Adjusted `DateTimeType` to allow usage of this new feature
2011-06-23 14:36:04 +02:00
stloyd
4e3406d633 Sync with master and clean up 2011-06-23 14:01:11 +02:00
stloyd
ad5d2c13e1 Added to TimeType extension possibility to render form as single_text (similar to DateType option) (issue #1205)
Adjusted `DateTimeType` to allow usage of this new feature
2011-06-23 11:40:24 +02:00
Victor Berchet
2c1108ce6b [Form] Revert the ability to override anything else than the text of the label while rendering a row 2011-06-22 08:36:45 +02:00
Victor Berchet
da467a6b11 [Form] Fix the exception message when no block is found while rendering 2011-06-20 12:29:05 +02:00
Victor Berchet
8670995574 [Form] Optimize rendering when the block to render is known 2011-06-20 12:29:05 +02:00
Victor Berchet
41e07c96e3 [Form] Optimize rendering 2011-06-20 12:29:04 +02:00
Victor Berchet
f729c6ba93 [Form] Add the ability to override label & widget options when rendering a row 2011-06-20 12:29:04 +02:00
Victor Berchet
e43fb989e3 [Form][TwigBridge] Make FormExtension::render() recursively callable to ease theming 2011-06-20 11:39:23 +02:00
Fabien Potencier
627a7f7cd4 [TwigBridge] renamed some block names to avoid collisions 2011-06-17 08:39:56 +02:00
Fabien Potencier
a7974ff43c renamed Form Twig templates to be more explicit 2011-06-16 15:20:12 +02:00
Fabien Potencier
02f28b6e5e simplified Form templates as the safeguard is already set in the Form Type 2011-06-15 16:58:41 +02:00
Victor Berchet
b709551252 [Order] Make Form::types and FormView::types use the same order (Parent > Child) 2011-06-15 01:45:26 +02:00
Victor Berchet
bdd755e45b [Form] Fix the exception message when no block is found 2011-06-14 16:45:03 +02:00
Victor Berchet
c68c511388 [Form] Make theming form prototypes consistent (start by looking for a '_<id>_<section>' block) 2011-06-14 16:36:31 +02:00
Victor Berchet
4e3e2768fb [Form] Make the prototype view child of the collection view 2011-06-14 09:33:19 +02:00
Fabien Potencier
2ce3cfad18 [Form] made it possible to translate the empty value of Choice fields 2011-06-14 08:33:48 +02:00
Fabien Potencier
c364008a3b [Form] allowed an empty value to be displayed for choices even when required is true
Rules are as follows:

* If multiple is true, then the empty_value is ignored
* If not, and if the field is not required, the empty_value is set to the empty string by default and displayed
* If the field is required, and if the user explicitely set the empty_value, then it is displayed
2011-06-14 08:27:19 +02:00
Christophe Coevoet
df0039f701 [TwigBridge] fixed the check for the collection prototype in the form theme 2011-06-14 00:15:50 +02:00
Fabien Potencier
d16a708cc8 [Form] simplified file type class
File uploads documentation is here:

https://github.com/symfony/symfony-docs/pull/400
2011-06-13 18:11:18 +02:00
Fabien Potencier
0c29a25d89 Merge remote branch 'kriswallsmith/form/collection-proto'
* kriswallsmith/form/collection-proto:
  added script[type="text/html"] collection prototype to form themes
  [Form] removed collection prototype from form tree
2011-06-13 11:51:18 +02:00
Victor Berchet
b19052f879 [Form][TwigBridge] Improve the cache layer by caching blocks instead of templates 2011-06-12 12:56:25 +02:00
Victor Berchet
9135f963db [Form][TwigBridge] Make the template cache more efficient 2011-06-12 12:15:48 +02:00
Victor Berchet
8677aa3dce [Form][TwigBridge] Fix rendering 2011-06-12 11:33:17 +02:00
Fabien Potencier
852a4c9c6a [Form] removed the file upload temporary storage feature
The current implementation is not ready for inclusion in 2.0. It has several
known problems (security, not possible to disable it, not "cloud-compatible",
...) and it's not a must have feature anyway.

Some references:

 * Security issue in FileType: https://github.com/symfony/symfony/issues/1001
 * Validation fails on file, still stored in TemporaryStorage: https://github.com/symfony/symfony/issues/908
 * Add a size argument & ability to configure TemporaryStorage: https://github.com/symfony/symfony/pull/748

This feature should be reworked and discussed for inclusion in 2.1.
2011-06-09 12:44:36 +02:00
Fabien Potencier
0a7ce63d8f Merge remote branch 'vicb/twig-theme-inheritance'
* vicb/twig-theme-inheritance:
  [Form] Further tweaks of the twig theme inheritance
  [Form] Fix twig theme inheritance
2011-06-09 07:46:50 +02:00
Kris Wallsmith
0df338fdb1 added script[type="text/html"] collection prototype to form themes 2011-06-08 09:41:12 -04:00
Victor Berchet
5060702669 [Form] Further tweaks of the twig theme inheritance 2011-06-08 14:46:34 +02:00
Victor Berchet
bee505a4bf [Form] Fix twig theme inheritance 2011-06-08 14:21:09 +02:00
Fabien Potencier
566511e9e7 moved some FormView methods to FormUtil where they really belongs 2011-06-08 14:07:04 +02:00
Fabien Potencier
1aabc5da64 fixed CS 2011-06-08 12:16:48 +02:00
Fabien Potencier
97a745e973 Merge remote branch 'vicb/form-rendering-fix'
* vicb/form-rendering-fix:
  [Form] Fix accessibility for file inputs
  [FrameworkBundle] Fix the FormHelper phpDoc
  [FrameworkBundle][Form] Add some phpDoc for the FormHelper class
  [FrameworkBundle][Form] Fix label rendering
  [FrameworkBundle][Form] Fix rendering search inputs in PHP
  [Form] FormType labels should never have a for attribute
  [Form] Never render a view again
2011-06-07 19:46:20 +02:00