Commit Graph

15074 Commits

Author SHA1 Message Date
Bob den Otter
5c359a87f9 Fix issue with \DateTimeZone::UTC / 'UTC' for PHP 5.4 2013-08-02 13:14:00 +02:00
Bernhard Schussek
85330a6863 [Form] Fixed patched forms to be valid even if children are not submitted 2013-08-01 18:07:41 +02:00
Bernhard Schussek
50f201ec64 Revert "[Form] Fix of "PATCH'ed forms are never valid""
This reverts commit a2b15359d8.

Conflicts:
	src/Symfony/Component/Form/Form.php

The commit is reverted because it introduces a bug demonstrated by a currently failing test.
2013-08-01 17:40:17 +02:00
Bernhard Schussek
cb5e765f58 [Form] Fixed: If a form is not present in a request, it is not automatically submitted 2013-08-01 17:20:43 +02:00
Bernhard Schussek
0869720c60 [Form] Changed (Number|Integer)ToLocalizedStringTransformer::reverseTransform() to do rounding 2013-08-01 17:19:11 +02:00
Jörn Lang
d1e571004d Fixes link indices 2013-08-01 14:40:45 +02:00
Bernhard Schussek
97cbb19bce [Form] Removed the "disabled" attribute from the placeholder option in select fields due to problems with the BlackBerry 10 browser 2013-08-01 10:41:32 +02:00
Bernhard Schussek
dbd14fc78f Revert "[Form] Remove "value" attribute on empty_value option"
This reverts commit 9e849eb78b.

Reasons for the revert:

