Commit Graph

1654 Commits

Author SHA1 Message Date
Fabien Potencier
8c64202979 merged branch Seldaek/wintest (PR #2204)
Commits
-------

88ebe0c Adjust the way of checking for windows

Discussion
----------

Adjust the way of checking for windows
2011-09-19 07:36:55 +02:00
Fabien Potencier
6fa1d64f84 Merge branch '2.0'
* 2.0:
  [HttpKernel] fixed typo
  fixed previous merge, done the same change to other occurences
  fixes usage of mb_*
  Profiler session import fixed.
  [Process] workaround a faulty implementation of is_executable on Windows
  Swedish translation fix.
  [Locale] Fix #2179 StubIntlDateFormatter support yy format
  Fixed fourth argument of Filesystem->mirror()
2011-09-17 22:18:22 +02:00
Jordi Boggiano
88ebe0cfc4 Adjust the way of checking for windows 2011-09-17 12:57:47 +02:00
Johannes M. Schmitt
a1491e8b54 added some missing accessors/mutators 2011-09-16 13:43:09 +02:00
stealth35
43b55efd04 [Locale] Fix #2179 StubIntlDateFormatter support yy format
Fix #2179 Year limit is 2031 like IntlDateFormatter
2011-09-16 13:12:22 +02:00
Fabien Potencier
5526072dba [Translation] added support for more than one fallback locale 2011-09-15 08:19:52 +02:00
Fabien Potencier
3a4d1a6a22 merged 2.0 branch 2011-09-15 07:39:20 +02:00
Fabien Potencier
c50a3a194d [Translation] fixed transchoice when used with a fallback 2011-09-14 22:31:09 +02:00
Fabien Potencier
c985ffaa99 [Translation] fixed message selector when the message is empty (closes #2144) 2011-09-14 22:04:39 +02:00
Fabien Potencier
55eaf4e0f5 merged branch danielholmes/master (PR #2031)
Commits
-------

777f876 [HttpFoundation] Added test that exposes error in session saving

Discussion
----------

[HttpFoundation] Added test that exposes error in session saving

Noticed this commit in the recent release:

https://github.com/symfony/symfony/commit/34a1b53

And noticed that the save in __destruct won't be fired if a manual save has been called. The testSavedOnDestructAfterManualSave test I've added fails on 2.0.1 but it passes with 2.0.0. An example:

$session->set('foo', 'value');
$session->__destruct(); // eventually called during shutdown, triggers a save
// During next request, $session->get('foo') returns 'value'

$session->set('foo', 'value');
$session->save();
$session->set('foo', 'newvalue');
$session->__destruct(); // eventually called during shutdown, however WON'T trigger save
// During next request, $session->get('foo') returns 'value'

In my eyes the save on destruction should still happen whether a save has been called manually or not - it's more predictable. But i can see arguments for the opposite as well.

If consensus is that this is a bug, I'm happy to provide a fix but wanted to get feedback on the 2 options:

 * Save optimisation can be reverted
 * Can make the save optimisation more intelligent so a write to storage is only done if something has changed. The best way to do this would be to close down the api and mark the session as invalid when an attribute is set for example, however all properties are currently protected and would need to be private, so it might break some people's extensions of session

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

by stof at 2011/09/04 02:13:52 -0700

@fabpot what about it ?
2011-09-14 20:55:06 +02:00
Fabien Potencier
c697b8fc1c merged branch aboks/classloader_test (PR #2154)
Commits
-------

a7b5c1c [Classloader] Fixed failing test on Windows

Discussion
----------

[Classloader] Fixed failing test on Windows
2011-09-14 10:45:09 +02:00
Fabien Potencier
73c8d2ba74 [Form] fixed error bubbling for Date and Time types when rendering as multiple choices (closes #2062) 2011-09-14 08:30:47 +02:00
Fabien Potencier
affb0cbca2 merged branch stealth35/trans_rb (PR #2136)
Commits
-------

e6e5146 [Translation] now support ResourceBundle

Discussion
----------

[2.1][Translation] now support ResourceBundle

support `.res` and `.dat` bundles

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

by marijn at 2011/09/08 08:59:39 -0700

There are a few references to `ressource`, I guess that is a typo...

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

by stealth35 at 2011/09/08 09:13:32 -0700

@marijn thank, done

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

by fabpot at 2011/09/11 00:42:37 -0700

Is it possible to add a dumper like we have for all other loaders?

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

by stof at 2011/09/11 03:46:39 -0700

Btw, you need to rebase your branch as it conflicts with master

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

by stealth35 at 2011/09/11 04:04:23 -0700

@fabpot it's more difficult (or the easy way it's to use `exec` with `derb`), I can create the text resources
@stof oki

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

by fabpot at 2011/09/11 23:52:19 -0700

@stealth35: Can you remove the `@api` tags? We will review what is included into the public API later on. thanks.

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

by stealth35 at 2011/09/12 04:18:07 -0700

@fabpot done
2011-09-13 08:49:05 +02:00
Fabien Potencier
51403530b9 merged branch stealth35/http_found_auth (PR #2029)
Commits
-------

aecfd0a [HttpFoundation] Support user and password in url

Discussion
----------

[HttpFoundation] Support user and password in url

Allow `http://user:password@test.com` for url request and `basic auth`

Added Methods for `Request`
  - `getUser`
  - `getPassword `

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

by stealth35 at 2011/08/26 07:52:57 -0700

@seldaek @stof thanks guys it's done

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

by stof at 2011/08/28 11:52:11 -0700

btw, you should rebase your branch on top of the upstream master branch as it conflicts

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

by stealth35 at 2011/08/28 13:15:55 -0700

@stof done

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

by stof at 2011/09/04 02:09:11 -0700

@stealth35 you made an error when rebasing: you merged the previous version of the branch instead of forcing the push, thus duplicating all commits in the PR (rebasing rewrites the history so it creates new commits). Could you clean your branch ?

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

by stealth35 at 2011/09/05 02:00:17 -0700

@stof 👍

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

by stealth35 at 2011/09/06 08:21:00 -0700

should be 2.0 ?

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

by fabpot at 2011/09/11 23:52:30 -0700

@stealth35: Can you remove the `@api` tags? We will review what is included into the public API later on. thanks.

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

by stealth35 at 2011/09/12 04:02:01 -0700

@fabpot done
2011-09-13 08:47:11 +02:00
Arnout Boks
a7b5c1c076 [Classloader] Fixed failing test on Windows 2011-09-12 13:21:31 +02:00
stealth35
e6e5146ccb [Translation] now support ResourceBundle 2011-09-12 13:17:14 +02:00
stealth35
aecfd0a891 [HttpFoundation] Support user and password in url 2011-09-12 13:01:04 +02:00
H. Westphal
3e2f1a4b13 Removed executable bits from all php files 2011-09-09 15:16:17 +02:00
Fabien Potencier
18d3dfe0bf merged branch snc/chmod-fixes (PR #2130)
Commits
-------

a0a97c6 Removed executable bits from all php files

Discussion
----------

Removed executable bits from all PHP files

Some files had a file mode of 755 and this PR changes them to 644. The reason behind this is that git always thinks that those files are changed when accessing the repository via a samba share on windows (tested with PhpStorm).

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

by fabpot at 2011/09/09 05:51:30 -0700

That was on my radar too. Can you do the same for the 2.0 branch?
2011-09-09 14:51:44 +02:00
Fabien Potencier
b99bb1e31b merged branch michelsalib/translation-command (PR #2051)
Commits
-------

ef322f6 -- add command that extracts translation messages from templates

Discussion
----------

[2.1] Extracting translation messages from templates

As seen here #1283 and here #2045, I push the command that extract translation from templates.

There are still a lot of new things here, but it seems more manageable.

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

by stof at 2011/09/04 02:04:40 -0700

@michelsalib Could you try to refactor the code to make it more flexible by moving the creating of the file to the dumpers to support other outputs (database...) ?

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

by michelsalib at 2011/09/04 02:35:50 -0700

You are right, I shall do it tonight.

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

by michelsalib at 2011/09/04 11:53:35 -0700

I just pushed a refactoring that should allow more flexibility. Dumpers are now responsive for writing the files. This way it is now possible to implement the DumperInterface that dump to a database and add it to the TranslationWriter.
I updated the tests accordingly.

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

by fabpot at 2011/09/05 23:27:27 -0700

To be consistent with other dumpers in the framework, the dumpers extending `FileDumper` should use `FileDumper` as a suffix like in `YmlFileDumper`.

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

by fabpot at 2011/09/05 23:41:12 -0700

A general note on PHPDoc: The first line of a phpdoc ends with a dot and starts with a present verb like in  `Extracts translation messages from template files.`

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

by michelsalib at 2011/09/06 01:23:31 -0700

I fixed most of the remarks. I just need to go through the phpdoc (in a few minutes).

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

by stloyd at 2011/09/06 01:28:55 -0700

@michelsalib you should use `git rebase` (see [docs](http://symfony.com/doc/current/contributing/code/patches.html#id1)) instead of `git merge`.

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

by michelsalib at 2011/09/06 01:31:06 -0700

@stloyd sorry. I will rebase (squash) everything when I am finished.

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

by kaiwa at 2011/09/06 01:31:18 -0700

Hey, it might be a little bit late, but may i ask a not code-related question?

Is it correct that the `--force` option only means to write the output to a file instead of writing it to stdout?

If so,

1. is it semantically correct? I mean... i'm not a native english speaker, but from unix programs i'm used to interpret a `--force` option as something like "overwrite", "ignore errors" or "suppress warnings". An option which is used in case of trouble most time. Feels confusing to me to be forced ;-) to use the `--force` option for simply writing to files.

2. does it makes sense to have a default behaviour instead of requiring the user to give either `--force` or `--dump-messages`? In which cases does the user wants to dump the messages to the console? Is it only for debugging / to review the messages?

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

by michelsalib at 2011/09/06 01:33:58 -0700

@kaiwa Your concerns seems perfectly right. Initially I just wanted to mimic the `doctrine:schema:update` command. But it can be changed.
@fabpot what do you think ?

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

by michelsalib at 2011/09/06 02:01:22 -0700

@stloyd I tried to do a `git rebase` and I am quite lost. I think I messed something when merge instead of rebase. How can I clean/squash my PR properly ?

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

by stloyd at 2011/09/06 02:11:29 -0700

@michelsalib for now just work as it is ;-) When I back from work I will try to help you to rebase it properly.

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

by michelsalib at 2011/09/06 02:12:17 -0700

@stloyd Thank you !

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

by stloyd at 2011/09/06 12:39:18 -0700

@michelsalib I was trying to rebase your code and revert it this _bad_ commit (merge), but without success.

IMO best way would be making _brand new_ branch based on symfony/master, and the `git cherry-pick` ([hint](http://ariejan.net/2010/06/10/cherry-picking-specific-commits-from-another-branch)) commits you need (almost all in this PR but without this one with merge), then you will need to apply again _by hand_ changes from commit fce24c7fa2 (this clean up you have done there).

I'm sorry I can't give you more help...

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

by michelsalib at 2011/09/07 09:41:36 -0700

@stloyd I finally succeed to fix this PR. Thanks to your help! I must admit the whole thing with `cherry-pick` command was quite epic.
@fabpot Don't be sorry, I am about to fix the PHPDoc. I shall squash right after.

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

by michelsalib at 2011/09/07 10:07:20 -0700

I just squashed and did a last polish of the code. You might want to read it again before merge.

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

by fabpot at 2011/09/07 11:40:48 -0700

 ok, code looks really good now. I think the only missing thing is some more unit tests (for the extractors for instance).

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

by michelsalib at 2011/09/07 12:18:59 -0700

Thanks, I'll look into it tomorrow.

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

by michelsalib at 2011/09/08 15:13:10 -0700

Hi,
I just added unit tests for both extractors (php and yaml).
Concerning the yaml extractor, the test is quite tricky because I need to mock the twig environment while returning a twig tree that contain a trans block and a trans filter. But it work fine with as little side effects as possible. Also I am not sure that the test should be in the TwigBundle.
IMO, the PR seems ready.

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

by stof at 2011/09/08 15:34:41 -0700

As the extractor is in bridge, the tests should be in the folder containing the tests for the bridge in tests/

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

by michelsalib at 2011/09/08 15:41:45 -0700

Thanks @stof, it is now fixed.

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

by michelsalib at 2011/09/09 00:48:47 -0700

thanks @stloyd, it is fixed now.

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

by michelsalib at 2011/09/09 01:25:24 -0700

Fixed again ;)
2011-09-09 11:17:04 +02:00
Michel Salib
ef322f680d -- add command that extracts translation messages from templates
-- add missing files

-- tweak translation command files

-- dumpers are now responsive for writting the files

-- moved the twig extractor the bridge

-- clear temp files after unit tests
-- check the presence of dumper in translation writer

-- General cleaning of the code

-- clean phpDoc

-- fix PHPDoc

-- fixing class name in configuration

-- add unit tests for extractors (php and twig)

-- moved test to correct location

-- polish the code

-- polish the code
2011-09-09 10:23:54 +02:00
Jordan Alliot
0bc2a6d67b [HttpFoundation] Added check for disposition value 2011-09-08 10:20:37 +01:00
H. Westphal
a0a97c6a22 Removed executable bits from all php files 2011-09-07 22:51:20 +02:00
Fabien Potencier
f75d8ff653 merged branch benjamindulau/ImageValidator (PR #1214)
Commits
-------

89f4791 Fixed CS
a348efe Removed trailing whitespaces
135531a Replaced setExpectedException() methods by annotations
6ad83e7 Updated according to PR review
2de243c * Added Fixtures 2x2px test.gif image file * Updated tests for using fixture image instead of imagecreate function
a5a2dfa [ImageValidator] Added dedicated ImageValidator class with min width, max width, min height and max height validations

Discussion
----------

[2.1] [ImageValidator] Improved ImageValidator + tests

Added dedicated ImageValidator class with min width, max width, min height and max height validations

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

by kriswallsmith at 2011/06/04 10:32:56 -0700

This is nice but doesn't belong in the core as it adds a dependency on GD.

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

by benjamindulau at 2011/06/04 10:41:02 -0700

@kriswallsmith i'm not sure, php.net doc says :

    Note:

    This function does not require the GD image library.

Well, that could also be a mistake :)

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

by pborreli at 2011/06/04 11:17:25 -0700

i think @benjamindulau is right

```
$ php -m
[PHP Modules]
bcmath
calendar
com_dotnet
Core
ctype
date
dom
ereg
filter
ftp
hash
iconv
json
libxml
mcrypt
mhash
mysqlnd
odbc
pcre
PDO
Phar
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
wddx
xdebug
xml
xmlreader
xmlwriter
zip
zlib
```

```
$ php -r "var_dump(getimagesize(__DIR__.'/src/Symfony/Bundle/FrameworkBund
le/Resources/public/images/blue_picto_less.gif'));"
array(7) {
  [0]=>
  int(18)
  [1]=>
  int(18)
  [2]=>
  int(1)
  [3]=>
  string(22) "width="18" height="18""
  ["bits"]=>
  int(5)
  ["channels"]=>
  int(3)
  ["mime"]=>
  string(9) "image/gif"
}
```

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

by benjamindulau at 2011/06/04 11:22:57 -0700

However, the tests use imagejpeg and imagedestroy, that's not valid.
But, i'm not sure how to correctly test the validator then.

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

by benjamindulau at 2011/06/04 11:31:51 -0700

Can i use an image from FrameworkBundle resources ?

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

by pborreli at 2011/06/06 03:47:24 -0700

just add your own image inside Fixture folder (smaller the better, 1x1, 1x2 ..)

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

by stof at 2011/09/04 05:27:42 -0700

@benjamindulau could you rebase your PR and update it according to the comments ?

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

by benjamindulau at 2011/09/04 06:31:34 -0700

Yep, i think i can find some time today to do that

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

by benjamindulau at 2011/09/04 09:27:29 -0700

I've updated the PR.

A big thank to Stof who helped me with my git mess ;-)
2011-09-06 08:18:07 +02:00
Fabien Potencier
22548d0537 merged branch stealth35/csv_dumper (PR #2092)
Commits
-------

dea46c7 [Translation] support CsvDumper [Translation] support CsvDumper [Translation] support CsvDumper [Translation] support CsvDumper [Translation] support CsvDumper

Discussion
----------

[2.1][Translation] support CsvDumper

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

by michelsalib at 2011/09/05 04:56:47 -0700

The DumperInterface is probably going to change soon, it should be considered when merging : #2051.
2011-09-06 08:03:26 +02:00
Fabien Potencier
6c9331650f merged branch beberlei/QtTranslations (PR #1154)
Commits
-------

f2761dd Fix typo and include suggestion by Stof
4ac380e Adjust QtTranslations patch and include QtTranslationsDumper + test aswell
5712798 Adjust QtTranslationLoader to throw RuntimeException
21b29c2 Merge symfony/master
6bf43a1 [Translation] Add .ts as file extension to search for Qt Translation files.
5808715 [Translation] Add Qt Translation component with tests

Discussion
----------

[2.1] Qt translations

Add support for QT translations - it has a GUI and www.crowdin.net supports it.

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

by stof at 2011/05/30 07:24:48 -0700

You also need to register it in FrameworkBundle.

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

by tristanbes at 2011/06/26 12:08:47 -0700

crowdin seems to be a cool service. didn't know about this website. thanks

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

by fabpot at 2011/07/11 02:58:31 -0700

Just for the record: I've just removed all usage of `\Exception` in Symfony2 master:

6a7359389d

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

by beberlei at 2011/07/11 03:02:14 -0700

I will adjust the PR.

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

by tristanbes at 2011/08/28 11:10:02 -0700

Any news @beberlei ?

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

by beberlei at 2011/08/29 01:07:28 -0700

Yes, i have to allocate some time. Havent managed to do so yet.

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

by stof at 2011/09/04 05:28:16 -0700

@beberlei the PR also need to be rebased as it conflicts with master.
2011-09-06 08:00:21 +02:00
Fabien Potencier
a00c1f5927 merged branch Wotre/profiler_mongodb (PR #1784)
Commits
-------

41b7a19 Updated the tests so that tests will be marked as skipped when there is no MongoDB server present!
233c7db Updated the code to follow the symfony coding standards
7b24de5 Updated the code to follow the symfony coding standard using stof his remarks
fbcbdde - Fixed a small bug - Updated some phpdoc
00fdfec Added a MongoDbProfilerStorage engine

Discussion
----------

[2.1] [HttpKernel] MongoDb storage for Profiler

As a documentbased database like MongoDB is [supposedly fantastic in logging](http://blog.mongodb.org/post/172254834/mongodb-is-fantastic-for-logging) I implemented a storage engine for the profiler that should enable us to use this database as storage for this.

Activate it using this way:

    framework:
        profiler:
            dsn:     mongodb://user:pass@location/database/collection

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

by stof at 2011/07/24 11:23:06 -0700

btw, the MongoDB session storage has already be rejected from the core so this should probably be moved to the DoctrineMongoDBBundle (even if it uses only the PHP extension and not Doctrine). @fabpot thoughts about this ?

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

by Wotre at 2011/07/24 11:52:56 -0700

Just my personal opinion, if it is prefered that way I will move this into the DoctrineMongoDBBundle.

While it is reasonable to bundle all Mongo related things together, I do believe that in the case of logging we want to avoid as many depencies as possible. Some exceptions can occur pretty early inside the framework, and it would be a shame if those aren't logged because this layer is written on top of doctrine. I'm not exactly familliar enough with the symfony internals as I only started using it a few days ago, but I can imagine that this can make a difference with some exceptions.

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

by stof at 2011/07/24 11:59:10 -0700

I don't ask you to use Doctrine in this code. It is fine to use the extension directly if it is enough.

Btw, the profiler is *not* used early. :)

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

by Wotre at 2011/07/26 10:45:05 -0700

So... Any final remark whether this should be moved to [the DoctrineMongoDBBundle](https://github.com/symfony/DoctrineMongoDBBundle) or not?

If it has to be moved, any comment on where in that bundle this should be put?

Also, if it has to be moved, how can we arrange the configuration using DI? Currently I've put a line in the FrameworkExtension file to use this engine for everything with a $dsn starting with mongodb; I imagine this kind of ugly depency can't really exist between the FrameworkBundle and another one.

Although it seems completely illogical to me, I will move it, but I do need some directions on how to elegantly do this...

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

by stof at 2011/07/26 11:03:04 -0700

@fabpot what do you think ?

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

by stof at 2011/09/04 01:28:48 -0700

@fabpot what do you think about the place where this should be done ?
2011-09-06 07:53:28 +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
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
Benjamin Eberlei
4ac380e016 Adjust QtTranslations patch and include QtTranslationsDumper + test aswell 2011-09-04 20:43:59 +02:00
Benjamin Eberlei
21b29c201b Merge symfony/master 2011-09-04 20:25:40 +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
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
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
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
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
Fabien Potencier
946ccb6bd2 [Routing] fixed annotation loaders for abstract classes, added more unit tests 2011-08-30 20:57:43 +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
Fabien Potencier
6b09498248 [Translation] simplified tests 2011-08-29 15:30:52 +02:00