Skip to content

[2.1] Gettext support #634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 276 commits into from
Sep 29, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
181332b
added a Controller:getUser() shortcut to recover the current user
Aug 19, 2011
f7bf7b5
fixed condition
Aug 19, 2011
838237d
[Tests] Use proper phpunit assertion functions: "assertTrue", "assert…
stloyd Jul 29, 2011
a8609e1
merged branch lsmith77/add_patch_support (PR #1916)
fabpot Aug 26, 2011
fc793e6
added a CHANGELOG for 2.1
fabpot Aug 26, 2011
2ccee10
merged branch stealth35/mime_guesser (PR #1874)
fabpot Aug 26, 2011
8d6c7d8
udpated CHANGELOG
fabpot Aug 26, 2011
f9be0f2
merged branch brikou/finder_exclude_dirs (PR #1926)
fabpot Aug 27, 2011
34c1868
merged branch stloyd/tests_fix (PR #1860)
fabpot Aug 27, 2011
07a56ed
updated CHANGELOG
fabpot Aug 27, 2011
a746055
merged branch chEbba/xdebug_file_link_format (PR #1927)
fabpot Aug 27, 2011
ae3b128
[ClassLoader] Support for autoloading include_path incl. tests.
Jul 27, 2011
affe66c
Merge remote-tracking branch 'origin/master' into new-profiler-storage
Aug 29, 2011
88bc3ec
[HttpKernel] Fixes standards of FileProfilerStorage
Aug 29, 2011
b1b1424
[HttpKernel] Delete folders in the profiler cache
Aug 29, 2011
188a5fa
[HttpKernel] Override the existing tokens in FileProfilerStorage
Aug 29, 2011
6278fcb
-- add dumpers for translation component
Aug 28, 2011
b217d70
merged branch michelsalib/translation-formatter (PR #2045)
fabpot Aug 29, 2011
230be68
updated CHANGELOG for 2.1
fabpot Aug 29, 2011
4e70b1a
fixed tab problem
fabpot Aug 29, 2011
0eae562
converted file_exists calls to either is_file or is_dir where it make…
fabpot Aug 29, 2011
6b09498
[Translation] simplified tests
fabpot Aug 29, 2011
7b4bf37
changed format of the 2.1 CHANGELOG for better rendering on Github
fabpot Aug 29, 2011
b7032bc
[HttpKernel] Update FileProfileStorage to search from EOF
Aug 29, 2011
9f0bd03
[HttpKernel] Update tests for FileProfilerStorage
Aug 29, 2011
93ea745
merged branch henrikbjorn/autoload (PR #1857)
fabpot Aug 29, 2011
5bbc67b
updated CHANGELOG for 2.1
fabpot Aug 29, 2011
053b421
[Templating] added better support for encoding problems when escaping…
fabpot Aug 30, 2011
74cbf96
fix directory resource
Aug 30, 2011
c8d6c60
merged branch sonata-project/fix_directory_resource (PR #2057)
fabpot Aug 30, 2011
e991c59
[Console] Improved checks for InputArgument and InputOption construct…
ktomk Aug 30, 2011
55f5295
merged branch ktomk/patch-2 (PR #2058)
fabpot Sep 1, 2011
5a47010
[Validator] FileValidator allow MIME with wildcard
stealth35 Sep 1, 2011
74a77af
merged branch stealth35/mime_wildcard (PR #2075)
fabpot Sep 1, 2011
e63a840
updated vendors.php script to be more precise about the action (eithe…
fabpot Sep 2, 2011
bf1281a
updated CHANGELOG for 2.1
fabpot Sep 2, 2011
e7b2d2d
merged 2.0 branch
fabpot Sep 4, 2011
dccd2d5
[HttpFoundation] implemented RFC6266 (Content-Disposition header)
fabpot Sep 2, 2011
233c7db
Updated the code to follow the symfony coding standards
Wotre Sep 4, 2011
41b7a19
Updated the tests so that tests will be marked as skipped when there …
Wotre Sep 4, 2011
536d979
[Console] Added Command::isEnabled method that defines whether to add…
Seldaek Jun 28, 2011
35a9023
[FrameworkBundle] Added isEnabled to Router commands, fixes #1467
Seldaek Jun 28, 2011
ae7ae8d
[FrameworkBundle] Moved router_listener from web to router.xml since …
Seldaek Jun 28, 2011
a5a2dfa
[ImageValidator] Added dedicated ImageValidator class with min width,…
benjamindulau Jun 4, 2011
2de243c
* Added Fixtures 2x2px test.gif image file
benjamindulau Jun 17, 2011
6ad83e7
Updated according to PR review
benjamindulau Sep 4, 2011
135531a
Replaced setExpectedException() methods by annotations
benjamindulau Sep 4, 2011
a348efe
Removed trailing whitespaces
benjamindulau Sep 4, 2011
89f4791
Fixed CS
benjamindulau Sep 4, 2011
21b29c2
Merge symfony/master
beberlei Sep 4, 2011
5712798
Adjust QtTranslationLoader to throw RuntimeException
beberlei Sep 4, 2011
4ac380e
Adjust QtTranslations patch and include QtTranslationsDumper + test a…
beberlei Sep 4, 2011
f2761dd
Fix typo and include suggestion by Stof
beberlei Sep 4, 2011
d675c28
[FrameworkBundle] Use Router instead of RouterInterface
Seldaek Sep 4, 2011
dea46c7
[Translation] support CsvDumper
stealth35 Sep 5, 2011
bbb68b7
Added RSS HTTP request format
teo-sk Sep 5, 2011
834cc13
merged branch bait-sk/master (PR #2096)
fabpot Sep 6, 2011
ed472d3
merged branch alexandresalome/new-profiler-storage (PR #1772)
fabpot Sep 6, 2011
748cb84
updated CHANGELOG for 2.1
fabpot Sep 6, 2011
a00c1f5
merged branch Wotre/profiler_mongodb (PR #1784)
fabpot Sep 6, 2011
1d74073
updated CHANGELOG for 2.1
fabpot Sep 6, 2011
6c93316
merged branch beberlei/QtTranslations (PR #1154)
fabpot Sep 6, 2011
d84aecf
updated CHANGELOG for 2.1
fabpot Sep 6, 2011
22548d0
merged branch stealth35/csv_dumper (PR #2092)
fabpot Sep 6, 2011
e465474
[FrameworkBundle] added CSV translation loader and dumper as services
fabpot Sep 6, 2011
f75d8ff
merged branch benjamindulau/ImageValidator (PR #1214)
fabpot Sep 6, 2011
769b71f
updated CHANGELOG for 2.1
fabpot Sep 6, 2011
9685b00
merged branch brki/mimetype-extension-guesser-refactor (PR #1386)
fabpot Sep 6, 2011
100c644
[FrameworkBundle] fixed typo
fabpot Sep 6, 2011
1c0b489
Merge branch '2.0'
fabpot Sep 6, 2011
f23413c
Updated french translations for image validator
jalliot Sep 6, 2011
7139154
[Validator] Translate image validation errors into polish
stloyd Sep 6, 2011
bde551a
[FrameworkBundle] fixed typo
fabpot Sep 6, 2011
924b9f7
merged branch stloyd/patch-4 (PR #2108)
fabpot Sep 6, 2011
227eebc
merged branch jalliot/updated-french-trans (PR #2106)
fabpot Sep 6, 2011
522adde
[Validator] Fixed typo in Image constraint
aboks Sep 6, 2011
6353de2
merged branch aboks/image_constraint_typo (PR #2111)
fabpot Sep 6, 2011
ac54080
[FrameworkBundle] Updated German translations for image validator
jdreesen Sep 6, 2011
3843afa
[FrameworkBundle] Improved German validator translation
jdreesen Sep 6, 2011
428a01c
Merge branch 'master' of git://github.com/symfony/symfony into trans-…
jdreesen Sep 6, 2011
1134c1a
[Validator] Fixed typo in Image constraint
jdreesen Sep 6, 2011
1297504
[FrameworkBundle] Added Dutch translations for new error messages in …
aboks Sep 6, 2011
69a50ab
[WebProfilerBundle] Add the posibility to specify position of toolbar
Sep 6, 2011
6acc4f3
merged branch aboks/dutch_validator_translations (PR #2113)
fabpot Sep 6, 2011
defdb82
[WebProfilerBundle] Remove unused line
Sep 6, 2011
89df6bb
merged branch jdreesen/trans-update-2 (PR #2112)
fabpot Sep 6, 2011
b7c2a2e
[FrameworkBundle] fixed typo in German validator translation
craue Sep 6, 2011
8198078
updated italian translation for validators
Sep 6, 2011
f15cbc6
Merge branch '2.0'
fabpot Sep 7, 2011
addfbd4
merged branch micheleorselli/update_it_validator_translation (PR #2117)
fabpot Sep 7, 2011
49e1eee
merged branch craue/patch-12 (PR #2116)
fabpot Sep 7, 2011
afc0971
make it easier to customize the cache lookup in the TemplateLocator
lsmith77 Sep 7, 2011
4cd2dec
Use token as identifier to make usage of the automatically created in…
snc Sep 7, 2011
73692c6
Fixed MongoDbProfilerStorage::find() when passing empty parameters.
snc Sep 7, 2011
85c3806
Added support for sorting by time like other profiler storage impleme…
snc Sep 7, 2011
a0a97c6
Removed executable bits from all php files
snc Sep 7, 2011
0bc2a6d
[HttpFoundation] Added check for disposition value
jalliot Sep 8, 2011
ef322f6
-- add command that extracts translation messages from templates
Aug 29, 2011
5dcfeb2
merged branch jalliot/check-disposition (PR #2132)
fabpot Sep 9, 2011
b99bb1e
merged branch michelsalib/translation-command (PR #2051)
fabpot Sep 9, 2011
18d3dfe
merged branch snc/chmod-fixes (PR #2130)
fabpot Sep 9, 2011
b9b6084
[FrameworkBundle] Updated Czech translations for image validator
hason Sep 10, 2011
f4784f7
[DomCrawler] Submit on a <form> node
Sep 10, 2011
218eaba
Fixed storage of time value.
snc Sep 11, 2011
beeec5e
Allow socket dsn (for example mongodb:///tmp/mongodb-27017.sock).
snc Sep 11, 2011
aecfd0a
[HttpFoundation] Support user and password in url
stealth35 Sep 12, 2011
e6e5146
[Translation] now support ResourceBundle
stealth35 Sep 12, 2011
a7b5c1c
[Classloader] Fixed failing test on Windows
aboks Sep 12, 2011
47b7860
updated CHANGELOG for 2.1
fabpot Sep 13, 2011
5140353
merged branch stealth35/http_found_auth (PR #2029)
fabpot Sep 13, 2011
26a65d6
updated CHANGELOG for 2.1
fabpot Sep 13, 2011
affb0cb
merged branch stealth35/trans_rb (PR #2136)
fabpot Sep 13, 2011
b016b04
updated CHANGELOG for 2.1
fabpot Sep 13, 2011
1fc01fc
[Translation] typo in ResourceBundleLoader
stealth35 Sep 13, 2011
b3141b4
merged branch stealth35/typo_rb (PR #2161)
fabpot Sep 13, 2011
ce056d6
Updated hebrew translation for validators
Sep 13, 2011
cfc202b
bumped versions of Twig and Swiftmailer
fabpot Sep 13, 2011
ea930e5
merged branch excelwebzone/hebrew_translations (PR #2164)
fabpot Sep 14, 2011
8faf278
merged branch mvrhov/route_dic_params (PR #1934)
fabpot Sep 14, 2011
92d35c8
[FrameworkBundle] fixed CS and phpdoc
fabpot Sep 14, 2011
53b4cd8
[FrameworkBundle] made code more robust
fabpot Sep 14, 2011
400159d
[FrameworkBundle] made DIC placeholders replacement in route defaults…
fabpot Sep 14, 2011
fabec37
[FrameworkBundle] added tests for DIC parameters replacements in rout…
fabpot Sep 14, 2011
b5783df
updated CHANGELOG for 2.1
fabpot Sep 14, 2011
f9ecdfe
[FrameworkBundle] added sc parameters replacement in route requirements
fabpot Sep 14, 2011
c5e0c80
[HttpFoundation] made FileBinaryMimeTypeGuesser command configurable
fabpot Sep 14, 2011
c697b8f
merged branch aboks/classloader_test (PR #2154)
fabpot Sep 14, 2011
365e73a
Fixed the find() method and changed the way the profile data is stored.
snc Sep 14, 2011
3a4d1a6
merged 2.0 branch
fabpot Sep 15, 2011
5526072
[Translation] added support for more than one fallback locale
fabpot Sep 15, 2011
4ca09a9
[Validator] Validate object with it's own entity manager by default
marekkalnik Sep 15, 2011
132fbe3
[WebProfilerBundle] Merge position and css_position
Sep 16, 2011
bede420
[Config] fixed FileResource usage of is_file (we must use file_exists…
fabpot Sep 16, 2011
83b69e6
[Translation] renamed a method
fabpot Sep 16, 2011
a1491e8
added some missing accessors/mutators
schmittjoh Sep 16, 2011
61487cb
merged branch schmittjoh/resourceOptimization (PR #2193)
fabpot Sep 16, 2011
046a125
[FrameworkBundle] Set the file storage as default storage for Symfony2
Sep 16, 2011
4061114
[FrameworkBundle] fixes unintuitive merging behavior
schmittjoh Sep 16, 2011
42407d6
merged branch alexandresalome/framework-use-file-storage (PR #2195)
fabpot Sep 16, 2011
bc8ed44
updated CHANGELOG for 2.1
fabpot Sep 16, 2011
5146a1f
[EventDispatcher] Added possibility for subscribers to subscribe seve…
jalliot Sep 10, 2011
9fe87be
More explicit default value for assets_version_format
jalliot Sep 9, 2011
78c630c
Added access to Doctrine's ValidateSchema command from the console.
Sep 16, 2011
88ebe0c
Adjust the way of checking for windows
Seldaek Sep 17, 2011
fe76d74
[WebProfilerBundle] Propose to open debug toolbar request in an error…
Sep 17, 2011
fe13a6c
[WebProfilerBundle] Fix CS
Sep 17, 2011
847c665
[WebProfilerBundle] Use panel URL for debugging toolbar
Sep 17, 2011
c6b15b3
[WebProfilerBundle] Variables only used once
Sep 17, 2011
6fa1d64
Merge branch '2.0'
fabpot Sep 17, 2011
0826d1c
[WebProfilerBundle] added a way to filter logs by priority
fabpot Sep 18, 2011
c645314
Missing ResourceBundle service
stealth35 Sep 18, 2011
27506bc
merged branch stealth35/master (PR #2211)
fabpot Sep 19, 2011
8c64202
merged branch Seldaek/wintest (PR #2204)
fabpot Sep 19, 2011
19b2be1
merged branch naknak/ticket_2200 (PR #2201)
fabpot Sep 19, 2011
92727f8
merged branch jalliot/default-asset-version-format (PR #2199)
fabpot Sep 19, 2011
b8303f3
merged branch alexandresalome/toolbar-js-error (PR #2205)
fabpot Sep 19, 2011
0c39eec
[FrameworkBundle] fixed configuration
fabpot Sep 19, 2011
1b66af1
[WebProfilerBundle] fixed CS, tweaked a sentence
fabpot Sep 19, 2011
184bbe7
merged branch hason/czechvalidators (PR #2150)
fabpot Sep 19, 2011
ed05e7a
merged 2.0
fabpot Sep 19, 2011
80abf56
[FrameworkBundle] fixed a unit test
fabpot Sep 19, 2011
9703aac
[FrameworkBundle] fixed Translator to also load the fallback catalog
fabpot Sep 19, 2011
9b025b7
fixed typo
schmittjoh Sep 19, 2011
ac765fc
avoid circular references
schmittjoh Sep 19, 2011
7a20b89
fixes some typos
schmittjoh Sep 19, 2011
cb9383d
some more fixes
schmittjoh Sep 19, 2011
903ab81
[Translation] support Ini file
stealth35 Sep 19, 2011
9a886ac
merged branch stealth35/trans_ini (PR #2212)
fabpot Sep 19, 2011
83199ae
[FrameworkBundle] Fix unintuitive merging behavior for assets_base_urls
jmikola Sep 19, 2011
c0e6118
yet another fix
schmittjoh Sep 19, 2011
89b9674
merged branch schmittjoh/configFix (PR #2197)
fabpot Sep 19, 2011
1ec6c8d
updated CHANGELOG for 2.1
fabpot Sep 19, 2011
a0329c3
Added lifetime/cleanup support.
snc Sep 19, 2011
e2463ca
merged branch snc/mongodb-profiler (PR #2129)
fabpot Sep 20, 2011
01a24db
merged branch schmittjoh/translationFixes (PR #2213)
fabpot Sep 20, 2011
774ac80
[Translation] fixed previous merge
fabpot Sep 20, 2011
022a9a7
[Security] Make saving target_path extendible
helmer Sep 21, 2011
e13998d
updated indonesian translation for image validator
subosito Sep 21, 2011
7d3c2df
[SecurityBundle] added a validator for the user password
fabpot Sep 21, 2011
dd8e1e0
merged 2.0
fabpot Sep 21, 2011
9683d3c
merged branch alifity/image_validator_id_trans (PR #2230)
fabpot Sep 21, 2011
e473ea1
merged branch symfony/security_user_validator (PR #2232)
fabpot Sep 21, 2011
30de28e
merged branch marekkalnik/multiple_entity_managers (PR #2184)
fabpot Sep 22, 2011
e503bc4
updated CHANGELOG for 2.1
fabpot Sep 22, 2011
916e4b1
merged branch alexandresalome/profiler-toolbar-position (PR #2114)
fabpot Sep 22, 2011
3e90ba4
[WebProfileBundle] added missing position attribute in XSD
fabpot Sep 22, 2011
56b6d53
[WebProfilerBundle] removed normal as a valid position for the toolba…
fabpot Sep 22, 2011
2b27c38
[WebProfilerBundle] fixed height of the toolbar
fabpot Sep 22, 2011
8b511c0
updated CHANGELOG for 2.1
fabpot Sep 22, 2011
db3a2f2
[WebProfileBundle] fixed unit tests
fabpot Sep 22, 2011
0547059
merged branch stloyd/profile_info (PR #1594)
fabpot Sep 22, 2011
e98584e
[WebProfilerBundle] tweaked some templates
fabpot Sep 22, 2011
c9ddd6f
[WebProfilerBundle] moved the token not found error to the new info page
fabpot Sep 22, 2011
a0d0124
[WebProfilerBundle] tweaked profiler CSS
fabpot Sep 22, 2011
4dae5b8
[WebProfilerBundle] Cleanuped css
stloyd Sep 22, 2011
e1aabd2
[FrameworkBundle] Updated the Russian translations.
yethee Sep 22, 2011
2838ff9
merged branch stloyd/patch-1 (PR #2237)
fabpot Sep 22, 2011
50570ba
merged branch yethee/ru_translation (PR #2238)
fabpot Sep 22, 2011
f611b3e
updated CHANGELOG for 2.1
fabpot Sep 22, 2011
798cf52
merged branch helmer/target_path (PR #2228)
fabpot Sep 22, 2011
6d8c4a8
change nested collection indentation from 2 to 4
jdewit Sep 22, 2011
58d78f0
Updated the hebrew translations
Sep 23, 2011
ddb94c4
merged branch excelwebzone/hebrew_translations (PR #2243)
fabpot Sep 23, 2011
1dde274
merged branch jdewit/master (PR #2242)
fabpot Sep 23, 2011
e5294fe
fixed unit tests broken by previous merge
fabpot Sep 23, 2011
98abc8e
[DependencyInjection] changed the default YAML indentation to 4 space…
fabpot Sep 23, 2011
69468cb
merged branch jc-/master (PR #2151)
fabpot Sep 23, 2011
645bd82
[DomCrawler] added unit tests for previous merge
fabpot Sep 23, 2011
b6c8f63
[TwigBridge] fixed message keys extraction when no domain is defined …
fabpot Sep 23, 2011
ee12b67
[TwigBridge] rewrote the Twig translation extractor
fabpot Sep 23, 2011
902bbf2
merged branch lsmith77/template_locator (PR #2128)
fabpot Sep 23, 2011
85ba3d0
merged 2.0
fabpot Sep 23, 2011
8819db3
[Form] Allow setting different options to repeating fields
helmer Jun 16, 2011
a969434
[Form] fixed CS, merged options, added tests
helmer Jun 16, 2011
5fe5556
fixed accidental permission change
helmer Jun 16, 2011
b23d47d
moved options test form from class->method scope
helmer Jun 16, 2011
0679220
Additional test coverage for changes in RepeatedType
stloyd Jun 27, 2011
f8a6a4b
Be sure that both fields have same value for required option in Repea…
stloyd Jun 29, 2011
67c33a8
Rebased with master, and fixed wrong behavior with proper tests coverage
Sep 24, 2011
c832b71
merged branch stloyd/repeatedtype (PR #1453)
fabpot Sep 24, 2011
78ebe11
[Form] added some missing tests for previous merge
fabpot Sep 24, 2011
e4c743f
updated CHANGELOG for 2.1
fabpot Sep 24, 2011
ea40156
[Form] reverted partially previous commit
fabpot Sep 24, 2011
d94f652
Merge branch '2.0'
fabpot Sep 25, 2011
a1d4246
fixed version and vendors
fabpot Sep 25, 2011
1103ca8
merged 2.0
fabpot Sep 25, 2011
5dccc97
[Form] added a method to help debugging forms (Form::getAllErrorsAsSt…
fabpot Sep 25, 2011
416eaa9
add validator's zh_CN translation
superjavason Sep 25, 2011
54454ba
Added generic filtering to ParameterBag.
Sep 25, 2011
9817772
add zh-CN translation
superjavason Sep 26, 2011
07e5690
merged branch Agileshop/master (PR #2272)
fabpot Sep 26, 2011
3ad395c
Merge branch 'form-errors'
fabpot Sep 27, 2011
9b37637
[Form] added tests for previous merge
fabpot Sep 27, 2011
6aec789
Added tests.
Sep 27, 2011
063e6f9
merged branch Seldaek/commands (PR #1470)
fabpot Sep 27, 2011
c4a0f79
Updates according to suggestions.
Sep 27, 2011
7b204ed
merged branch drak/paramaterbag_filter (PR #2261)
fabpot Sep 27, 2011
eaf8ea3
updated CHANGELOG for 2.1
fabpot Sep 28, 2011
bcc7357
merged branch aerialls/getuser (PR #1990)
fabpot Sep 28, 2011
0131a69
[FrameworkBundle] tweaked some error messages
fabpot Sep 28, 2011
382a421
updated CHANGELOG for 2.1
fabpot Sep 28, 2011
a57a4af
[DomCrawler] added a way to get parsing errors for Crawler::addHtmlCo…
fabpot Sep 28, 2011
885bb33
merged 2.0
fabpot Sep 28, 2011
fa57912
[Translator] fixed merge with 2.0
fabpot Sep 28, 2011
8cb0cc6
merged branch CodeMeme/assets-install-relative-symlink (PR #1173)
fabpot Sep 28, 2011
258a1fd
moved makePathRelative to Filesystem
fabpot Sep 28, 2011
bfb99bf
[FrameworkBundle] added a --relative option to assets:install
fabpot Sep 28, 2011
ac31286
updated CHANGELOG for 2.1
fabpot Sep 28, 2011
029223d
merged branch jalliot/subscriber-improv (PR #2148)
fabpot Sep 28, 2011
e02915b
Merge branch '2.0'
fabpot Sep 28, 2011
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions CHANGELOG-2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
CHANGELOG for 2.1.x
===================

This changelog references the relevant changes (bug and security fixes) done
in 2.1 minor versions.

To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.1.0...v2.1.1

2.1.0
-----

### DoctrineBundle

* The `em` option for the `UniqueEntity` constraint is now optional (and should probably not be used anymore).

### FrameworkBundle

* added a way to create relative symlinks when running assets:install command (--relative option)
* added Controller::getUser()
* [BC BREAK] assets_base_urls and base_urls merging strategy has changed
* changed the default profiler storage to use the filesystem instead of SQLite
* added support for placeholders in route defaults and requirements (replaced by the value set in the service container)

### SecurityBundle

* added a validator for the user password

### WebProfilerBundle

* The toolbar position can now be configured via the `position` option (can be `top` or `bottom`)

### ClassLoader

* added support for loading globally-installed PEAR packages

### DomCrawler

* added a way to get parsing errors for Crawler::addHtmlContent() and Crawler::addXmlContent() via libxml functions
* added support for submitting a form without a submit button

### Finder

* Finder::exclude() now supports an array of directories as an argument

### Form

* added Form::getErrorsAsString() to help debugging forms
* allowed setting different options for RepeatedType fields (like the label)

### HttpFoundation

* added a generic access to the PHP built-in filter mechanism: ParameterBag::filter()
* made FileBinaryMimeTypeGuesser command configurable
* added Request::getUser() and Request::getPassword()
* added support for the PATCH method in Request
* removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3
* added ResponseHeaderBag::makeDisposition() (implements RFC 6266)
* made mimetype to extension conversion configurable

### HttpKernel

* added a File-based profiler storage
* added a MongoDB-based profiler storage

### Translation

* added support for more than one fallback locale
* added support for translations in ResourceBundles
* added support for extracting translation messages from templates (Twig and PHP)
* added dumpers for translation catalogs
* added support for QT translations

### Validator

* improved the ImageValidator with min width, max width, min height, and max height constraints
* added support for MIME with wildcard in FileValidator
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function warmUp($cacheDir)
{
foreach ($this->registry->getEntityManagers() as $em) {
// we need the directory no matter the proxy cache generation strategy
if (!file_exists($proxyCacheDir = $em->getConfiguration()->getProxyDir())) {
if (!is_dir($proxyCacheDir = $em->getConfiguration()->getProxyDir())) {
if (false === @mkdir($proxyCacheDir, 0777, true)) {
throw new \RuntimeException(sprintf('Unable to create the Doctrine Proxy directory "%s".', dirname($proxyCacheDir)));
}
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Bridge/Doctrine/Mapping/Driver/XmlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function initialize()
$this->_classCache = array();
if (null !== $this->_globalBasename) {
foreach ($this->_paths as $path) {
if (file_exists($file = $path.'/'.$this->_globalBasename.$this->_fileExtension)) {
if (is_file($file = $path.'/'.$this->_globalBasename.$this->_fileExtension)) {
$this->_classCache = array_merge($this->_classCache, $this->_loadMappingFile($file));
}
}
Expand All @@ -135,7 +135,7 @@ protected function _findMappingFile($className)
$defaultFileName = str_replace('\\', '.', $className).$this->_fileExtension;
foreach ($this->_paths as $path) {
if (!isset($this->_prefixes[$path])) {
if (file_exists($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
return $path.DIRECTORY_SEPARATOR.$defaultFileName;
}

Expand All @@ -149,7 +149,7 @@ protected function _findMappingFile($className)
}

$filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->_fileExtension;
if (file_exists($filename)) {
if (is_file($filename)) {
return $filename;
}

Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Bridge/Doctrine/Mapping/Driver/YamlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function initialize()
$this->_classCache = array();
if (null !== $this->_globalBasename) {
foreach ($this->_paths as $path) {
if (file_exists($file = $path.'/'.$this->_globalBasename.$this->_fileExtension)) {
if (is_file($file = $path.'/'.$this->_globalBasename.$this->_fileExtension)) {
$this->_classCache = array_merge($this->_classCache, $this->_loadMappingFile($file));
}
}
Expand All @@ -135,7 +135,7 @@ protected function _findMappingFile($className)
$defaultFileName = str_replace('\\', '.', $className).$this->_fileExtension;
foreach ($this->_paths as $path) {
if (!isset($this->_prefixes[$path])) {
if (file_exists($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
return $path.DIRECTORY_SEPARATOR.$defaultFileName;
}

Expand All @@ -149,7 +149,7 @@ protected function _findMappingFile($className)
}

$filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->_fileExtension;
if (file_exists($filename)) {
if (is_file($filename)) {
return $filename;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public function isValid($entity, Constraint $constraint)
throw new ConstraintDefinitionException("At least one field has to be specified.");
}

$em = $this->registry->getEntityManager($constraint->em);
if ($constraint->em) {
$em = $this->registry->getEntityManager($constraint->em);
} else {
$em = $this->registry->getEntityManagerForClass(get_class($entity));
}

$className = $this->context->getCurrentClass();
$class = $em->getClassMetadata($className);
Expand Down
16 changes: 16 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/TranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Symfony\Bridge\Twig\TokenParser\TransTokenParser;
use Symfony\Bridge\Twig\TokenParser\TransChoiceTokenParser;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor;

/**
* Provides integration of the Translation component with Twig.
Expand All @@ -23,10 +24,12 @@
class TranslationExtension extends \Twig_Extension
{
private $translator;
private $translationNodeVisitor;

public function __construct(TranslatorInterface $translator)
{
$this->translator = $translator;
$this->translationNodeVisitor = new TranslationNodeVisitor();
}

public function getTranslator()
Expand Down Expand Up @@ -63,6 +66,19 @@ public function getTokenParsers()
);
}

/**
* {@inheritdoc}
*/
public function getNodeVisitors()
{
return array($this->translationNodeVisitor);
}

public function getTranslationNodeVisitor()
{
return $this->translationNodeVisitor;
}

public function trans($message, array $arguments = array(), $domain = "messages", $locale = null)
{
return $this->translator->trans($message, $arguments, $domain, $locale);
Expand Down
88 changes: 88 additions & 0 deletions src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bridge\Twig\NodeVisitor;

use Symfony\Bridge\Twig\Node\TransNode;

/**
* TranslationNodeVisitor extracts translation messages.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class TranslationNodeVisitor implements \Twig_NodeVisitorInterface
{
private $enabled = false;
private $messages = array();

public function enable()
{
$this->enabled = true;
$this->messages = array();
}

public function disable()
{
$this->enabled = false;
$this->messages = array();
}

public function getMessages()
{
return $this->messages;
}

/**
* {@inheritdoc}
*/
public function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env)
{
if (!$this->enabled) {
return $node;
}

if (
$node instanceof \Twig_Node_Expression_Filter &&
'trans' === $node->getNode('filter')->getAttribute('value') &&
$node->getNode('node') instanceof \Twig_Node_Expression_Constant
) {
// extract constant nodes with a trans filter
$this->messages[] = array(
$node->getNode('node')->getAttribute('value'),
$node->getNode('arguments')->hasNode(1) ? $node->getNode('arguments')->getNode(1)->getAttribute('value') : null,
);
} elseif ($node instanceof TransNode) {
// extract trans nodes
$this->messages[] = array(
$node->getNode('body')->getAttribute('data'),
$node->getNode('domain')->getAttribute('value'),
);
}

return $node;
}

/**
* {@inheritdoc}
*/
public function leaveNode(\Twig_NodeInterface $node, \Twig_Environment $env)
{
return $node;
}

/**
* {@inheritdoc}
*/
public function getPriority()
{
return 255;
}
}
85 changes: 85 additions & 0 deletions src/Symfony/Bridge/Twig/Translation/TwigExtractor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bridge\Twig\Translation;

use Symfony\Component\Finder\Finder;
use Symfony\Component\Translation\Extractor\ExtractorInterface;
use Symfony\Component\Translation\MessageCatalogue;

/**
* TwigExtractor extracts translation messages from a twig template.
*
* @author Michel Salib <michelsalib@hotmail.com>
* @author Fabien Potencier <fabien@symfony.com>
*/
class TwigExtractor implements ExtractorInterface
{
/**
* Default domain for found messages.
*
* @var string
*/
private $defaultDomain = 'messages';

/**
* Prefix for found message.
*
* @var string
*/
private $prefix = '';

/**
* The twig environment.
* @var \Twig_Environment
*/
private $twig;

public function __construct(\Twig_Environment $twig)
{
$this->twig = $twig;
}

/**
* {@inheritDoc}
*/
public function extract($directory, MessageCatalogue $catalogue)
{
// load any existing translation files
$finder = new Finder();
$files = $finder->files()->name('*.twig')->in($directory);
foreach ($files as $file) {
$this->extractTemplate(file_get_contents($file->getPathname()), $catalogue);
}
}

/**
* {@inheritDoc}
*/
public function setPrefix($prefix)
{
$this->prefix = $prefix;
}

protected function extractTemplate($template, MessageCatalogue $catalogue)
{
$visitor = $this->twig->getExtension('translator')->getTranslationNodeVisitor();
$visitor->enable();

$this->twig->parse($this->twig->tokenize($template));

foreach ($visitor->getMessages() as $message) {
$catalogue->set($message[0], $this->prefix.$message[0], $message[1] ? $message[1] : $this->defaultDomain);
}

$visitor->disable();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function loadMappingInformation(array $objectManager, ContainerBuilder
$mappingConfig['dir'] = $container->getParameterBag()->resolveValue($mappingConfig['dir']);
// a bundle configuration is detected by realizing that the specified dir is not absolute and existing
if (!isset($mappingConfig['is_bundle'])) {
$mappingConfig['is_bundle'] = !file_exists($mappingConfig['dir']);
$mappingConfig['is_bundle'] = !is_dir($mappingConfig['dir']);
}

if ($mappingConfig['is_bundle']) {
Expand Down Expand Up @@ -234,7 +234,7 @@ protected function assertValidMappingConfiguration(array $mappingConfig, $object
throw new \InvalidArgumentException(sprintf('Mapping definitions for Doctrine manager "%s" require at least the "type", "dir" and "prefix" options.', $objectManagerName));
}

if (!file_exists($mappingConfig['dir'])) {
if (!is_dir($mappingConfig['dir'])) {
throw new \InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir']));
}

Expand Down Expand Up @@ -263,6 +263,7 @@ protected function detectMetadataDriver($dir, ContainerBuilder $container)
while (!is_dir($resource)) {
$resource = dirname($resource);
}

$container->addResource(new FileResource($resource));

$extension = $this->getMappingResourceExtension();
Expand Down
Loading