* https://github.com/symfony/symfony/issues/8478
* https://github.com/symfony/symfony/issues/8526
2013-08-01 10:34:30 +02:00
Jean-François Simon
e4c1b30369 [Console] fixed tests 2013-07-31 18:17:51 +02:00
Jean-François Simon
17cbfc8cf1 [WebProfilerBundle] made toolbar listener instantiation conditional 2013-07-31 15:46:47 +02:00
Fabien Potencier
2c7c4a5ea0 merged branch jfsimon/issue-8371 (PR #8451)
This PR was merged into the master branch.

Discussion
----------

[console] makes descriptors use output instead of returning a string

This PR changes `DescriptorInterface::describe($object, array $options = array())` method signature to `describe(OutputInterface $output, $object, array $options = array())` and all subsequent implementations.

It's now possible to use helpers inside descriptors.
That was not easy!

@lyrixx this is all for you
@fabpot I just added one new class

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8371

Commits
-------

b9fa52c [Console] made descriptors use output instead of returning a string
2013-07-31 15:46:26 +02:00
Jean-François Simon
b9fa52cf0c [Console] made descriptors use output instead of returning a string
[console] made descriptors use output instead of returning a string
[console] updated descriptors usage
[console] fixed descriptors usage & tests
[console] applied advices from github
[Console] applied advices from github

updated changelog
2013-07-31 15:28:38 +02:00
Jean-François Simon
ce8a7d6649 [HttpFoundation] deprecated FlashBag::getIterator() method 2013-07-30 22:27:22 +02:00
Jean-François Simon
c138304823 [routing] added ability for apache matcher to handle array values 2013-07-30 13:22:46 +02:00
Fabien Potencier
bd30a5cc30 merged branch fabpot/console-fix (PR #8600)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] fixed regression where the command might have the wrong container if the application is reused several times

Commits
-------

1bd45b3 [FrameworkBundle] fixed regression where the command might have the wrong container if the application is reused several times
2013-07-29 19:56:59 +02:00
Fabien Potencier
70bbf96498 merged branch fabpot/console-fix (PR #8599)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] fixed regression where the command might have the wrong container if the application is reused several times

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

This fixes a regression introduced in #8242. Before this PR, the commands were always getting the current container registered in the kernel. But as the commands are now registered only once, if the container changes, the commands were not aware of this change. That happens quite frequently in functional tests where the Kernel is booted and shutdown several times in the same process.

Commits
-------

1bd45b3 [FrameworkBundle] fixed regression where the command might have the wrong container if the application is reused several times
2013-07-29 19:51:53 +02:00
Fabien Potencier
1bd45b371e [FrameworkBundle] fixed regression where the command might have the wrong container if the application is reused several times 2013-07-29 19:40:51 +02:00
Fabien Potencier
7786fe44c5 merged branch fabpot/class-not-found-exception (PR #8553)
This PR was merged into the master branch.

Discussion
----------

[Debug] Developer friendly Class Not Found and Undefined Function errors

This is a followup of #8156

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

Here is the original description from #8156:

Per a discussion with @weaverryan and others, I took a crack at enhancing the exception display for class not found errors and undefined function errors. It is not the cleanest solution but this is a work in progress to see whether or not following this path makes sense.

# Class Names

## Class Not Found: Unknown Class (Global Namespace)

```php
<?php
new WhizBangFactory();
```

> Attempted to load class 'WhizBangFactory' from the global namespace in foo.php line 12. Did you forget a use statement for this class?

## Class Not Found: Unknown Class (Full Namespace)

```php
<?php
namespace Foo\Bar;
new WhizBangFactory();
```

> Attempted to load class 'WhizBangFactory' from namespace 'Foo\Bar' in foo.php line 12. Do you need to 'use' it from another namespace?

## Class Not Found: Well Known Class (Global Namespace)

```php
<?php
new Request();
```

> Attempted to load class 'Request' from the global namespace in foo.php line 12. Did you forget a use statement for this class? Perhaps you need to add 'use Symfony\Component\HttpFoundation\Request' at the top of this file?

## Class Not Found: Well Known Class (Full Namespace)

```php
<?php
namespace Foo\Bar;
new Request();
```

> Attempted to load class 'Request' from namespace 'Foo\Bar' in foo.php line 12. Do you need to 'use' it from another namespace? Perhaps you need to add 'use Symfony\Component\HttpFoundation\Request' at the top of this file?

# Functions

## Undefined Function (Global Namespace)

```php
<?php
// example.php:
// namespace Acme\Example;
// function test_namespaced_function()
// {
// }
include "example.php";

test_namespaced_function()
```

> Attempted to call function 'test_namespaced_function' from the global namespace in foo.php line 12. Did you mean to call: '\acme\example\test_namespaced_function'?

## Undefined Function (Full Namespace)

```php
<?php
namespace Foo\Bar\Baz;

// example.php:
// namespace Acme\Example;
// function test_namespaced_function()
// {
// }
include "example.php";

test_namespaced_function()
```

> Attempted to call function 'test_namespaced_function' from namespace 'Foo\Bar\Baz' in foo.php line 12. Did you mean to call: '\acme\example\test_namespaced_function'?

## Undefined Function: Unknown Function (Global Namespace)

```php
<?php
test_namespaced_function()
```

> Attempted to call function 'test_namespaced_function' from the global namespace in foo.php line 12.

## Undefined Function: Unknown Function (Full Namespace)

```php
<?php
namespace Foo\Bar\Baz;

test_namespaced_function()
```

> Attempted to call function 'test_namespaced_function' from namespace 'Foo\Bar\Baz' in foo.php line 12.

Commits
-------

bde67f0 fixed an error message
80e19e2 [Debug] added some missing phpdocs
968764b [Debug] refactored unit tests
cefa1b5 [Debug] moved special fatal error handlers to their own classes
53ab284 [Debug] made Debug find FQCN automatically based on well-known autoloaders
208ca5f [Debug] made guessing of possible class names more flexible
a0b1585 [Debug] fixed CS
6671945 Developer friendly Class Not Found and Undefined Function errors.
2013-07-29 10:15:05 +02:00
Fabien Potencier
bde67f0996 fixed an error message 2013-07-28 22:44:44 +02:00
Fabien Potencier
80e19e269a [Debug] added some missing phpdocs 2013-07-28 22:44:14 +02:00
Fabien Potencier
b970d172cb merged branch fabpot/dead-code (PR #8572)
This PR was merged into the 2.2 branch.

Discussion
----------

removed dead code and fixed CS

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

Commits
-------

7d58147 removed dead code and fixed CS
2013-07-28 22:42:16 +02:00
Fabien Potencier
bf260d7d64 merged branch fabpot/validator-abstract-fix (PR #8592)
This PR was merged into the 2.2 branch.

Discussion
----------

[Validator] Fixed StaticMethodLoader does not try to invoke methods of abstract classes anymore

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

Commits
-------

b41cf82 [Validator] fixed StaticMethodLoader trying to invoke methods of abstract classes (closes #8589)
2013-07-28 22:42:06 +02:00
Fabien Potencier
7d581471ce removed dead code and fixed CS 2013-07-28 20:26:16 +02:00
Fabien Potencier
b41cf82651 [Validator] fixed StaticMethodLoader trying to invoke methods of abstract classes (closes #8589) 2013-07-28 20:24:29 +02:00
Fabien Potencier
aa3e474aed Merge branch '2.3'
* 2.3:
  [Form] fixes empty file-inputs get treated as extra field
  return 0 if there is no valid data
  [DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it
  [DependencyInjection] fixed #8570
  fixed file permission
  The ignoreAttributes itself should be ignored, too.
  [Tests] Tests on php 5.5 should pass
  [Twig] fixed TwigEngine::exists() method when a template contains a syntax error (closes #88546)
2013-07-27 07:01:52 +02:00
Fabien Potencier
9d53905b88 Merge branch '2.2' into 2.3
* 2.2:
  return 0 if there is no valid data
  [Tests] Tests on php 5.5 should pass
  [Twig] fixed TwigEngine::exists() method when a template contains a syntax error (closes #88546)
2013-07-27 07:01:40 +02:00
Fabien Potencier
10710cb2e6 merged branch bronze1man/PR-fixed-test-failure (PR #8591)
This PR was merged into the master branch.

Discussion
----------

[templating] fixed test failure introduted from #8585

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

Commits
-------

4b7c3b9 [template] fixed test failure introduted from #8585
2013-07-27 06:49:41 +02:00
bronze1man
4b7c3b9cb2 [template] fixed test failure introduted from #8585 2013-07-27 12:44:48 +08:00
Fabien Potencier
de1915f405 merged branch Flask/ticket_8548 (PR #8575)
This PR was squashed before being merged into the 2.3 branch (closes #8575).

Discussion
----------

[Form] fixes empty file-inputs get treated as extra field

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8548, #8566
| License       | MIT

Commits
-------

e5fba3c [Form] fixes empty file-inputs get treated as extra field
2013-07-26 13:48:41 +02:00
Flavian Sierk
e5fba3cf83 [Form] fixes empty file-inputs get treated as extra field 2013-07-26 13:48:40 +02:00
Fabien Potencier
3dec4dd2e6 merged branch agiuliano/2.3 (PR #8585)
This PR was submitted for the 2.3 branch but it was merged into the master branch instead (closes #8585).

Discussion
----------

Print form name in form_start function

It'd be useful if form_start() prints the form's name.
This way if you want to test it in your page, you can catch the form by `$crawler->filter('form[name=my_form_name]')`

Commits
-------

221bc15 Print form name in form_start function
2013-07-26 11:50:34 +02:00
Andrea Giuliano
ac2a29c989 Print form name in form_start function 2013-07-26 11:50:34 +02:00
Fabien Potencier
63ef3c1901 merged branch dominikzogg/timecollectorfix (PR #8581)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8581).

Discussion
----------

TimeCollector, Notice, if no events

https://github.com/symfony/symfony/issues/8574

Commits
-------

e9da1c0 return 0 if there is no valid data
2013-07-25 19:15:10 +02:00
Dominik Zogg
3553c71d1a return 0 if there is no valid data 2013-07-25 19:15:09 +02:00
Fabien Potencier
364ccd1cb3 merged branch bronze1man/PR-setLazy-parent-2.3 (PR #8573)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] setLazy not work on DefinitionDecorator

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

Commits
-------

970ce2c [DependencyInjection] fixed #8570
2013-07-25 19:13:25 +02:00
Fabien Potencier
7dc211a263 merged branch fabpot/null-services (PR #8582)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it (closes #8392)

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

Commits
-------

50d0727 [DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it
2013-07-25 19:04:05 +02:00
Fabien Potencier
50d0727477 [DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it 2013-07-25 17:41:27 +02:00
Emmanuel Vella
48338fcf10 Ignore null value in comparison validators 2013-07-25 14:05:03 +02:00
bronze1man
970ce2c413 [DependencyInjection] fixed #8570 2013-07-25 13:55:15 +08:00
Fabien Potencier
2e2a36ca24 fixed file permission 2013-07-24 19:57:25 +02:00
Fabien Potencier
ef987f7b2e merged branch derrabus/ignore_attributes_in_redirect_controller (PR #8563)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] RedirectCotroller: The ignoreAttributes parameter should be ignored

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

As discussed in PR #7590, when pointing a route to FrameworkBundle's `RedirectController` the attribute `ignoreAttributes` is added to the new route's attributes, if specified as array. As @lsmith77 wrote in a comment to that PR, this should not be the intended behavior. A valid workaround is to add `ignoreAttributes` itself to this array.

The problem remained undiscovered by the unit test, as `ignoreAttribues` was not included in the `_route_params` of the faked `Request` object. This PR should fix both, the unit test and the `RedirectController` itself, so the workaround mentioned above is not necessary anymore. Additionally, my fix should not break any routing configuration that is using the workaround.

Commits
-------

dc1fff0 The ignoreAttributes itself should be ignored, too.
2013-07-24 19:43:27 +02:00
Alexander M. Turek
dc1fff0fe1 The ignoreAttributes itself should be ignored, too. 2013-07-24 17:20:53 +02:00
Fabien Potencier
9538efaf40 merged branch lyrixx/php55 (PR #8559)
This PR was merged into the 2.2 branch.

Discussion
----------

[Tests] Tests on php 5.5 should pass

Because php 5.5 is stable now

Commits
-------

0086ee3 [Tests] Tests on php 5.5 should pass
2013-07-24 15:01:08 +02:00
Grégoire Pineau
0086ee392b [Tests] Tests on php 5.5 should pass
Because php 5.5 is stable now
2013-07-24 14:55:10 +02:00
Fabien Potencier
968764b531 [Debug] refactored unit tests 2013-07-24 07:37:15 +02:00
Fabien Potencier
cefa1b5059 [Debug] moved special fatal error handlers to their own classes 2013-07-24 07:37:12 +02:00
Fabien Potencier
53ab284745 [Debug] made Debug find FQCN automatically based on well-known autoloaders 2013-07-24 07:36:23 +02:00
Fabien Potencier
208ca5f8aa [Debug] made guessing of possible class names more flexible 2013-07-24 05:31:30 +02:00
Fabien Potencier
a0b1585d3c [Debug] fixed CS 2013-07-24 05:29:21 +02:00
Beau Simensen
667194574d Developer friendly Class Not Found and Undefined Function errors. 2013-07-23 20:01:09 +02:00