Commit Graph

6889 Commits

Author SHA1 Message Date
Fabien Potencier
748cb842cc updated CHANGELOG for 2.1 2011-09-06 07:47:18 +02:00
Fabien Potencier
ed472d36b7 merged branch alexandresalome/new-profiler-storage (PR #1772)
Commits
-------

9f0bd03 [HttpKernel] Update tests for FileProfilerStorage
b7032bc [HttpKernel] Update FileProfileStorage to search from EOF
188a5fa [HttpKernel] Override the existing tokens in FileProfilerStorage
b1b1424 [HttpKernel] Delete folders in the profiler cache
88bc3ec [HttpKernel] Fixes standards of FileProfilerStorage
affe66c Merge remote-tracking branch 'origin/master' into new-profiler-storage
ea916c3 [HttpKernel] Coding convention for the file profiler storage
9ae2c8d [HttpKernel] CS in file storage
b415efd [HttpKernel] Add a test for semicolon in file storage test
1c1215f [HttpKernel] Use subfolders for better storage in file storage of profiler
4b1dc1f [HttpKernel] Fix the folder attribute of file storage to private
70f73e1 [HttpKernel] Fix tests for the file storage of profiler
d5313d9 [HttpKernel] Add tests for the file profiler storage
09fc0a2 [HttpKernel] Add Symfony credits to the file storage class for the profiler
d1d5892 [HttpKernel] Finalize the file storage for the profiler
2f65cf2 Add POC for file storage system

Discussion
----------

[2.1] [HttpKernel] File storage for profiler

Symfony2 has some problems when dealing with multiple concurrency queries in the SQLite storage, resulting in a timeout error or terrible lack.

I've implemented after discussions with @fabpot a filesystem storage.

Enable it in your project with :

    framework:
        profiler:
          dsn:             "file:%kernel.cache_dir%/profiler"

I also studied the possibility to store only big data string in files and rest in the SQLite, but not concluant.

Results of my measures (4 concurrency, 120 total) :

* SQLite with data : 1057ms
* SQLite without data : 615ms
* MySQL : 40ms
* This File storage : 54ms

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

by alexandresalome at 2011/07/22 12:01:10 -0700

An idea for the find method : a csv file containing ip;url;token

The iteration could be done over a big file, without loading the whole file in memory.

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

by alexandresalome at 2011/07/23 14:22:32 -0700

OK new version, with as explained previously : a CSV file containing the index + file for each profile.

The speed is similar to the speed of MySQL, and no memory overhead should occur with this solution.

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

by alexandresalome at 2011/07/23 14:37:14 -0700

Hm... Created tests, duplicated from SqliteProfilerStorageTest.

Any idea on how to put this code in common ? Is it usual to create a base class for 2 tests ?

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

by alexandresalome at 2011/07/23 14:48:39 -0700

Just tested with 24.000 requests, the 24.001'th request still takes less than 50ms to execute.

The index file is about 2Mb, and iterating the whole file is fast.

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

by alexandresalome at 2011/07/23 14:53:19 -0700

I've filled the file with 120Mb of data, requests are still less than 50ms for executing.

Iterating the index takes more than 30s (so it crashed), but it's because of the amount of lines. 30 seconds = 1,400,000 lines in this computer. The file = 1,500,000 lines

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

by alexandresalome at 2011/07/23 14:56:54 -0700

I've tested it with Linux, is someone can test with Windows

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

by stloyd at 2011/07/24 00:32:32 -0700

IMO to speedup it a bit more and not end up with "crash" (to not end with "limit" of files per directory, also to many files in dir slow down every OS) you should use same method to write as Twig, split up files in to directories. If you do this you can speed up index more, because you can create smaller one per directory.

Also you should fix CS (coding standards).

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

by stloyd at 2011/07/24 02:10:20 -0700

Tested on Win 7, seems ok. Similar speed to sqlite, dunno why ;-) but used a bit less of memory.

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

by alexandresalome at 2011/07/24 02:13:21 -0700

Did you tried with concurrent requests ? It makes sense when you use assetic
and your browser hits the application 4 times simultaneously for CSS
generation

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

by alexandresalome at 2011/07/24 02:17:23 -0700

I used Apache Benchmark for producing results :

    ab -c 4 -n 120 URL

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

by alexandresalome at 2011/07/24 02:56:55 -0700

