Commit Graph

18626 Commits

Author SHA1 Message Date
Maxime HERMOUET
5f59811c60 [DebugBundle] Add doc example for Twig usage 2014-09-23 16:25:59 +02:00
julien Galenski
e4e00ef78e [TwigBridge] DumpNode and Token parser 2014-09-23 16:25:59 +02:00
Nicolas Grekas
de05cd97b9 [DebugBundle] enhance dump excerpts 2014-09-23 16:25:59 +02:00
Nicolas Grekas
49f13c6eab [HttpKernel] add tests for DumpDataCollector 2014-09-23 16:25:59 +02:00
Nicolas Grekas
081363cbd4 [HttpKernel] tests for DumpListener 2014-09-23 16:25:59 +02:00
Nicolas Grekas
0d8a942cfa [VarDumper] add Stub objects for cutting cleanly and dumping consts 2014-09-23 16:25:59 +02:00
Nicolas Grekas
c8746a43c9 [DebugBundle] add tests for twig and for the bundle 2014-09-23 16:25:59 +02:00
Nicolas Grekas
8d5d970eea [DebugBundle] adjust after review 2014-09-23 16:25:59 +02:00
Nicolas Grekas
eb98c81754 [DebugBundle] dump() + better Symfony glue 2014-09-23 16:25:59 +02:00
Nicolas Grekas
9dea601234 [DebugBundle] global dump() function for daily use 2014-09-23 16:25:57 +02:00
Fabien Potencier
ea6ce1c8af fixed typo 2014-09-23 16:20:22 +02:00
adenkejawen
e85cb7fe2a added the possibility to return null from SimplePreAuthenticationListener 2014-09-23 16:11:05 +02:00
Nicolas Grekas
297d3734f8 [VarDumper] README, LICENSE and composer.json 2014-09-23 14:30:52 +02:00
Nicolas Grekas
a69e962209 [VarDumper] tests for HtmlDumper 2014-09-23 14:30:52 +02:00
Nicolas Grekas
5eaa187f8b [VarDumper] tests for CliDumper 2014-09-23 14:30:52 +02:00
Nicolas Grekas
e6dde33940 [VarDumper] HTML variant of the CLI dumper 2014-09-23 14:30:52 +02:00
Nicolas Grekas
fa81544075 [VarDumper] CLI dedicated dumper and related abstract 2014-09-23 14:30:52 +02:00
Nicolas Grekas
1d5e3f4dc5 [VarDumper] interface for dumping collected variables 2014-09-23 14:30:52 +02:00
Nicolas Grekas
0266072bb3 [VarDumper] casters for DOM objects 2014-09-23 14:30:52 +02:00
Nicolas Grekas
c426d8bc09 [VarDumper] casters for Doctrine objects 2014-09-23 14:30:52 +02:00
Nicolas Grekas
0a92c08699 [VarDumper] casters for PDO related objects 2014-09-23 14:30:51 +02:00
Nicolas Grekas
da3e50a2bf [VarDumper] casters for SPL data structures 2014-09-23 14:30:51 +02:00
Nicolas Grekas
c91bc83c86 [VarDumper] casters for exceptions representation 2014-09-23 14:30:51 +02:00
Nicolas Grekas
3ddbf4b6b9 [VarDumper] add casters for per class/resource custom state extraction 2014-09-23 14:30:51 +02:00
Nicolas Grekas
5b7ae2862f [VarDumper] symfony_debug ext. fast and memory efficient cloning algo 2014-09-23 14:30:51 +02:00
Nicolas Grekas
07135a0959 [VarDumper] algo to clone any PHP variable to a breadth-first queue 2014-09-23 14:30:51 +02:00
Nicolas Grekas
4bf9300c09 [Debug] a README for the debug extension 2014-09-23 14:30:51 +02:00
Julien Pauli
eec5c92c35 [Debug] Symfony debug extension 2014-09-23 14:30:51 +02:00
Bernhard Schussek
759ae1a7a1 [Form] Moved POST_MAX_SIZE validation from FormValidator to request handler 2014-09-23 14:27:03 +02:00
Fabien Potencier
c3feed6df2 minor #11504 [WebProfilerBundle] turbolinks compatibility (DraCzris)
This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] turbolinks compatibility

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Fix profiler when using turbolinks. (Without this, profiler is rendered without assets)

Commits
-------

c65b4c7 [WebProfilerBundle] turbolinks compatibility
2014-09-23 12:52:48 +02:00
Fabien Potencier
aa594450d2 feature #11716 [OptionsResolver] Added a light-weight, low-level API for basic option resolving (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[OptionsResolver] Added a light-weight, low-level API for basic option resolving

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11705
| License       | MIT
| Doc PR        | symfony/symfony-docs#4159

