Commit Graph

6757 Commits

Author SHA1 Message Date
Benjamin Dulau
135531a2de Replaced setExpectedException() methods by annotations 2011-09-04 17:45:31 +02:00
Benjamin Dulau
6ad83e7970 Updated according to PR review 2011-09-04 17:45:25 +02:00
Benjamin Dulau
2de243cf07 * Added Fixtures 2x2px test.gif image file
* Updated tests for using fixture image instead of imagecreate function
2011-09-04 17:28:52 +02:00
Benjamin Dulau
a5a2dfaaa6 [ImageValidator] Added dedicated ImageValidator class with min width, max width, min height and max height validations 2011-09-04 17:28:46 +02:00
Wouter Van Hecke
41b7a194d5 Updated the tests so that tests will be marked as skipped when there is no MongoDB server present! 2011-09-04 16:56:09 +02:00
jdreesen
df3bde472e [FrameworkBundle] Updated German validator translation 2011-09-04 16:04:35 +02:00
Wouter Van Hecke
233c7db191 Updated the code to follow the symfony coding standards 2011-09-04 14:38:29 +02:00
Fabien Potencier
161fd1c47e merged branch stof/validator_translations (PR #2083)
Commits
-------

ca6299d [FrameworkBundle] Fixed a typo in the translation file per @PeymanHR

Discussion
----------

[FrameworkBundle] Fixed a typo in the translation file per @PeymanHR

Closes #2082
2011-09-04 11:10:29 +02:00
Christophe Coevoet
ca6299dc6b [FrameworkBundle] Fixed a typo in the translation file per @PeymanHR
Closes #2082
2011-09-04 10:54:39 +02:00
Fabien Potencier
dccd2d560f [HttpFoundation] implemented RFC6266 (Content-Disposition header)
references:

 * http://trac.tools.ietf.org/wg/httpbis/trac/wiki/ContentDispositionProducerAdvice
 * https://github.com/mnot/sweet/blob/master/lib/index.js
 * http://www.mnot.net/blog/2011/09/02/rfc6266_and_content-disposition
2011-09-04 09:35:13 +02:00
Fabien Potencier
e7b2d2d659 merged 2.0 branch 2011-09-04 09:28:37 +02:00
Fabien Potencier
6677dabda5 merged branch jmikola/entity-validator (PR #2076)
Commits
-------

d19f1d7 [Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results

Discussion
----------

[Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results

An entity should only be considered unique if its search criteria returns no matches or a single, identical entity. Multiple results indicates that conflicting entities exist.

Note: the DoctrineMongoDBBundle's unique validator checks identifier values if the object strict-equality check is false. This may be a worthwhile improvement, as it would prevent reporting a validation error for an enttiy which is going to overwrite its conflicting counter-part in the database.

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

by jmikola at 2011/09/01 14:23:27 -0700

This is the Doctrine bridge equivalent for my fix to DoctrineMongoDBBundle: https://github.com/symfony/DoctrineMongoDBBundle/pull/42

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

by fabpot at 2011/09/02 00:13:52 -0700

As this is a bug fix, can you base your PR on the symfony/2.0 branch? Thanks.
2011-09-02 09:43:19 +02:00
Fabien Potencier
adb7291b67 Merge branch 'EvanK-patch-1' into 2.0
* EvanK-patch-1:
  Per the [documentation][1], the `NotBlank` constraint should be using the `empty` language construct, otherwise it will not trigger on, for example, a boolean false from an unchecked checkbox field.
2011-09-02 09:39:11 +02:00
Evan Kaufman
639513a67a Per the [documentation][1], the NotBlank constraint should be using the empty language construct, otherwise it will not trigger on, for example, a boolean false from an unchecked checkbox field.
[1]: http://symfony.com/doc/2.0/reference/constraints/NotBlank.html
2011-09-02 09:37:48 +02:00
Fabien Potencier
bf1281aebd updated CHANGELOG for 2.1 2011-09-02 09:25:13 +02:00
Fabien Potencier
e63a8400b5 updated vendors.php script to be more precise about the action (either install or update) 2011-09-02 09:22:14 +02:00
Jeremy Mikola
d19f1d7621 [Doctrine] Fix UniqueEntityValidator reporting a false positive by ignoring multiple query results
An entity should only be considered unique if its search criteria returns no matches or a single, identical entity. Multiple results indicates that conflicting entities exist.
2011-09-01 17:20:30 -04:00
Fabien Potencier
74a77af694 merged branch stealth35/mime_wildcard (PR #2075)
Commits
-------

5a47010 [Validator] FileValidator allow MIME with wildcard

Discussion
----------

[Validator] FileValidator allow MIME with wildcard

 - Allow MIME with wildcard like `image/*`
 - Image constraint use wildcard mime

(squash failed sorry #2068)
2011-09-01 16:19:23 +02:00
stealth35
5a470103f0 [Validator] FileValidator allow MIME with wildcard 2011-09-01 16:10:16 +02:00
Fabien Potencier
bddcb4cc11 fixed a unit test 2011-09-01 11:05:39 +02:00
Fabien Potencier
55f5295dd0 merged branch ktomk/patch-2 (PR #2058)
Commits
-------

e991c59 [Console] Improved checks for InputArgument and InputOption constructor's $mode parameter.

Discussion
----------

Check that $mode is not below 1 to actually look if any of the flags are

Check that $mode is not below 1 to actually look if any of the flags are set.

I'm not sure if 0 must be allowed or not.

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

by fabpot at 2011/08/31 08:59:41 -0700

Can you squash your commit before I merge? Thanks.

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

by ktomk at 2011/08/31 15:25:05 -0700

Squashed and polished.
2011-09-01 11:02:33 +02:00
Fabien Potencier
78346ae43b merged branch elnur/entities-to-array-transformer (PR #2053)
Commits
-------

6bd1749 Fixed a bug when multiple expanded choices would render unchecked because of the Form Framework's strict type checking.

Discussion
----------

[DoctrineBridge] Entities to array transformer

Fixed a bug when multiple expanded choices would render unchecked because of the Form Framework's strict type checking.

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

by fabpot at 2011/08/31 09:01:47 -0700

Looks good to me. Can you squash your commits before I merge? Thanks.
2011-09-01 11:00:54 +02:00
Fabien Potencier
db535caf50 merged branch simpleit/2.0 (PR #2074)
Commits
-------

0224a34 Fixes typo on ACL Doctrine cache.

Discussion
----------

[2.0] Impossible to use ACL provider cache

Using ACL provider cache is impossible. It's due to a typo in the configuration file (an undescore in place of a dot). My PR fixes this. Maybe add some tests to validate the ACL cache feature?
2011-09-01 10:57:49 +02:00
Vincent
0224a34bb1 Fixes typo on ACL Doctrine cache. 2011-09-01 11:35:36 +03:00
Tom Klingenberg
e991c595b8 [Console] Improved checks for InputArgument and InputOption constructor's $mode parameter.
Check that $mode in InputArgument::__construct() is not below 1 to actually look if any of the flags are set.
Check that $mode in InputOption::__construct() is not below 1 to actually look if any of the flags are set.
Check for the correct parameter type, as in InputOption (integer).
InputArgumentTest: Added test for negative integer $mode parameter input in constructor.
InputOptionTest: Added test for negative integer $mode parameter input in constructor.
2011-08-31 23:53:00 +02:00
Elnur Abdurrakhimov
6bd1749553 Fixed a bug when multiple expanded choices would render unchecked because of the Form Framework's strict type checking. 2011-08-31 20:27:38 +04:00
Fabien Potencier
326dccc0a5 merged branch real-chocopanda/fix-sqlite-profiler (PR #2070)
Commits
-------

f448029 [HttpKernel] Tweaked SQLite to speed up SqliteProfilerStorage

Discussion
----------

[HttpKernel] Tweaked SQLite to speed up SqliteProfilerStorage

See: http://stackoverflow.com/questions/6108602/avoiding-locked-sqlite-database-timeouts-with-php-pdo

This is the PR rebased for symfony/2.0 (the old PR was #1864)

---
Hi,

Here is a PR as discussed in issue #1856.
It solves a "fatal error" in the `SqliteProfilerStorage`.
I tested it all day long for real and it works fine.

Regards,
William
2011-08-31 15:16:58 +02:00
William DURAND
f448029061 [HttpKernel] Tweaked SQLite to speed up SqliteProfilerStorage
See: http://stackoverflow.com/questions/6108602/avoiding-locked-sqlite-database-timeouts-with-php-pdo
2011-08-31 13:29:56 +02:00
Fabien Potencier
9a8f9f7329 merged branch brikou/uniqueEntity_message (PR #2065)
Commits
-------

eb8f3cb added uniqueEntity message translation (fr)
df9f223 added missing french translations
f4c133e removed trailing dot to make it consistent with other validator messages

Discussion
----------

[Translation] Unique Entity message

I've added the translation of uniqueEntity validation message, I've used ``trans-unit id="41"`` which seems to be unused
2011-08-31 12:40:38 +02:00
Fabien Potencier
1de7ebf91b merged branch real-chocopanda/fix-hasListeners-ContainerAwareEventDispatcher (PR #2066)
Commits
-------

2cfa22c Fix Method ContainerAwareEventDispatcher::hasListeners

Discussion
----------

Fix Method ContainerAwareEventDispatcher::hasListeners

Related to #1903.

This is the squashed on 2.0 branch version of the PR #1903

---
Fix Method ContainerAwareEventDispatcher::hasListeners

Fix the fact that Method ContainerAwareEventDispatcher::hasListeners return false if my service is not lazyLoaded

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

by cedriclombardot at 2011/08/31 01:40:45 -0700

@stof it's fixed
2011-08-31 12:33:30 +02:00
clombardot
2cfa22ca54 Fix Method ContainerAwareEventDispatcher::hasListeners 2011-08-31 10:39:33 +02:00
Brikou CARRE
eb8f3cb723 added uniqueEntity message translation (fr) 2011-08-31 09:16:30 +02:00
Brikou CARRE
df9f223b43 added missing french translations 2011-08-31 09:12:51 +02:00
Brikou CARRE
f4c133efbb removed trailing dot to make it consistent with other validator messages 2011-08-31 08:56:13 +02:00
Fabien Potencier
a6670c214a [Routing] fixed a caching issue when annotations are used on a base class used by more than one concrete class
Doctrine caches annotations. For methods, it uses PHP reflection and the getDeclaringClass() to create
a unique cache key. Unfortunately, if you have 2 classes that extend another one, the cache will be shared.
It's not a problem except that before this patch, the default route name was also cached (as the cache is serialized
after we changed the object). So, all other classes inherited this default route name. The fix is quite easy:
just don't change the read annotation object.
2011-08-30 21:39:58 +02:00
Fabien Potencier
946ccb6bd2 [Routing] fixed annotation loaders for abstract classes, added more unit tests 2011-08-30 20:57:43 +02:00
Fabien Potencier
6a81f07862 [Routing] made a small speed optimization 2011-08-30 20:53:32 +02:00
Fabien Potencier
c8d6c60192 merged branch sonata-project/fix_directory_resource (PR #2057)
Commits
-------

74cbf96 fix directory resource

Discussion
----------

fix directory resource

fix regression introduces by 0eae562cb2 (diff-15)
2011-08-30 12:57:01 +02:00
Thomas Rabaix
74cbf96418 fix directory resource 2011-08-30 12:47:56 +02:00
Fabien Potencier
053b42158e [Templating] added better support for encoding problems when escaping a string (available as of PHP 5.4)
From the PHP CHANGELOG:

The flag ENT_SUBSTITUTE makes invalid multibyte sequences be replaced by
U+FFFD (UTF-8) or &#FFFD; by htmlspecialchars and htmlentities. It is an
alternative to the default behavior, which just returns an empty string and to
ENT_IGNORE, which is a security risk. The behavior follows the recommendations
of Unicode Technical Report #36.
2011-08-30 07:43:00 +02:00
Fabien Potencier
5bbc67bb53 updated CHANGELOG for 2.1 2011-08-29 15:38:12 +02:00
Fabien Potencier
93ea745397 merged branch henrikbjorn/autoload (PR #1857)
Commits
-------

ae3b128 [ClassLoader] Support for autoloading include_path incl. tests.

Discussion
----------

Autoload

GH Issue #1823

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

by stof at 2011/07/29 00:42:10 -0700

note that another fix was proposed in #1852 but this implementation is cleaner IMO

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

by henrikbjorn at 2011/08/12 01:57:45 -0700

@fabpot @stof any suggestions? need this kind of badly

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

by stof at 2011/08/12 02:06:54 -0700

for me it is fine. I guess you need to wait the end of @fabpot's holydays to see it merged.

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

by henrikbjorn at 2011/08/25 02:24:13 -0700

Added tests in the hope it will make it in soon :)

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

by henrikbjorn at 2011/08/29 03:31:08 -0700

Any other requests / suggestions ?

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

by stof at 2011/08/29 03:36:15 -0700

could you rebase the PR ? Github says that it conflicts.

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

by henrikbjorn at 2011/08/29 04:11:43 -0700

Should be rebased now or that is what git cli says :)

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

by henrikbjorn at 2011/08/29 04:16:28 -0700

And squashed.
2011-08-29 15:37:03 +02:00
alexandresalome
9f0bd0325b [HttpKernel] Update tests for FileProfilerStorage 2011-08-29 15:35:28 +02:00
alexandresalome
b7032bc971 [HttpKernel] Update FileProfileStorage to search from EOF 2011-08-29 15:34:31 +02:00
Fabien Potencier
7b4bf37088 changed format of the 2.1 CHANGELOG for better rendering on Github 2011-08-29 15:31:57 +02:00
Fabien Potencier
6b09498248 [Translation] simplified tests 2011-08-29 15:30:52 +02:00
Fabien Potencier
0eae562cb2 converted file_exists calls to either is_file or is_dir where it makes sense 2011-08-29 15:28:26 +02:00
Fabien Potencier
4e70b1aed4 fixed tab problem 2011-08-29 15:04:45 +02:00
Fabien Potencier
230be6815c updated CHANGELOG for 2.1 2011-08-29 14:45:37 +02:00
Fabien Potencier
b217d7092a merged branch michelsalib/translation-formatter (PR #2045)
Commits
-------

6278fcb -- add dumpers for translation component

Discussion
----------

[2.1] Add dumpers for translation catalogs

As seen here #1283, I push just the translation catalogs dumpers. It involved renaming and some essentially.

I also included a Pot dumper/loader that have been provided here : https://github.com/michelsalib/BCCExtraToolsBundle/pull/12.

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

by fabpot at 2011/08/28 11:12:30 -0700

Can you add the license header? and the main phpdoc block for each class?

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

by michelsalib at 2011/08/29 02:32:50 -0700

Done !

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

by fabpot at 2011/08/29 03:17:43 -0700

Last, but not the least, can you add some unit tests and squash all your commits? Thanks a lot.

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

by michelsalib at 2011/08/29 03:21:43 -0700

How do I squash it, should I make a new PR ?

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

by fabpot at 2011/08/29 03:25:09 -0700

No need to make a new PR, you can just force the push with `-f`.

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

by fabpot at 2011/08/29 03:33:59 -0700

Also, in the tests, it would great if you can add some that do a load/dump/load, just to be sure that everything work fine.

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

by michelsalib at 2011/08/29 03:39:41 -0700

What is the need of such a test, considering that the current tests that I am writing are using the same fixtures ?

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

by fabpot at 2011/08/29 03:47:50 -0700

The goal is to ensure that the load/dump calls are idempotent.

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

by michelsalib at 2011/08/29 03:56:12 -0700

Ye. Actually the load is using referenc files from the fixtures directory. My new tests will be using the dumper with the same files. Isn't that enough ? I try to stay DRY on this one.

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

by michelsalib at 2011/08/29 05:09:52 -0700

I just add unit tests and squash the commits.

I still need to be conviced about the load/dump/load unit tests. But if I did not made a point, I'll do as requested on next answer.
2011-08-29 14:24:14 +02:00