OK I used subfolders, based on last characters (because the first part of token is mostly the same between queries.

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

by stof at 2011/09/04 01:27:15 -0700

@fabpot any news about it ? Can it be merged ?
2011-09-06 07:45:55 +02:00
Fabien Potencier
e0a3605e63 merged branch stealth35/trans_few_op (PR #2093)
Commits
-------

8d50c16 few optimisations for XliffFileLoader and XmlFileLoader

Discussion
----------

few optimisations for XliffFileLoader and XmlFileLoader

 - file_put_contents + file_get_contents -> copy
 - use stripos insteed preg_match
 - removed useless `$tmpfiles` in XliffFileLoader
2011-09-06 07:38:29 +02:00
Fabien Potencier
63db2357c5 merged branch stealth35/asset_com_v2 (PR #2094)
Commits
-------

3a7e038 [FrameworkBundle] sanitize target arg in asset:install command

Discussion
----------

[FrameworkBundle] sanitize target arg in asset:install command

`php app/console assets:install web/`

(removed tailing /)

 before
`Installing assets for Symfony\Bundle\FrameworkBundle into web//bundles/framework`
after
`Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework`
2011-09-06 07:37:26 +02:00
Fabien Potencier
834cc138ec merged branch bait-sk/master (PR #2096)
Commits
-------

bbb68b7 Added RSS HTTP request format

Discussion
----------

Added RSS HTTP request format

Hi,

We have added RSS HTTP request format to `initializeFormats()` function in HttpFoundation Request class, to enable specifying `_format: rss` in routing files.

We couldn't find a reason for not having the rss format specified, and even the [cookbook refers](http://symfony.com/doc/2.0/book/routing.html#advanced-routing-example) to using of `_format: rss` .

Thanks,
Bait.sk
2011-09-06 07:36:26 +02:00
Fabien Potencier
a3ff291edc merged branch stloyd/pl_translation_sync (PR #2098)
Commits
-------

83254b8 [Validator] Sync polish translation

Discussion
----------

[Validator] Sync polish translation
2011-09-06 07:31:46 +02:00
stloyd
83254b8b37 [Validator] Sync polish translation 2011-09-05 18:55:50 +02:00
Teo
bbb68b7df9 Added RSS HTTP request format 2011-09-05 17:10:26 +03:00
stealth35
3a7e038fb9 [FrameworkBundle] sanitize target arg in asset:install command 2011-09-05 15:17:10 +02:00
stealth35
8d50c162b9 few optimisations for XliffFileLoader and XmlFileLoader 2011-09-05 15:06:29 +02:00
stealth35
dea46c721f [Translation] support CsvDumper
[Translation] support CsvDumper
[Translation] support CsvDumper
[Translation] support CsvDumper
[Translation] support CsvDumper
2011-09-05 13:14:52 +02:00
Fabien Potencier
41b25a404a merged branch yethee/ru_translations (PR #2090)
Commits
-------

515fe27 [FrameworkBundle] Sync the Russian translations

Discussion
----------

[FrameworkBundle] Sync the Russian translations
2011-09-05 12:20:04 +02:00
Deni
515fe27ce8 [FrameworkBundle] Sync the Russian translations 2011-09-05 13:58:36 +04:00
Fabien Potencier
747dc3f73b merged branch aboks/dutch_validator_translations (PR #2086)
Commits
-------

8cf7990 [FrameworkBundle] Added Dutch validator translation for trans-unit 41

Discussion
----------

[FrameworkBundle] Added Dutch validator translation for trans-unit 41

This message was added in #2065.
2011-09-05 09:28:08 +02:00
Fabien Potencier
2cdbec0f9e merged branch jdreesen/trans-update-1 (PR #2084)
Commits
-------

df3bde4 [FrameworkBundle] Updated German validator translation

Discussion
----------

[FrameworkBundle] Updated German validator translation

Updated german translation to include trans-id 41, which was added in #2065.
2011-09-05 09:28:00 +02:00
Arnout Boks
8cf79903e5 [FrameworkBundle] Added Dutch validator translation for trans-unit 41 2011-09-05 09:16:00 +02:00
Jordi Boggiano
d675c28123 [FrameworkBundle] Use Router instead of RouterInterface 2011-09-04 21:53:06 +02:00
Benjamin Eberlei
f2761dd627 Fix typo and include suggestion by Stof 2011-09-04 20:47:45 +02:00
Benjamin Eberlei
4ac380e016 Adjust QtTranslations patch and include QtTranslationsDumper + test aswell 2011-09-04 20:43:59 +02:00
Benjamin Eberlei
571279823a Adjust QtTranslationLoader to throw RuntimeException 2011-09-04 20:29:01 +02:00
Benjamin Eberlei
21b29c201b Merge symfony/master 2011-09-04 20:25:40 +02:00
Benjamin Dulau
89f4791704 Fixed CS 2011-09-04 19:10:51 +02:00
Benjamin Dulau
a348efec19 Removed trailing whitespaces 2011-09-04 18:12:05 +02:00
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
Jordi Boggiano
ae7ae8d7c6 [FrameworkBundle] Moved router_listener from web to router.xml since it depends on the router 2011-09-04 17:15:08 +02:00
Jordi Boggiano
35a9023b3e [FrameworkBundle] Added isEnabled to Router commands, fixes #1467 2011-09-04 17:12:35 +02:00
Jordi Boggiano
536d9790c3 [Console] Added Command::isEnabled method that defines whether to add the command or not 2011-09-04 17:12:33 +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