Commit Graph

9868 Commits

Author SHA1 Message Date
Fabien Potencier
b983fcd565 merged branch Tobion/patch-4 (PR #4175)
Commits
-------

b1de2a2 [HttpKernel] fix typo, commit 9fed41 fixed only half of it

Discussion
----------

[HttpKernel] fix typo

commit 9fed41 fixed only half of it
2012-05-03 08:40:32 +02:00
Fabien Potencier
ba22e5b8f2 merged branch khepin/better_error_message (PR #4179)
Commits
-------

43dc19e update exception message so user can know which message has caused the exception

Discussion
----------

[Translation] Improved error message

Bug fix: [no]
Feature addition: [no]
Backwards compatibility break: [no]
Symfony2 tests pass: [no] -  (no more or less than they were passing before this addition)

Updates an error message in the translator so the developers can know what is the message causing the error.

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

by stof at 2012-05-02T12:09:20Z

You should keep it on one line

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

by khepin at 2012-05-02T14:05:08Z

done
2012-05-03 07:52:39 +02:00
Sebastien Armand
43dc19e00a update exception message so user can know which message has caused the exception 2012-05-02 22:02:53 +08:00
Tobias Schultze
b1de2a2f2f [HttpKernel] fix typo, commit 9fed41 fixed only half of it 2012-05-01 21:35:18 +03:00
Fabien Potencier
8eea5c3d5f merged branch shieldo/fix_exception_message (PR #4173)
Commits
-------

69e0451 [Security] fixed English grammar in exception message

Discussion
----------

[Security] fixed English grammar in exception message
2012-05-01 18:03:29 +02:00
Fabien Potencier
9fed41ee9b [HttpKernel] fixed typo 2012-05-01 18:02:24 +02:00
Fabien Potencier
5bed5f3c2c merged branch willdurand/fix-components (PR #4155)
Commits
-------

c195957 [Components] Tests/Autoloading fixes

Discussion
----------

Fix components

See #4141

----
This PR:

* configures each component to use composer to manage "dev" dependencies instead of env variables;
* adds phpunit configuration file on Filesystem component;
* fixes READMEs.

It's mergeable without any problems, but I would recommend to wait a fix in Composer in order to use `self.version` in `require`/`require-dev` sections.

Note: I kept `suggest` sections because it makes sense but this PR doesn't aim to provide useful explanations for each entry. It could be another PR, not that one.

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

by willdurand at 2012-04-30T20:43:13Z

@fabpot I reviewed each component, one by one. Now `phpunit` always works, even if tests are skipped. A simple `composer install --dev` allows to run the complete test suite. Each commit is well separated from the others. I guess, everything is ok now.

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

by Tobion at 2012-04-30T20:47:00Z

Please squash, as it makes no sense to have the same commit for each component.

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

by fabpot at 2012-05-01T14:26:11Z

Can you squash your commits before I merge? Thanks.

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

by willdurand at 2012-05-01T14:29:38Z

done

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

by fabpot at 2012-05-01T15:48:25Z

It does not seem that the commits are squashed.

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

by willdurand at 2012-05-01T15:54:08Z

done
2012-05-01 17:59:34 +02:00
William DURAND
c1959571ac [Components] Tests/Autoloading fixes
* Switched to Composer to manage "dev" dependencies
* Fixed READMEs
* Excluded vendor in phpunit.xml.dist files
* Fixed message in bootstrap.php files
* Added autoloader for the component itself
2012-05-01 17:51:41 +02:00
Anthon Pang
b2afd9ff46 use require instead of include 2012-05-01 11:33:50 -04:00
Fabien Potencier
462ddfced9 merged branch pulzarraider/httpfoundation_changelog_fix (PR #4169)
Commits
-------

ea3f8c5 [HttpFoundation] added native Redis session handler to CHANGELOG

Discussion
----------

[HttpFoundation] Added native Redis session handler to CHANGELOG

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-05-01 16:21:36 +02:00
Fabien Potencier
34a0c7a635 merged branch hhamon/username_password_token_doc (PR #4172)
Commits
-------

9ac8d43 [Security] fixed phpdoc.
a3ecea3 [Security] added some missing phpdoc for AbstractToken::setUser() and UsernamePasswordToken::__construct() methods.

Discussion
----------

Fixes PHPDoc in UsernamePasswordToken and AbstractToken classes

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-05-01 16:21:13 +02:00
Fabien Potencier
53dadbb9d6 [DependencyInjection] fixed a test 2012-05-01 16:19:44 +02:00
Douglas Greenshields
69e0451143 [Security] fixed English grammar in exception message 2012-05-01 14:45:52 +01:00
Fabien Potencier
26f933e7bd fixed CS 2012-05-01 15:23:48 +02:00
Hugo Hamon
9ac8d43dd1 [Security] fixed phpdoc. 2012-05-01 13:15:31 +01:00
Hugo Hamon
a3ecea3ed3 [Security] added some missing phpdoc for AbstractToken::setUser() and UsernamePasswordToken::__construct() methods. 2012-05-01 13:13:14 +01:00
Victor Berchet
a196ca03a5 [Routing] Compiler: remove lazy quantifiers with no effect 2012-05-01 11:56:03 +02:00
Victor Berchet
8232aa150b [Routing] Compiler: fix in the computing of the segment separators 2012-05-01 11:56:03 +02:00
Andrej Hudec
ea3f8c53f9 [HttpFoundation] added native Redis session handler to CHANGELOG 2012-05-01 08:53:36 +02:00
Fabien Potencier
db1d145b35 merged branch 1ed/hungarian-validator-messages (PR #4154)
Commits
-------

fa45f0e [FrameworkBundle] updated hungarian validator messages

Discussion
----------

[FrameworkBundle] updated hungarian validator messages
2012-05-01 07:23:27 +02:00
Anthon Pang
1ed8b720ac Autoloader should not throw exception because PHP will continue to call other registered autoloaders.
Change 'require' to non-fatal '@include' in the event no file is generated.  Let PHP handle the undefined class, natively.
2012-04-30 22:25:24 -04:00
Gábor Egyed
fa45f0e288 [FrameworkBundle] updated hungarian validator messages 2012-04-30 22:20:05 +02:00
Fabien Potencier
cbf16fee01 merged branch pulzarraider/redis_const_profiler_fix (PR #4164)
Commits
-------

991474b [HttpKernel] RedisProfilerStorage - Fix falling unit tests when Redis extension is not available

Discussion
----------

[HttpKernel] RedisProfilerStorage - Fix falling unit tests when Redis extension is not available

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

Fix error of my PR #4150

Unit tests were falling if Redis extension was not available. It was caused by using Redis constants.
2012-04-30 21:21:17 +02:00
Andrej Hudec
991474be12 [HttpKernel] RedisProfilerStorage - Fix falling unit tests when Redis extension is not available 2012-04-30 20:54:41 +02:00
Bilal Amarni
a2b3d3cf00 added cache service definition 2012-04-30 19:01:18 +02:00
Fabien Potencier
59dd4df7f4 bumped Symfony version to 2.0.14-DEV 2012-04-30 18:52:26 +02:00
Fabien Potencier
dbd95683aa merged branch pulzarraider/memcache_profiler_update (PR #4150)
Commits
-------

1f6c8d5 [HttpKernel] Added mock objects for Memcache(d) and Redis
e17217b [HttpKernel] Remove destructive flush() from memcache(d) storage profilers

Discussion
----------

[HttpKernel] Memcache and Redis profiler storage update

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

Changes of this PR:

- change ```purge()``` method of memcache(d) profiler storage to delete only required items and be less destructive,
- mock objects for Redis and Memcache(d) storages were added to make unit tests independent from memcache(d)/redis extensions and memcache(d)/redis servers running on localhost.
2012-04-30 17:38:04 +02:00
Fabien Potencier
17b0feea00 merged branch uwej711/2.0 (PR #4160)
Commits
-------

7fe236a [Security] Configure ports in RetryAuthenticationEntryPoint according to router settings

Discussion
----------

[Security] Configure ports in RetryAuthenticationEntryPoint according to...

... router settings

As requested against 2.0 branch ...

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

Currently the ports in RetryAuthenticationEntryPoint are fixed in the constructor call, there is no way to set them when you run your application on different ports.

With this fix the ports are taken from the router configuration.
2012-04-30 17:35:10 +02:00
Fabien Potencier
33c7743063 merged branch adanlobato/master (PR #4130)
Commits
-------

42a73f4 Typo fix

Discussion
----------

[Typo] Removed extra 's'
2012-04-30 17:33:53 +02:00
Uwe Jäger
7fe236a44d [Security] Configure ports in RetryAuthenticationEntryPoint according to router settings
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

Currently the ports in RetryAuthenticationEntryPoint are fixed in the constructor call, there is no way to set them when you run your application on different ports.

With this fix the ports are taken from the router configuration.
2012-04-30 16:39:18 +02:00
Fabien Potencier
b66b6fc99e updated VERSION for 2.0.13 2012-04-30 15:31:20 +02:00
Fabien Potencier
06274dbce6 update CONTRIBUTORS for 2.0.13 2012-04-30 15:30:38 +02:00
Fabien Potencier
a7868a7f24 updated CHANGELOG for 2.0.13 2012-04-30 15:30:03 +02:00
Fabien Potencier
6aa4817b48 updated vendors for 2.0.13 2012-04-30 15:17:53 +02:00
Fabien Potencier
26aa49e295 merged branch johnkary/os400ConsoleBugFix (PR #4152)
Commits
-------

5b92b9e [Console] Selectively output to STDOUT or OUTPUT stream

Discussion
----------

[Console] Selectively output to STDOUT or OUTPUT stream

Originally opened in this PR targeting master, but asked to target 2.0 instead: https://github.com/symfony/symfony/pull/4148

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

As noted in the ticket discussion and linked discussion threads, IBM i5 Series has issues with writing output to STDOUT when viewed via their QP2TERM console. The output is likely not being converted to the correct character-encoding on the system level.

This PR changes the default output stream from `php://stdout` to `php://output` for OS400 environments, which does not exhibit this issue.

I'm using `php_uname('s')` to check for the presence of "OS400", which is at least one of the IBM OS's exhibiting this issue. This check is only done once when executing a Console task and shouldn't see any adverse affects in speed on the 99% other platforms using Symfony.

I'm not a native to the OS400 platform so I can't really anticipate any other possible regressions that might occur from switching output streams for that platform. On my Mac, this change would strip all color output, but the PR code only changes output for OS400 environment. To my knowledge the QP2TERM console doesn't even support color, so no loss there.

I think this change is best to make the Console component at least usable out of the box for anyone else trying to build CLI applications for use on OS400.

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

by igorw at 2012-04-29T19:41:21Z

#4146 might also need a fix for this.

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

by johnkary at 2012-04-29T20:21:39Z

@igorw Hmm. In this case for #4152 when creating a CLI application, `Symfony\Component\Console\Output\ConsoleOutput` is the [default implementation](5b92b9ed43/src/Symfony/Component/Console/Application.php (L113)) used by `Symfony\Component\Console\Application` when not specifying your own `OutputInterface`. Our hard-coded defaults were causing problems out of the box.

I haven't looked too closely at the PRs surrounding the additions of `StreamingResponse` and your recent `OutputStream` but are we assuming anywhere that `php://stdout` is the default stream used when creating a streaming response? If so it MAY require a check similar to what I implemented for Console. My addition was only necessary because the output was being sent to a CLI console. If output is sent to a browser, I don't believe this would be an issue.

If you have something that needs testing on OS400 just ping me.
2012-04-30 15:13:32 +02:00
Fabien Potencier
48c481c269 merged branch stof/fix_monolog_webprocessor (PR #4157)
Commits
-------

b574de3 Fixed tests

Discussion
----------

Fix tests for the monolog webprocessor
2012-04-30 15:05:55 +02:00
Christophe Coevoet
b574de389e Fixed tests 2012-04-30 14:41:37 +02:00
John Kary
5b92b9ed43 [Console] Selectively output to STDOUT or OUTPUT stream
Addresses issues with writing console output for IBM i5 Series (OS400).
The normal QP2TERM shell outputs garbage text when attempting to write
directly to STDOUT, likely because of EBCDIC character-encoding used
on IBM platforms. Writing to the OUTPUT mimics using 'echo' or 'print'
and prints properly in the console.

Fixes #1434
2012-04-29 14:28:50 -05:00
Fabien Potencier
6e9612c795 merged branch iambrosi/spelling (PR #4147)
Commits
-------

7dfd410 Fixes typos

Discussion
----------

Fixed typos
2012-04-29 18:52:41 +02:00
Fabien Potencier
195a1d36c0 merged branch stof/fix_monolog_webprocessor (PR #4151)
Commits
-------

689a40d [MonologBridge] Fixed the WebProcessor

Discussion
----------

[MonologBridge] Fixed the WebProcessor

The WebProcessor can now be registered as a kernel.request listener to
get the request instead of passing it as a constructor argument, which
was broken as the request is not yet available when the logger is
instantiated.

I'm sending it to 2.0 even if the way to use the processor is not BC as this is really a bugfix. The processor was simply unusable with the previous way. Tell me if you think it should only be fixed for 2.1

Fixes #3311
2012-04-29 18:49:15 +02:00
Andrej Hudec
1f6c8d5c7e [HttpKernel] Added mock objects for Memcache(d) and Redis 2012-04-29 01:33:14 +02:00
Ismael Ambrosi
7dfd410481 Fixes typos 2012-04-28 00:51:32 -03:00
Andrej Hudec
e17217b14a [HttpKernel] Remove destructive flush() from memcache(d) storage profilers 2012-04-27 22:40:33 +02:00
Fabien Potencier
4ac3bddb5d Revert "merged branch Tobion/patch-3 (PR #4136)"
This reverts commit 606ddf48c5, reversing
changes made to 00e7a94a8c.
2012-04-27 19:55:49 +02:00
Fabien Potencier
9fbf8555f0 Revert "merged branch Seldaek/master (PR #4133)"
This reverts commit 00e7a94a8c, reversing
changes made to a01dec00f4.
2012-04-27 19:55:40 +02:00
Fabien Potencier
091ede2dd1 merged branch bschussek/issue3994 (PR #4046)
Commits
-------

246c885 [Form] Fixed: Default value of 'error_bubbling' is now determined by the 'single_control' option
d3bb4d0 [Form] Renamed option 'primitive' to 'single_control'
167e64f [Form] Fixed: Field attributes are not rendered in the label anymore. Label attributes are now passed in "label_attr"
68018a1 [Form] Dropped useless test that is guaranteed by OptionsParser tests and that needs to be adapted very often
649752c [Form] Fixed: CSRF token was not displayed on empty complex forms
c623fcf [Form] Fixed: CSRF protection did not run if token was missing
eb75ab1 [Form] Fixed results of the FieldType+FormType merge.

Discussion
----------

[Form] Fixed errors introduced in the FieldType+FormType merge

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #3994, #4000, #2294, #4118
Todo: -

![Travis Build Status](https://secure.travis-ci.org/bschussek/symfony.png?branch=issue3994)

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

by Tobion at 2012-04-22T15:39:20Z

`primitive` is a pretty abstract option name. It depends on the person what he considers primitive. Maybe more explicit naming or better documentation what it means.

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

by bschussek at 2012-04-22T15:47:29Z

Better suggestions?

The distinction here is between primitive and complex forms, where primitive forms are such forms that can be represented by a single HTML tag. This obviously needs to be documented.

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

by Tobion at 2012-04-22T15:49:45Z

Maybe `single_widget` or something like that.

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

by vicb at 2012-04-23T13:09:43Z

@Tobion @bschussek would `elementary` be better than `primitive` ?

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

by vicb at 2012-04-23T13:17:04Z

and `compound \ composite` better than `complex` ?

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

by bschussek at 2012-04-23T14:08:33Z

@vicb I fail to see how elementary/compound is easier to understand than primitive/complex. Maybe single_widget, but what's the opposite of this case? multi_widget?

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

by vicb at 2012-04-23T14:15:09Z

Actually I am fine with anything... as long as it is documented.

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

by bschussek at 2012-04-23T14:22:31Z

Still I think that this unveals a more profound naming problem. How do we (also in the documentation) name forms with children (formerly "forms") and forms without children (formerly "fields")?

Should we refer to them as

* forms and fields?
* complex and primitive forms?
* ...

We must first answer this question before we can find an intuitive option name. If the documentation always switches between different terminologies, neither will it be understandable nor will this option be easy to remember.

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

by vicb at 2012-04-23T15:10:32Z

> Still I think that this unveals a more profound naming problem. How do we (also in the documentation) name forms with children (formerly "forms") and forms without children (formerly "fields")?

To make it clear, I would rather say forms that **can have** children and forms that **can not have** children (i.e. Empty collections have no children but they can have and this is reason why you have to introduce those options, right ? - that could be a good example for the doc).

It will probably be better to refer to "complex" / "primitive" forms in the doc (and use the "form" / "field" terms to explain them).

Note: I think @Tobion concern is that "primitive" / "complex" could be pejorative terms (this is why I have proposed "elementary" / "compound").

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

by Tobion at 2012-04-23T16:00:54Z

1. primitive/complex is subjective (and could be pejorative too)
2. elementary/compound is more explicit so probably better than primitive/complex
3. I dislike this option in general. Does it make sense to change this option from a user perspective? I guess it's always the same as long as the widget structure stays the same. So it should be resolved at a higher level dynamically from the widget structure and not exposed to any configuration.
4. In documentation I would use the terms forms and fields. Because all people with HTML knowledge will understand that fields cannot have sub-fields whereas forms can. But since this distinction is not findable in code, it should be mentioned that all these are implemented as a form hierarchy.

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

by mvrhov at 2012-04-23T16:02:00Z

how about simple and complex?

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

by bschussek at 2012-04-23T16:06:33Z

@Tobion It does not make sense to change this option from the user perspective, still the overloading type has to propagate to FormType whether it is a form or a field, so that the default behaviour is correct.

A second option how to implement this is to add a method `isField` to FormTypeInterface that can be overloaded and receives the options. I don't really like to introduce new methods here unless absolutely required.

What about renaming the option "primitive" to "is_field"? The blocks in the template would then be named "form_widget_field" and "form_widget_form".

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

by tristanbes at 2012-04-25T14:01:06Z

Oh, I should've seen this before, i thought I was doing something wrong. (empty collections gets an input field bug)

Please big :UP: on this. When will it be merged ? @bschussek

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

by Tobion at 2012-04-25T15:30:28Z

+1 for "is_field" and "form_widget_field" but I would rather use "form_widget_compound" instead of "form_widget_form" which is quite strange.

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

by bschussek at 2012-04-26T16:34:04Z

@Tobion "simple" and "compound" then?

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

by Tobion at 2012-04-26T16:49:58Z

no "field" and "compound"

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

by bschussek at 2012-04-26T17:17:02Z

I don't like "field" for a simple reason: Consider the "date" type. We are typically speaking of the "date" field there. But technically, the "date" field is a compound field. So?

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

by Tobion at 2012-04-26T21:17:37Z

I don't understand the open question. You proposed "is_field" and "form_widget_field" yourself. So calling the template block "form_widget_field" is a comprehensible consequence of "is_field". I wouldn't call the date type with multiple inputs a field.

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

by tristanbes at 2012-04-26T21:52:39Z

We should take a decision cause right here i got all my forms that are broken because of the empty collection rendering as input field :-).

I guess we are many in that situation.

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

by bschussek at 2012-04-27T08:28:16Z

I renamed "primitive" to "single_control" now to match with the HTML specification which names all input elements (input, select etc.) "controls". The opposite is now "compound".

Meanwhile, I added a fix for #4118.

@fabpot This is ready for merge now.

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

by Tobion at 2012-04-27T10:22:49Z

Hm, I know naming things is hard and sometimes not really important. But since users need to know which block to override, it is essential to make it clear. I think there is still one issue.
The block is named `form_widget_single_control` in order, as you said, to abstract away if it's an input, select etc. But in fact it can only render `input` and nothing else. So this is misleading.
So you could also simply name it `form_widget_input`.
Apart from that I agree with everything.
2012-04-27 19:13:34 +02:00
Fabien Potencier
606ddf48c5 merged branch Tobion/patch-3 (PR #4136)
Commits
-------

5a85c2a bump master branch to version 2.2

Discussion
----------

bump master branch to version 2.2
2012-04-27 17:57:52 +02:00
Fabien Potencier
00e7a94a8c merged branch Seldaek/master (PR #4133)
Commits
-------

00c4267 Update branch aliases

Discussion
----------

Update master branch alias to target 2.2
2012-04-27 17:57:45 +02:00
Tobias Schultze
5a85c2a0e5 bump master branch to version 2.2 2012-04-27 15:58:17 +03:00
Jordi Boggiano
00c4267726 Update branch aliases 2012-04-27 12:47:50 +02:00