Commit Graph

11580 Commits

Author SHA1 Message Date
Olivier Maisonneuve
23962fc47c validateOptionValues throw a notice if an allowed value is set and the corresponding option isn't. 2012-10-03 11:57:12 +02:00
Fabien Potencier
f8a6cf2d31 merged branch bschussek/issue5578 (PR #5655)
This PR was merged into the 2.1 branch.

Commits
-------

2568432 [Form] Hardened code of ViolationMapper against errors

Discussion
----------

[Form] Hardened code of ViolationMapper against errors

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

This ticket improves the code of ViolationMapper to reduce the risk of bugs and in order to make further bug fixing easier. It was implemented while trying to solve #5578 and is semantically equivalent to the previous version.
2012-10-03 08:13:50 +02:00
Bernhard Schussek
2568432dd8 [Form] Hardened code of ViolationMapper against errors 2012-10-03 06:43:02 +02:00
Keri Henare
6c59fbdb59 [HttpFoundation] Fixed #5611 - Request::splitHttpAcceptHeader incorrect result order.
* Makes items with equal q-values return in the original provided order.
* Fixes tests to reflect this behavior
2012-10-03 09:31:34 +13:00
Fabien Potencier
566ad10f67 merged branch bschussek/issue5605 (PR #5653)
This PR was merged into the 2.1 branch.

Commits
-------

2d41229 [Form] Fixed negative index access in PropertyPathBuilder

Discussion
----------

[Form] Fixed negative index access in PropertyPathBuilder

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5605
Todo: -
License of the code: MIT
Documentation PR: -
2012-10-02 20:45:03 +02:00
Bernhard Schussek
2d412292d5 [Form] Fixed negative index access in PropertyPathBuilder 2012-10-02 20:20:14 +02:00
Fabien Potencier
5efe4037fa merged branch raresvla/master (PR #5646)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5646).

Commits
-------

4509c9e Update src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf

Discussion
----------

[validator] Fixed error messages for Length validator, locale: "ro"

....ro.xlf

Pluralization of $minMessage, $maxMessage and $exactMessage is required in LengthValidator.
The English version is already updated.
2012-10-02 18:39:32 +02:00
Rares Vlasceanu
ed1cf546e0 Update src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf
Pluralization of $minMessage, $maxMessage and $exactMessage is required in LengthValidator.
The English version is already updated.
2012-10-02 18:39:32 +02:00
Fabien Potencier
0bfa86ce8a Merge branch '2.1'
* 2.1:
  [2.1] Fix SessionHandlerInterface autoloading
  Remove executable bit from HttpKernel/DependencyInjection/ConfigurableExtension.php
  [2.0][http-foundation] Fix Response::getDate method
  [DoctrineBridge] Require class option for DoctrineType
  [HttpFoundation] fixed the path to the SensioHandlerInterface class in composer.json
  Support the new Microsoft URL Rewrite Module for IIS 7.0. @see http://framework.zend.com/issues/browse/ZF-4491 @see http://framework.zend.com/code/revision.php?repname=Zend+Framework&rev=24842
  fixed undefined variable
  hasColorSupport does not take an argument
  Improve FilterResponseEvent docblocks Response ref
2012-10-02 12:23:35 +02:00
Fabien Potencier
49ca648245 Merge branch '2.0' into 2.1
* 2.0:
  [2.0][http-foundation] Fix Response::getDate method
  Support the new Microsoft URL Rewrite Module for IIS 7.0. @see http://framework.zend.com/issues/browse/ZF-4491 @see http://framework.zend.com/code/revision.php?repname=Zend+Framework&rev=24842
  fixed undefined variable
  hasColorSupport does not take an argument
  Improve FilterResponseEvent docblocks Response ref

Conflicts:
	tests/Symfony/Tests/Component/HttpFoundation/ResponseTest.php
2012-10-02 12:22:56 +02:00
Fabien Potencier
2f5a4d7dbc merged branch igorw/patch-1 (PR #5640)
This PR was merged into the 2.1 branch.

Commits
-------

47d7531 [2.1] Fix SessionHandlerInterface autoloading

Discussion
----------

[2.1] Fix SessionHandlerInterface autoloading

The path for 2.1 is also incorrect. For master, this was fixed in 3b47088c58. This patch adds the `target-dir` prefix to the autoloading base directory of the HttpFoundation stubs.

Note: Issue only affects 2.1, but it probably means `symfony/http-foundation` never worked on PHP 5.3.

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

by stof at 2012-10-01T14:33:18Z

@igorw Can you fix the Locale component too ?

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

by igorw at 2012-10-01T14:42:50Z

As per IRC, locale does not have autoloading for 2.1.
2012-10-01 20:40:45 +02:00
Igor Wiedler
47d7531112 [2.1] Fix SessionHandlerInterface autoloading
The path for 2.1 is also incorrect. For master, this was fixed in 3b4708. This patch adds the `target-dir` prefix to the autoloading base directory of the HttpFoundation stubs.
2012-10-01 17:30:10 +03:00
Fabien Potencier
7b22da693c merged branch jmikola/2.1-doctrine-type-option (PR #5632)
This PR was merged into the 2.1 branch.

Commits
-------

3cc3c67 [DoctrineBridge] Require class option for DoctrineType

Discussion
----------

[DoctrineBridge] Require class option for DoctrineType

This is a resubmission of #5289 against the 2.1 branch.

```
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 stof at 2012-10-01T11:28:39Z

👍
2012-10-01 13:42:36 +02:00
Fabien Potencier
cab4f164f2 merged branch rybakit/permissions (PR #5637)
This PR was merged into the 2.1 branch.

Commits
-------

315ffc7 Remove executable bit from HttpKernel/DependencyInjection/ConfigurableExtension.php

Discussion
----------

[HttpKernel] Remove executable bit from ConfigurableExtension.php

See #5636
2012-10-01 12:59:10 +02:00
Eugene Leonovich
315ffc7f69 Remove executable bit from HttpKernel/DependencyInjection/ConfigurableExtension.php 2012-10-01 11:23:15 +02:00
Fabien Potencier
7a661d5a60 merged branch fabpot/data-collector (PR #5619)
This PR was merged into the master branch.

Commits
-------

2a673d8 Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher

Discussion
----------

Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher

The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.

The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.

The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.

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

by stof at 2012-09-27T13:38:24Z

You should add some tests for your new TraceableDispatcher
2012-10-01 01:47:45 +02:00
Fabien Potencier
2a673d8626 Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher
The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.

The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.

The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.
2012-10-01 01:46:38 +02:00
Fabien Potencier
93b084c73d Revert "merged branch fabpot/data-collector (PR #5619)"
This reverts commit 3f0a370e3b, reversing
changes made to bf1ab93130.
2012-10-01 01:26:03 +02:00
Fabien Potencier
3f0a370e3b merged branch fabpot/data-collector (PR #5619)
This PR was merged into the master branch.

Commits
-------

7ef2e9d Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher

Discussion
----------

Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher

The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.

The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.

The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.

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

by stof at 2012-09-27T13:38:24Z

You should add some tests for your new TraceableDispatcher
2012-10-01 01:06:00 +02:00
Fabien Potencier
7ef2e9d240 Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher
The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.

The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.

The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.
2012-09-30 20:11:37 +02:00
Fabien Potencier
bf1ab93130 [Console] fixed typo 2012-09-30 16:27:49 +02:00
Fabien Potencier
302c0e4647 merged branch benja-M-1/hotfix-response (PR #5633)
This PR was squashed before being merged into the 2.0 branch (closes #5633).

Commits
-------

5c60a65 [2.0][http-foundation] Update phpdoc
c17462f [2.0][http-foundation] Fix response getDate method

Discussion
----------

[2.0][http-foundation] Fix Response::getDate method

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

Reference #5588, #5629
2012-09-30 16:03:58 +02:00
Benjamin Grandfond
1a53b121aa [2.0][http-foundation] Fix Response::getDate method 2012-09-30 16:03:57 +02:00
Fabien Potencier
9bdad739ef merged branch bamarni/classmap-paths (PR #5634)
This PR was merged into the master branch.

Commits
-------

3b47088 fixed some classmap paths

Discussion
----------

fixed some classmap paths

Since #5213, an error occurs when requiring the locale or http-foundation package with composer, because it doesn't automatically prepend the target-dir to the classmaps.

Cf. here for example : https://travis-ci.org/#!/doctrine/DoctrineMongoDBBundle/jobs/2608238

cc @jalliot
2012-09-30 16:02:34 +02:00
Bilal Amarni
3b47088c58 fixed some classmap paths 2012-09-30 14:29:13 +02:00
Fabien Potencier
649fd5b3d2 Merge branch 'progress-helper'
* progress-helper:
  [Console] added some basic tests for the ProgressHelper class
  [Console] converted options to proper setters in ProgressHelper
  [2.2][Console] Add ProgressHelper
2012-09-30 02:51:51 +02:00
Jeremy Mikola
3cc3c67e5a [DoctrineBridge] Require class option for DoctrineType 2012-09-29 16:16:47 -07:00
Fabien Potencier
7b3297621a [Console] added some basic tests for the ProgressHelper class 2012-09-30 00:37:08 +02:00
Fabien Potencier
264a5ccc0c merged branch simensen/framework-secret (PR #5631)
This PR was merged into the master branch.

Commits
-------

8bc9f75 Make secret not be required

Discussion
----------

[FrameworkBundle] Make secret not be required

Bug fix: no
Feature addition: yes
Backwards compatibility break: no (questionable)
Symfony2 tests pass: yes
License of the code: MIT
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

Framework bundle currently requires that the `secret` key under `framework` be set. The end result is that `kernel.secret` is made available. This is, as far as I can tell, the only required configuration for Framework bundle.

The only thing that currently uses `kernel.secret` is the Form component and then only if CSRF protection is enabled.

In the spirit of making Framework more decoupled and not requiring things in the case you don't need them I would like to make framework secret optional.

I followed the pattern used by CSRF support for when Session is disabled to throw a `LogicException` stating that if CSRF support is enabled then the secret should be set.

For anyone who currently depends on `kernel.secret`, if someone ends up *not* defining `kernel.secret` there will be a dependency error on kernel configuration as `kernel.secret` will not be made available. The biggest downside to this that I could see is that the error message may be slightly confusing; it will complain that there is a dependency on `kernel.secret` when that is generally set by way of adding the Framework secret to the configuration.

As this relates to Symfony Standard Edition, there should be no changes as there is a default secret set there already anyway.
2012-09-29 23:33:07 +02:00
Fabien Potencier
729e3bfcaf [Console] converted options to proper setters in ProgressHelper 2012-09-29 22:11:59 +02:00
Fabien Potencier
2598323632 merged branch leek/feature/progress-helper (PR #3501)
This PR was squashed before being merged into the master branch (closes #3501).

Commits
-------

4f3ded7 Actually this is worse
72a1c65 * Coding standards fixes * Changed `started` to `startTime` * Other fixes/edits
8249928 * Weeks/months/years is probably unrealistic * Set some sensible padding defaults * Use isset() instead of is_array()
37b62bf Fixing bug for elapsed time between 1 and 2 seconds
8fe4568 Special formatting for when there is no maximum set
75f532f Minor docblock updates
e436e1a Adding ProgressHelper for Console Component

Discussion
----------

[2.2][Console] Add ProgressHelper

[![Build Status](https://secure.travis-ci.org/leek/symfony.png?branch=feature/progress-helper)](http://travis-ci.org/leek/symfony)

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

--

I find myself needing some sort of progress indicator in most of my Console applications.
If this is something that could possibly be apart of Symfony, that would be great.

**Example:**
![Progress Example](http://i.imgur.com/a0wGQ.gif)

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

by jmikola at 2012-03-05T03:08:24Z

Do you have an example of this being used within a console command?

I'd be curious what the performance overhead is. My earliest console commands (nearly 2 years ago) would print status during each iteration (for a database migration) and I found the impact noticeable. After some time, I revised it to only print each X iterations, which often matched up with the batch size inserts/updates.

But for the last year, I've been using [declare(ticks=X)](http://php.net/manual/en/control-structures.declare.php) and have been quite happy with the results. By tuning the tick interrupt, the performance overhead is very small. It's especially helpful when dealing with processing code that is difficult to interrupt with a manual call to update the progress display, as PHP takes care of invoking the tick handler for me. I've thought about making such a console component helper for it, but I think the implementation is too invasive to abstract into a helper.

Here's an example of it being used in OrnicarMessageBundle's [MongoDBMigrateMetadataCommand](https://github.com/ornicar/OrnicarMessageBundle/blob/master/Command/MongoDBMigrateMetadataCommand.php).

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

by leek at 2012-03-05T04:05:29Z

@jmikola: Here is a simple example:

```php
<?php
// ...
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $progress = $this->getHelperSet()->get('progress');
        $progress->start($output, 50);

        $i = 0;
        while ($i++ < 50) {
            usleep(mt_rand(20000, 200000));
            $progress->advance();
        }

        $progress->finish();
    }
```

The performance overhead shouldn't be much more than a standard `$output->write()` call. When used with a loop doing 1000's of iterations, you can set the `redrawFreq` option to something more appropriate to control how often the progress indicator is redrawn to the console.

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

by leek at 2012-03-10T10:05:32Z

Added some minor updates along with an example GIF of 2 of the progress bars (see edited PR).

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

by jmikola at 2012-03-10T15:22:29Z

Why does `1 sec` flash over to `1 secs` before `2 secs` is rendered?

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

by henrikbjorn at 2012-03-10T15:26:08Z

👍

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

by leek at 2012-03-10T16:07:08Z

@jmikola: Thanks! I didn't even notice that. Fixed.

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

by drak at 2012-03-11T09:04:58Z

What an amazing PR.  I feel like I just have to write some code that uses this feature just because it's there!

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

by henrikbjorn at 2012-03-11T09:55:50Z

This is needed a lot, we have a bunch of import scripts where this is useful.

@fabpot what are your thoughts on this?

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

by francoispluchino at 2012-03-14T12:34:38Z

👍

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

by vicb at 2012-03-14T13:00:42Z

could you please order the properties & methods by visibility according to the Sf2 CS.

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

by leek at 2012-03-14T19:08:52Z

No problem - I'll make the requested changes tonight.

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

by stof at 2012-04-03T22:48:45Z

@fabpot ping

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

by stloyd at 2012-04-14T09:46:31Z

@fabpot Any hope to get this in 2.1 ?

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

by mvriel at 2012-05-15T19:28:34Z

👍

Tried it out by manually including it in my project and works like a charm

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

by blaugueux at 2012-05-23T18:46:15Z

Up ! It will be great to have this feature in the next release.

@fabpot ping

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

by guilhermeblanco at 2012-05-28T22:58:35Z

@fabpot tried on my app and everything works fine.
Any plans to merge this one into 2.1?

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

by damonjones at 2012-05-29T02:31:39Z

+1
This would be a very nice feature to have in 2.1.

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

by fabpot at 2012-05-29T06:18:57Z

This is scheduled for 2.2.

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

by Burgov at 2012-08-16T13:04:34Z

I have a service which downloads a file using wget though the console component, and reads the progress from stderr. Rather than advancing in steps, i'd like to be able to set the current progress. Something like this method might be a nice addition:

```php
    public function setCurrent($value, $redraw = false)
    {
        $this->advance($value - $this->current, $redraw);
    }
```
2012-09-29 21:39:42 +02:00
leek
4b89aae98c [2.2][Console] Add ProgressHelper 2012-09-29 21:39:40 +02:00
Beau Simensen
8bc9f75642 Make secret not be required 2012-09-29 12:17:16 -07:00
Fabien Potencier
4e3ea22736 [HttpFoundation] fixed the path to the SensioHandlerInterface class in composer.json 2012-09-29 18:56:30 +02:00
Fabien Potencier
dda2f7cdb3 merged branch jalliot/autoloader-update (PR #5213)
This PR was merged into the master branch.

Commits
-------

92e10a8 Updated HttpFoundation and Locale for proper Composer autoloading

Discussion
----------

Updated HttpFoundation and Locale for proper Composer autoloading

This PR uses better Composer autoloading strategy for the stubs in HttpFoundation and Locale.

It also fixes a bug inside HttpFoundation's composer.json file where the path for SessionHandlerInterface was wrong.

[![Build Status](https://secure.travis-ci.org/jalliot/symfony.png?branch=autoloader-update)](http://travis-ci.org/jalliot/symfony)

After merging this PR and updating the vendors of the SE, you can also merge symfony/symfony-standard#387

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

by datiecher at 2012-09-05T11:15:39Z

Any updates on this issue?

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

by jalliot at 2012-09-05T16:43:46Z

Well I guess it is up to @fabpot to decide now :)

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

by drak at 2012-09-07T11:59:22Z

> It also fixes a bug inside HttpFoundation's composer.json file where the path for SessionHandlerInterface was wrong.

If so should be part of a separate PR imo.
2012-09-29 18:51:40 +02:00
Fabien Potencier
5984dee719 merged branch sasezaki/ZF-4491 (PR #5222)
This PR was submitted for the master branch but it was merged into the 2.0 branch instead (closes #5222).

Commits
-------

60cd7c0 [HttpFoundation] Support the new Microsoft URL Rewrite Module for IIS 7.0. @see http://framework.zend.com/issues/browse/ZF-4491 @see http://framework.zend.com/code/revision.php?repname=Zend+Framework&rev=24842

Discussion
----------

[HttpFoundation] Support the new Microsoft URL Rewrite Module for IIS 7.0

@see http://framework.zend.com/issues/browse/ZF-4491
@see http://framework.zend.com/code/revision.php?repname=Zend+Framework&rev=24842
feel free, merge this or not.

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

by stloyd at 2012-08-09T09:41:18Z

Also this PR should be made against `2.0` branch.

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

by fabpot at 2012-09-18T17:24:26Z

@sasezaki Can you open a PR for the 2.0 branch? Thanks.
2012-09-28 21:25:17 +02:00
sasezaki
7444cb9725 Support the new Microsoft URL Rewrite Module for IIS 7.0. @see http://framework.zend.com/issues/browse/ZF-4491 @see http://framework.zend.com/code/revision.php?repname=Zend+Framework&rev=24842 2012-09-28 21:25:17 +02:00
Fabien Potencier
2c4ed86197 merged branch dlsniper/wpb-improvements (PR #5518)
This PR was squashed before being merged into the master branch (closes #5518).

Commits
-------

3303ca2 WPB and WDT improvements
be194cb Changed icons to be a bit more consistent
08241b8 Added minimize option to Web Profiler panels

Discussion
----------

[2.2][WebProfilerBundle] Added minimize option to Web Profiler panels

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: ~

I've added a minimize option to the profiler bundle so that you can have more space to work with on the panels.
You can view it in action here:http://sf2demo.rodb.ro/app_dev.php/

Feedback is welcomed!

Thanks!

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

by dlsniper at 2012-09-15T13:36:51Z

I could add a remember option via a cookie if you think this would help, I know I'd want one, but I'm not sure about the general opinion about this. Let me know if I should do it.

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

by stof at 2012-09-15T17:05:58Z

The profiler is totally broken when minimizing the menu in your demo.

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

by lennerd at 2012-09-15T17:10:54Z

I would not make it disappear completely. So I think a combination of Cookie and a small visual for open it again would be great to have.

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

by dlsniper at 2012-09-15T17:15:06Z

@stof I've only enabled a few panels to work in the demo, rest defaults to DB panel. If this is what you mean then it's not broken, it's designed to do so. I've tested the thing on Opera, FF and Chrome (on Linux) before uploading the demo/PR so I'm not sure what's broken. Can you please provide a screenshot?

@lennerd I could be doing something like only display it in the upper left corner and appear on mouse over as an overlay. Would that be better?

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

by stof at 2012-09-15T17:21:22Z

@dlsniper what I mean is that the text of the menu does not disappear. It simply goes over the panel itself as the menu becomes smaller. And this appears for all panels I tried.

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

by stof at 2012-09-15T17:22:32Z

hmm, sorry. It is a browser cache issue. It seems like your server was sending cache headers for the assets, and as I already looked at the demo previously (for your DoctrineBundle PR), it kept the old CSS

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

by dlsniper at 2012-09-15T17:25:09Z

@stof no problem, the server is configured a bit more on caching side in order to speed it up and save bandwidth ;)

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

by lennerd at 2012-09-15T17:38:41Z

@dlsniper I would use the close button changing to maybe an arrow in the bottom right. So it's more intuitive and you can simply show and hide it if you only want to take a quick look at a small detail behind it.

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

by henrikbjorn at 2012-09-15T18:08:02Z

What about making this the default, the icons are self explanatory already. The title would then be the "link" text instead.

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

by dlsniper at 2012-09-15T20:30:51Z

@henrikbjorn I wouldn't make this by default as new people might find it a bit confusing. Hence the suggestion to use the cookie to remember the preference.

---

Also I'm trying not to break the current format of the menu too much as hiding all that stuff by hand is pain but if I'm allowed to break the current way of displaying the left menu then this is going to be easy.

What I didn't understood so far is why is the toolbar displayed on the top as well since we have it on the left side already so I've remove it from my current changes (will be up soonish).

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

by dlsniper at 2012-09-15T21:10:03Z

@lennerd what exactly do you mean by 'I would use the close button' there's no close button on the profiler page, only on the toolbar.

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

by lennerd at 2012-09-15T21:21:20Z

That was the button I was talking about. So that there is a little close button at the bottom right for toggling the toolbar.

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

by dlsniper at 2012-09-15T23:14:06Z

I've changed the way the menu minimizes now, it hides in the top left corner and it maintains its state on refresh. I'll do something similar for the toolbar tomorrow.

You can view it on the same URL.

Please do leave feedback. Thanks!

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

by lennerd at 2012-09-16T01:02:27Z

Sorry. I misunderstand your PR.

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

by stof at 2012-09-16T03:01:06Z

@dlsniper The toolbar is displayed at the top because it gives a quick overview without having to go in each panel. So removing it is a bad idea IMO.

And hiding everything is a bad idea IMO. It means navigating is impossible, making it usable when minimizing it (and btw, this would make the cookie a non-sense as it would hide the menu for subsequent pages)

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

by fabpot at 2012-09-16T06:38:08Z

-1 for removing the toolbar at the top

I prefer the first version where you only hide the menu text but leave the icons. Keeping the state in a cookie is also a must (that cookie might be used to store some other states in the profiler too).

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

by Partugal at 2012-09-16T08:14:11Z

i'm not see first version but show icons without text is more useful.
imho minimize trigger should be always placed on top as it showns in minized state

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

by Partugal at 2012-09-16T08:24:49Z

http://s14.postimage.org/qkdcr8d4h/image.png

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

by dlsniper at 2012-09-16T09:06:50Z

@fabpot I've just had a look on how the timeline stores the selected value and it's using the local storage capabilities. Should I drop the cookie and use the local storage as well to have some sort of uniformity?
Also is there any reason why no generic JS library is used? I'm thinking now about jQuery mostly but any other should do just fine I think. I'm not saying that we should use a library when displaying the WDT as it might bump into issues with the frontend but for the rest of the profiler I guess it wouldn't be a problem to use a library, no?

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

by fabpot at 2012-09-16T09:15:37Z

Let's use the local storage for better consistency. I don't want to embed a JS library as we only need basic JS scripts.

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

by lennerd at 2012-09-16T10:29:20Z

@dlsniper Do we need the up and down arrows any longer?

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

by dlsniper at 2012-09-16T14:24:27Z

I've added a minimize mode to the toolbar but the 'design' isn't the best all around, I'll try to improve it in the future.
It also remembers the state of the toolbar so that you don't need to hide it every time.

@lennerd we don't need the up/down arrows for now, I've removed on the last commit. Thank you for the new icons ;)

L.E.
I've made some sort of rounded corner/gradient background in for the minimized toolbar

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

by dlsniper at 2012-09-18T22:02:35Z

@pborreli thanks for the idea regarding to auto-minimize on window resize, I'll implement it soon, I don't really have time right now to add the event handling part to Sfjs.

L. E.
I'm not going to implement the auto-resize as it proved not to be that useful given the fixed width of the panel. If it proves to be a requested thing then I'll improve it if no one else does it before me :)

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

by dlsniper at 2012-09-19T20:52:43Z

If there's nothing else left to be changed/improved/added, I'll lift the WIP tag of this PR so that it can be merged if you consider it.

@fabpot, if this gets its way to the repository, should I rebase this before merging so that it catches the next Symfony 2.1 release as it doesn't break anything? I don't mean the very next release which I've read that it would be done when Doctrine will release their new version but the version after that.

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

by fabpot at 2012-09-19T20:56:45Z

This is a new feature, so it can only be included in the master branch.

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

by dlsniper at 2012-09-23T12:27:41Z

As soon as this feature goes in master I'll start working on adding AJAX requests to the toolbar to make it even more useful.

Let me know if this change is good to merge or needs more work.

Thanks @stof for all the input and @lennerd for the icons.

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

by stof at 2012-09-23T13:40:38Z

Adding which ajax requests to the toolbar ?

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

by dlsniper at 2012-09-23T13:49:43Z

'Userland' AJAX requests, so that one could access the information from an AJAX request more straight forward
2012-09-28 21:16:51 +02:00
Florin Patan
310c2f98a9 [2.2][WebProfilerBundle] Added minimize option to Web Profiler panels 2012-09-28 21:16:50 +02:00
Fabien Potencier
33abe78e6c merged branch h4ck3rm1k3/Undefined_Security_Http_Firewall_ContextListener3 (PR #5622)
This PR was submitted for the master branch but it was merged into the 2.0 branch instead (closes #5622).

Commits
-------

538f8c7 fixed undefined variable

Discussion
----------

Undefined security http firewall context listener3

Updated minimal patch,
First patch from static code analysis, $value should be $token I guess. please check.

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

by h4ck3rm1k3 at 2012-09-27T18:00:18Z

I have reverted the admin, i could create a new branch if needed. you can just cherrypick 	 e9bb5a8 that would be easier.

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

by h4ck3rm1k3 at 2012-09-27T18:29:36Z

I squashed it down to one commit. thanks for your patience and help.
2012-09-28 21:09:10 +02:00
James Michael DuPont
b3d06dda44 fixed undefined variable 2012-09-28 21:09:10 +02:00
Fabien Potencier
926dd1dcd6 merged branch rrehbeindoi/error-error (PR #5539)
This PR was merged into the master branch.

Commits
-------

7fe44da Whitespace corrections
6d30f20 Switched to using a method to get original class name that did not require string parsing
3c8d607 Changed test to use a longer form, complete check of the contents of the trace
de77c88 Whitespace correction
03a7bb9 Added a unit test to verify incomplete classes do not cause flatten exception to throw
e562418 Added a bit to convert incomplete objects in the error message

Discussion
----------

[HttpKernel] Added a bit to convert incomplete objects in the error message

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

\* no - errors in MongoDbSessionHandlerTest attempting to access private property, however running just src/Symfony/Component/HttpKernel does pass.

Objects of class __PHP_Incomplete_Class are only sometimes an object.

```
$object = unserialize('O:14:"BogusTestClass":0:{}');
$object instanceof __PHP_Incomplete_Class; // true
is_object($object); // false
gettype($object); // "object"
```

Since it is "not an object", the flatter attempts to turn it into a string, it triggers:
```
__PHP_Incomplete_Class could not be converted to string.
```
Which then hides the root error message.

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

by pborreli at 2012-09-18T16:16:33Z

have you seen that http://stackoverflow.com/questions/965611/forcing-access-to-php-incomplete-class-object-properties looks like you can still access the object even if it's a __PHP_Incomplete_Class with foreach

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

by rrehbeindoi at 2012-09-18T16:38:38Z

Thank you for the tip re: foreach.
2012-09-28 21:03:48 +02:00
Ray
ef18e00283 [HttpKernel] Added a bit to convert incomplete objects in the error message 2012-09-28 21:03:47 +02:00
Fabien Potencier
0a3b012619 Merge branch '2.1'
* 2.1:
  Added Base64 encoding, decoding to MongoDBProfilerStorage
  Fix duplicated code and a field name
  refactor src/Symfony/Component/Translation/Loader/MoFileLoader.php
  fixed typo
  Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
  fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top)
  [Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it
  added dirs generated by build-data.php in locale component to .gitignore
  [Process] Fixed bug introduced by 7bafc69f38.
  [Process][Tests] Prove process fail (Add more test case)
  [Process][Tests] Prove process fail
  [HttpFoundation] Fixed the tests
  [DomCrawler] Added test for supported encodings by mbstring
  [Config] Fixed preserving keys in associative arrays
  [Console] Fixed return value for Command::run
  [Locale] Fixed tests
  [Console] Fix some input tests
  [Filesystem] Fixed tests on Windows
  [Config] Fixed tests on Windows
2012-09-28 19:52:09 +02:00
Fabien Potencier
bd845b3bbc merged branch krmcbride/mongo-profiler (PR #5556)
This PR was merged into the 2.1 branch.

Commits
-------

c120c4d Added Base64 encoding, decoding to MongoDBProfilerStorage

Discussion
----------

[HttpKernel] Added UTF8 encoding, decoding to MongoDBProfilerStorage

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

It didn't take long for us to hit a non-utf8 error using the new `MongoDBProfilerStorage`.  I'm pretty sure the culprit was the Switfmailer DataCollector serializing a message with a PDF attachment.

I thought this would be a good failsafe, although one could ask whether mail message attachments should be serialized at all...

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

by krmcbride at 2012-09-28T17:28:02Z

Switched encoding/decoding to base64
2012-09-28 19:49:10 +02:00
Kevin McBride
c120c4d3d0 Added Base64 encoding, decoding to MongoDBProfilerStorage 2012-09-28 10:25:05 -07:00
Fabien Potencier
6f30614343 merged branch hason/crawler_mb (PR #5590)
This PR was merged into the 2.1 branch.

Commits
-------

d7623ae [DomCrawler] Added test for supported encodings by mbstring

Discussion
----------

[2.1][DomCrawler] Added test for supported encodings by mbstring

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

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

by fabpot at 2012-09-25T09:35:18Z

As this is a bug fix, it should be done on the 2.0 branch. Thanks.

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

by stof at 2012-09-25T09:41:59Z

@fabpot 2.0 does not contain the code trying to convert the encoding.
2012-09-28 19:05:17 +02:00
Fabien Potencier
01bcaae7c4 merged branch Slamdunk/optimize/composer.json (PR #5627)
This PR was merged into the master branch.

Commits
-------

45bf523 Optimize autoload prefix in composer.json

Discussion
----------

Optimize autoload prefix in composer.json

By having more specific autoload prefixes it is possible to reduce the
number of stat calls made. Also it prevents conflicts with similar
namespaces.

See ref: e58c6cdbf5

SessionHandlerInterface is left intentionally.

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

by sstok at 2012-09-28T08:41:25Z

@Seldaek Is this true? And if so shouldn't this be optimized in Composer it self?

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

by stof at 2012-09-28T08:48:05Z

@sstok I cannot be optimized in Composer itself. It already optimize things by putting most specific prefixes first.
Composer matches a prefix. The most specific the prefix is, the better (as it is less likely to match other classes).

For components, it is quite useless as we don't have component with a name being a prefix for the name of another one.
For the main package, it can indeed optimize things if someone was using ``Symfony_`` in an old-way package. This is not likely as there is no reason to have some new Symfony code using the PHP 5.2 naming and symfony1 was not using PSR-0. but it is indeed a working solution.

This was occuring in Zend Framework as using ``Zend`` for the namespace prefix of ZF2 would match when loading ``Zend_Registry`` (and this was causing issues when using ZF1 and ZF2 together as the PSR-0 path for ``Zend_Registry`` or ``Zend\Registry`` would be the same, thus loading the wrong file)

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

by Slamdunk at 2012-09-28T09:04:17Z

I know the main reason occurred in ZF doesn't happen in Symfony, but I see only benefits for taking it even so.
2012-09-28 19:01:10 +02:00
Fabien Potencier
0d92a24551 merged branch Nanocom/fix_console_tests (PR #5602)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5602).

Commits
-------

a7d8a74 [Console] Fix duplicated code and a field name

Discussion
----------

[Console] Fix duplicated code and a field name

* Renamed a field name in CommandTesterTest
* Deleted duplicated code in testRenderException

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

by fabpot at 2012-09-27T12:16:40Z

Can you submit this PR on the 2.1 branch as this is where it should be fixed? Thanks.
2012-09-28 16:35:16 +02:00
Arnaud Kleinpeter
f1746795d5 Fix duplicated code and a field name 2012-09-28 16:35:16 +02:00