See [the updated documentation](https://github.com/webmozart/symfony-docs/blob/issue11705/components/options_resolver.rst) for details on the usage of the simple API.

The most important motivation for this change is DX and speed. The basic features of the component should be easily usable in a wide variety of use cases without impacting performance.

For DX reasons, I added the static methods to the `Options` class, which makes the code concise and easy to read and understand:

```php
use Symfony\Component\OptionsResolver\Options;

$options = Options::validateRequired($options, 'format');

$options = Options::validateTypes($options, array(
    'format' => array('string', 'int'),
    'calendar' => 'int',
));

$options = Options::validateValues($options, array(
    'calendar' => array(
        \IntlDateFormatter::GREGORIAN,
        \IntlDateFormatter::TRADITIONAL,
    ),
));

$options = Options::resolve($options, array(
    'format' => null,
    'calendar' => \IntlDateFormatter::GREGORIAN,
));
```

If you need to distribute the option configuration, this PR also extracts the configuration part of the `OptionsResolver` class into a new class `OptionsConfig`, which can be passed around. When the configuration is complete, pass the config object to `Options::resolve()` as second argument:

```php
$config = new OptionsConfig();

$config->setDefaults(array(
    'format' => \IntlDateFormatter::MEDIUM,
    'calendar' => \IntlDateFormatter::GREGORIAN,
));

$options = Options::resolve($options, $config);
```

Consequently - since `OptionsResolver` extends `OptionsConfig` - the two following statements now become identical:

```php
$options = $resolver->resolve($options);
$options = Options::resolve($options, $resolver);
```

Commits
-------

9066025 [OptionsResolver] Added a light-weight, low-level API for basic option resolving
2014-09-23 12:46:07 +02:00
Fabien Potencier
cc63edbfa8 minor #11994 [Form] Changed "allow_html5" to "html5" (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Form] Changed "allow_html5" to "html5"

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This is a follow-up to #8291, which I missed before it was merged. IMO "allow_html5" is a confusing name. We don't "allow" HTML5, but we use it - or we don't. I think "html5" conveys that meaning well and is shorter at the same time.

Commits
-------

ad171be [Form] Changed "allow_html5" to "html5"
2014-09-23 12:31:32 +02:00
rpg600
47802105d3 [Form] Add a form error if post_max_size has been reached. 2014-09-23 12:20:25 +02:00
Fabien Potencier
3d11433950 bug #11079 Response::isNotModified returns true when If-Modified-Since is later than Last-Modified (skolodyazhnyy)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11079).

Discussion
----------

Response::isNotModified returns true when If-Modified-Since is later than Last-Modified

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10501,  #10857
| License       | MIT
| Doc PR        |

Patch for #10501. I have reworked a bit `Response::isNotModified` method to make it more readable. Now it's comparing If-Modified-Since and Last-Modified as dates.

Commits
-------

42ec76e Response::isNotModified returns true when If-Modified-Since is later than Last-Modified
2014-09-23 12:19:54 +02:00
Sergey Kolodyazhnyy
42ec76e9d0 Response::isNotModified returns true when If-Modified-Since is later than Last-Modified 2014-09-23 12:19:50 +02:00
Bernhard Schussek
ad171be6e9 [Form] Changed "allow_html5" to "html5" 2014-09-23 12:15:17 +02:00
Fabien Potencier
0050b8d458 feature #10698 [Security] Added a REMOTE_USER based listener to security firewalls (Maxime Douailin)
This PR was squashed before being merged into the 2.6-dev branch (closes #10698).

Discussion
----------

[Security] Added a REMOTE_USER based listener to security firewalls

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | /
| License       | MIT
| Doc PR        | symfony/symfony-docs#3912
TODO
- [x] submit changes to the documentation

I've seen myself implementing a few times a REMOTE_USER based authentication listener, as a large part of security modules for Apache (Kerberos, CAS, and more) are providing the username via an environment variable.

So I thought this could benefit the whole community if directly included in the framework. It is very similar to the X509AuthenticationListener, and basing the RemoteUserAuthenticationListener on the AbstractPreAuthenticatedListener is relevant and very convenient.

Using the X509AuthenticationListener could be possible, but it is confusing to use it directly when your authentication is not certificate based.

Please let me know if I need to update anything.

Regards

Commits
-------

a2872f2 [Security] Added a REMOTE_USER based listener to security firewalls
2014-09-23 11:54:13 +02:00
Maxime Douailin
a2872f21b9 [Security] Added a REMOTE_USER based listener to security firewalls 2014-09-23 11:54:11 +02:00
Fabien Potencier
1fb8f8817a feature #11183 [Security] add an AbstractVoter implementation (Inoryy)
This PR was squashed before being merged into the 2.6-dev branch (closes #11183).

Discussion
----------

[Security] add an AbstractVoter implementation

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/4257

The idea is to reduce boilerplate required to create custom Voter, doing most of the work for the developer and guiding him on the path by providing simple requirements via abstract methods that will be called by the AbstractVoter.

P.S. This is meant to be a [DX Initiative](https://github.com/symfony/symfony/issues?labels=DX&state=open) improvement.

Commits
-------

d3bafc6 [Security] add an AbstractVoter implementation
2014-09-23 11:51:23 +02:00
Roman Marintšenko
d3bafc6b48 [Security] add an AbstractVoter implementation 2014-09-23 11:51:18 +02:00
Fabien Potencier
36116fccf6 [Security] made it possible to override the default success/failure handler 2014-09-23 11:07:07 +02:00
Fabien Potencier
56a7a60f52 minor #11992 [Console][Command][LogicException] The command name cannot be empty. #11991 (skafandri)
This PR was submitted for the 2.5 branch but it was merged into the 2.6-dev branch instead (closes #11992).

Discussion
----------

[Console][Command][LogicException] The command name cannot be empty. #11991

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11991
| License       | MIT
| Doc PR        | #11991

Commits
-------

7d6fbd9 [Console][Command][LogicException] The command name cannot be empty. #11991
2014-09-23 11:01:06 +02:00
skafandri
7d6fbd99a2 [Console][Command][LogicException] The command name cannot be empty. #11991 2014-09-23 11:01:06 +02:00
Fabien Potencier
d059b1edae fixed CS 2014-09-23 08:31:13 +02:00
Fabien Potencier
0da03cf98b feature #8291 [Form] Add allow_html5 option to date and time FormType to disable HTML5 input type (csanquer)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Form] Add allow_html5 option to date and time FormType to disable HTML5 input type

[Form] added allow_html5 option to date and time FormType to disable HTML5 input type when widget is set to single_text

| Q                    | A
| --------------------- | ---
| Bug fix?          | no
| New feature?   | yes
| BC breaks?     | no
| Deprecations? | no
| Tests pass?    | yes
| Fixed tickets   | #6927 #7123
| License           | MIT
| Doc PR           |

With this little patch we can have a single text widget without HTML5 date input type which is required when using some javascript date or time picker .

Commits
-------

392d6c7 add allow_html5 option to date and time FormType to disable HTML5 date input when widget is set to single_text
2014-09-23 08:30:39 +02:00
Fabien Potencier
8ac12257f3 fixed CS 2014-09-23 08:15:49 +02:00
Fabien Potencier
8e8488092f feature #11815 Added some methods to improve the handling of auto_mapping feature (goetas)
This PR was squashed before being merged into the 2.6-dev branch (closes #11815).

Discussion
----------

Added some methods to improve the handling of auto_mapping feature

| Q             | A
| ------------- | ---
| Bug fix?      |no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?  | yes
| Fixed tickets | https://github.com/doctrine/DoctrineBundle/issues/60
| License       | MIT

This PR is a part that is required by:
* https://github.com/doctrine/DoctrineMongoDBBundle/pull/267
* https://github.com/doctrine/DoctrineBundle/pull/321

The proposed PRs are an alternative to https://github.com/symfony/symfony/pull/11650 and https://github.com/doctrine/DoctrineBundle/pull/322

Commits
-------

2e30a43 Added some methods to improve the handling of auto_mapping feature
2014-09-23 08:15:19 +02:00
Asmir Mustafic
2e30a431d0 Added some methods to improve the handling of auto_mapping feature 2014-09-23 08:15:16 +02:00
Fabien Potencier
ef399b1071 fixed some unit tests 2014-09-23 07:29:08 +02:00
Fabien Potencier
7096c8d769 Merge branch '2.5'
* 2.5:
  typo fixed in AbstractProcessTest (getoutput() => getOutput())
  Avoid question mark and asterisk in folder names to prevent windows filesystem issues.
  [Translation] [Config] Clear libxml errors after parsing XML file
  check for the Validator if forms are enabled
  Clear json_last_error
  Fix JsonSerializable namespace
  Catch exceptions to restore the error handler
  [HttpFoundation] Silent only JSON errors
2014-09-23 07:25:18 +02:00