Commit Graph

597 Commits

Author SHA1 Message Date
Fabien Potencier
c97be281c0 Merge branch '2.2'
* 2.2: (30 commits)
  [HttpFoundation] Added support for partial ranges in the BinaryFileResponse.
  [HttpFoundation] Fixed byte ranges in the BinaryFileResponse.
  updated required versions when depending on the HttpFoundation component
  updated required versions when depending on the HttpKernel component
  updated required versions when depending on the Config component
  updated required versions when depending on the Form component
  updated required versions when depending on the DependencyInjection component
  updated required versions when depending on the Validator component
  updated required versions when depending on the Translation component
  updated required versions when depending on the Routing component
  updated required versions when depending on the EventDispatcher component
  updated required versions when depending on the OptionsResolver component
  updated required versions when depending on the PropertyAccess component
  updated required versions when depending on the Security component
  updated required versions when depending on the Templating component
  updated required versions when depending on the Stopwatch component
  updated required versions when depending on the Process component
  updated required versions when depending on the Finder component
  updated required versions when depending on the Dom Crawler component
  use ~2.0 when depending on the Dom Crawler component
  ...
2013-02-11 11:09:44 +01:00
Fabien Potencier
108a8c0117 updated required versions when depending on the Stopwatch component 2013-02-08 17:10:54 +01:00
Fabien Potencier
223cc6f7c7 Merge branch '2.2'
* 2.2:
  fixed regression in the Finder component (it was possible to use it without using exec before, closes #6357)
  fixed a circular call (closes #6864)
  typo
  [Security] [Tests] added unit tests for the UserPasswordValidator class and made the validator service for the UserPassword constraint configurable.
  fixed wrong indentation
  tweaked previous commit
  [HttpKernel] Fix the URI signer (closes #6801)
  Add Arabic translations.
  [HttpKernel] fixed regression when rendering an inline controller and passing some objects  (closes #6822)
  [FrameworkBundle] fixed typo
  renamed some classes and Twig functions to more descriptive names (refs #6871)
  Classcollectionloader: fix traits + enhancements
  Fix a deprecated method call in the tests
  Update `composer.json` files: - to allow versions ~2.2 (>=2.2,<3.0) of Doctrine DBAL, ORM & Common - fixed Propel1 versions difference between main and bridge files - fixed Twig versions difference between main and bridge files - to allow versions ~1.11 (>=1.11,<2.0) of Twig - fixed Locale ext-intl version to accept all, not non-existing version
  Correct comment in NativeSessionStorage regarding session.save_handler
  [Security] Add PHPDoc to AuthenticationEvents
2013-02-04 13:42:02 +01:00
Fabien Potencier
c72e471c65 renamed some classes and Twig functions to more descriptive names (refs #6871)
HttpContentRenderer has been renamed to FragmentHandler.
The RendererStrategy subnamespace has been renamed to Fragment.
The strategy classes now have Fragment in their names.
ProxyRouterListener has been renamed to FragmentListener
The router_proxy configuration entry has been renamed to fragments.
2013-02-01 15:17:20 +01:00
Fabien Potencier
d0aaf62557 updated the branch alias in composer files 2013-01-31 22:39:01 +01:00
Kris Wallsmith
731cd49781 made twig extension service private 2013-01-22 10:56:22 -08:00
Fabien Potencier
1f762c7723 Merge branch '2.1'
* 2.1:
  [Yaml] fixed default value
  Added Yaml\Dumper::setIndentation() method to allow a custom indentation level of nested nodes.
  added a way to enable/disable object support when parsing/dumping
  added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse()
  fixed CS
  [Process] Fix docblocks, remove `return` from `PhpProcess#start()` as parent returns nothing, cleaned up `ExecutableFinder`
  fixes a bug when output/error output contains a % character
  [Console] fixed input bug when the value of an option is empty (closes #6649, closes #6689)
  [Profiler] [Redis] Fix sort of profiler rows.
  Fix version_compare() calls for PHP 5.5.
  Removed underscores from test method names to be consistent with other components.
  [Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)
  Fix version_compare() calls for PHP 5.5.
  Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.
  removed the .gitattributes files (closes #6605, reverts #5674)
  [HttpKernel] Clarify misleading comment in ExceptionListener

Conflicts:
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_style.html.twig
	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
	src/Symfony/Component/Form/Tests/Util/PropertyPathTest.php
	src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php
	src/Symfony/Component/Process/Process.php
2013-01-17 16:25:59 +01:00
Fabien Potencier
9aaceb19ee moved the logic from HttpKernel in FrameworkBundle to the HttpKernel component 2013-01-10 09:21:30 +01:00
Fabien Potencier
b33d5bc352 removed the .gitattributes files (closes #6605, reverts #5674) 2013-01-09 09:51:07 +01:00
Fabien Potencier
aba96c7cae Merge branch '2.1'
* 2.1:
  [Console] Fix style escaping parsing
  [Console] Make style formatter matching less greedy to avoid having to escape when not needed
  [Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.
  [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class.
  [Form] Fixed EntityChoiceList when loading objects with negative integer IDs
  [TwigBundle] There is no CSS visibility of display, should be visible instead
  [Form] corrected source node for a Danish translation
  [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)
  [HttpFoundation] Check if required shell functions for `FileBinaryMimeTypeGuesser` are not disabled
  [CssSelector] added css selector with empty string
  [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia
  [DependencyInjection] refactored code to avoid logic duplication
  [Form] Deleted references in FormBuilder::getFormConfig() to improve performance
  [HttpFoundation] Update docblock for non-working method

Conflicts:
	src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.html.twig
	src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig
2013-01-08 19:17:41 +01:00
Fabien Potencier
8321127cda Merge branch '2.0' into 2.1
* 2.0:
  [Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.
  [TwigBundle] There is no CSS visibility of display, should be visible instead
  [DependencyInjection] fixed a bug where the strict flag on references were lost (closes #6607)
  [HttpFoundation] Check if required shell functions for `FileBinaryMimeTypeGuesser` are not disabled
  [CssSelector] added css selector with empty string
  [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia
  [DependencyInjection] refactored code to avoid logic duplication

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml
	src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
	src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php
2013-01-08 19:16:44 +01:00
Igor Wiedler
e66bd14ca2 [TwigBundle] Use display instead of visibility for exception page icons 2013-01-08 18:27:02 +01:00
Igor Wiedler
8da2b412b4 [TwigBundle] There is no CSS visibility of display, should be visible instead 2013-01-08 02:14:26 +01:00
Bernhard Schussek
184c8e586f Fixed @expectedException definitions to reference absolute exception paths 2013-01-05 18:52:40 +01:00
Fabien Potencier
8349816dc5 Merge branch '2.0' into 2.1
* 2.0:
  updated license year
  Update src/Symfony/Component/HttpFoundation/Response.php
  [Console] fixed unitialized properties (closes #5935)
  [Bundle] [FrameworkBundle] fixed typo in phpdoc of the SessionListener.
  bumped Symfony version to 2.0.21-DEV
  updated VERSION for 2.0.21
  updated CHANGELOG for 2.0.21

Conflicts:
	src/Symfony/Bundle/SwiftmailerBundle/LICENSE
	src/Symfony/Component/Filesystem/LICENSE
	src/Symfony/Component/HttpFoundation/Response.php
	src/Symfony/Component/HttpKernel/Kernel.php
2013-01-04 18:00:54 +01:00
Fabien Potencier
df5c171490 updated license year 2013-01-04 17:59:43 +01:00
Fabien Potencier
18856428b6 updated license year 2013-01-04 17:58:00 +01:00
Fabien Potencier
552185a98a [WebProfilerBundle] fixed wrong class name 2012-12-22 21:58:25 +01:00
Fabien Potencier
a5e1c4a657 [TwigBundle] added a compatibility layer for the render tag so that the same code can work in both 2.1 and 2.2
If you want your code to work on both version, use the following syntax:

{% render url('foo') with {}, {'bar': 1} %}

where the empty array is not used in 2.2.
2012-12-21 08:47:46 +01:00
Fabien Potencier
1f281db261 [TwigBundle] fixed PHP notice 2012-12-20 12:01:24 +01:00
Fabien Potencier
64d43c806b restricted to only URIs the first argument of the render tag 2012-12-20 08:31:14 +01:00
Florin Patan
c2acc6c2cb Fixed most of the docblocks/unused namespaces 2012-12-19 08:09:49 +01:00
Fabien Potencier
2cc51b0823 merged branch fabpot/twig-render (PR #6386)
This PR was merged into the master branch.

Commits
-------

163564b [WebProfilerBundle] replaced yaml_dump by json_encode to make the Web Profiler independent from the YAML component
1c92307 [WebProfilerBundle] fixed exception panel when no exception is thrown
00e08be [WebProfilerBundle] replaced usage of the render tag by the render function (to decouple the bundle from TwigBundle)
0e2418c [TwigBundle] added the HttpKernel extension to the default Twig loaded extensions
f0d9be0 [TwigBridge] added an extension for the HttpKernel component

Discussion
----------

Added an HttpKernelExtension in Twig bridge and used it in the WebProfiler

The first commit introduces a new HttpKernelExtension in the Twig bridge that allows the rendering of a sub-request from a template (the code mostly comes from Silex, and will replace the code there at some point).

The name `render` is probably not the best one as it does not really tell you what it does (the same goes for the `render` tag we have in Symfony2 by the way).

Here is a list of possible names:

 * `render()`
 * `render_request()`
 * `request()`
 * `subrequest()`
 * `include_request()`

I don't really like the last one, but it is (perhaps) consistent with the `include` tag/function in Twig.

This new `render()` function is also a first step towards replacing the `render` tag (with support for ESI, SSI, ...). But it won't happen before we refactor the way it's managed now (a lot of the code is in the FrameworkBundle right now and that prevents Silex or Drupal to reuse it).

The other commits make use of this new extension to make the Web Profiler truly independent from TwigBundle and FrameworkBundle.
2012-12-17 14:59:17 +01:00
Fabien Potencier
8df9b7a2de [Config] renamed keepKeys() to normalizeKeys() (refs #6367) 2012-12-16 17:56:50 +01:00
Fabien Potencier
0e2418c505 [TwigBundle] added the HttpKernel extension to the default Twig loaded extensions 2012-12-16 17:47:32 +01:00
Fabien Potencier
6efae29f2a [TwigBundle] fixed configuration to avoid key normalizations for paths and globals (closes #5998) 2012-12-16 16:11:31 +01:00
Pascal Borreli
60eeacd2d1 Fixed typos 2012-12-14 22:27:02 +00:00
Fabien Potencier
a482aa0640 [WebProfilerBundle] made a small optimization 2012-12-14 08:20:45 +01:00
Fabien Potencier
142cffbc4f fixed unit tests 2012-12-13 17:59:38 +01:00
Fabien Potencier
fc444f1a55 fixed support for Twig loaders when they do not extend Twig_ExistsLoaderInterface 2012-12-13 17:11:26 +01:00
Fabien Potencier
35d63df044 removed the dependency on the container for exception handling 2012-12-13 15:49:45 +01:00
Fabien Potencier
e553e65047 moved the Twig CodeExtension from the bundle to the bridge 2012-12-12 12:26:16 +01:00
Fabien Potencier
fe194cb03f merged branch hason/tests_2_2 (PR #6202)
This PR was merged into the master branch.

Commits
-------

abe244f [TwigBundle] Fixed tests on windows

Discussion
----------

[TwigBundle] Fixed tests on windows
2012-12-11 09:58:49 +01:00
Fabien Potencier
e3ef9368df [FrameworkBundle] tweaked previous merge 2012-12-11 09:31:58 +01:00
Fabien Potencier
57b8447ae1 merged branch dantleech/twig_loader_pass (PR #6171)
This PR was merged into the master branch.

Commits
-------

f48b22a Added configuration pass that adds Twig Loaders

Discussion
----------

[Twig] [DI Pass] Added configuration pass that adds Twig Loaders

Bug fix: [no]
Feature addition: [yes]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]
Todo: Documentation?
License of the code: MIT

- Defined new Chain loader service with symfony Filesystem loader added
  by default.
- Added compiler class which picks up any services tagged "twig.loader"
- If there are any instances of "twig.loader" the "twig.loader" alias is
  set to the Twig_Loader_Chain service ID instead of the filesystem
  loader.

I think I still like the explicitness of the other pull request, but I defer to your judgment :) This is certainly much easier for the developer.

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

by dantleech at 2012-12-03T08:31:08Z

Will update the PR later today / tomorrow

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

by dantleech at 2012-12-03T18:19:09Z

ok, updated. I throw a `Symfony\Component\DependencyInjection\Exception\LogicException` if there are no loaders -- not sure if that is the best thing to do, or if that is the best exception.

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

by fabpot at 2012-12-05T15:28:24Z

Looks good to me. Can you add a note in the CHANGELOG about this new possibility and update the documentation accordingly? Thanks.

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

by dantleech at 2012-12-05T17:50:37Z

ok. updated change log and changed both count() comparisons to be strict. @fabpot which documentation should I update? or should I add `cookbook/templating/registering_multiple_loaders.rst`?

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

by stof at 2012-12-05T20:07:37Z

@dantleech at least the DIC tags reference need to be updated to mention the new tag. I'm not sure a dedicated article is needed for it (but @weaverryan will decide if it is worth it)

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

by dantleech at 2012-12-06T17:57:20Z

Made a PR for documentation: https://github.com/symfony/symfony-docs/pull/2005

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

by dantleech at 2012-12-07T16:44:00Z

ok. have updated the correct CHANGELOG and squashed to one commit
2012-12-11 09:30:20 +01:00
dantleech
f48b22a44e Added configuration pass that adds Twig Loaders
- Added compiler class which picks up any services tagged "twig.loader"
- If there is one loader registered we set the alias to this loader
- If there is more than one we set the alias to a chain loader and all
  the loaders to it
- If there is no loaders we throw an Exception
2012-12-07 17:39:55 +01:00
Martin Hasoň
10e5f3b3df Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
Martin Hasoň
abe244f0c9 [TwigBundle] Fixed tests on windows 2012-12-06 09:55:04 +01:00
Fabien Potencier
869be1df6d Merge branch '2.1'
* 2.1:
  [Locale] fixed tests
  [Config] Fixed tests on Windows
  [TwigBundle] Fixed tests
  [Security] Move DigestDataTest.php inside the Security component
  Fixed DefaultValue for session.auto_start in NodeDefinition
  Fix namespace of Validator and BrowserKit Tests

Conflicts:
	src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
	src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php
2012-12-06 08:52:34 +01:00
Fabien Potencier
889bd2ee62 Merge branch '2.0' into 2.1
* 2.0:
  [Locale] fixed tests
  [Config] Fixed tests on Windows
  [TwigBundle] Fixed tests

Conflicts:
	phpunit.xml.dist
	src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php
	src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php
	src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php
2012-12-06 08:51:00 +01:00
Martin Hasoň
acf1f86611 [TwigBundle] Fixed tests 2012-12-04 14:39:39 +01:00
Fabien Potencier
a6e08b18de Merge branch '2.0' into 2.1
* 2.0:
  [TwigBundle] Moved the registration of the app global to the environment
  needs to use simpleContent in xsd to allow empty elements
  bumped Symfony version to 2.0.19-DEV
  removed wrong routing xsd statement `mixed="true"`
  removed unused attribute from routing.xsd
  updated VERSION for 2.0.19
  update CONTRIBUTORS for 2.0.19
  updated CHANGELOG for 2.0.19

Conflicts:
	CONTRIBUTORS.md
	src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml
	src/Symfony/Bundle/TwigBundle/TwigEngine.php
	src/Symfony/Component/HttpKernel/Kernel.php
2012-12-03 14:28:41 +01:00
Christophe Coevoet
ae3d531737 [TwigBundle] Moved the registration of the app global to the environment
This makes the app global variable available also when accessing the Twig
environment directly instead of using the TwigEngine.

Conflicts:
	src/Symfony/Bridge/Twig/CHANGELOG.md
	src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml
	src/Symfony/Bundle/TwigBundle/TwigEngine.php
2012-12-03 14:25:44 +01:00
marc.weistroff
431d593d59 [TwigBundle] Renames twig.loader to twig.loader.filesystem.
In the previous form of twig's service definitions, it was impossible to
use a chain loader correctly because the TwigBundle was registering paths
on the twig.loader service. This patch fixes that by creating a
twig.loader.filesystem definition and an alias twig.loader that points
to twig.loader.filesystem by default.
2012-11-27 14:37:15 -05:00
Fabien Potencier
2c346cba07 merged branch fabpot/images (PR #6006)
This PR was merged into the master branch.

Commits
-------

9f1cd84 moved most static assets directly into the templates

Discussion
----------

moved most static assets directly into the templates

This has been done for several reasons:

 * for consistency with the way we already manage the WDT and the
   profiler icons;
 * it makes the Exception independent from the location of the assets
   (and from the asset() function)
 * this is the second step to make the WebProfiler useable outside the
   full-stack framework

see dbcd171dd3

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

by stof at 2012-11-13T17:52:39Z

the images blue_picto_more and blue_picto_less are also used in DoctrineBundle (and probably in JMSDebuggingBundle but I haven't checked). Could you submit a PR inlining the images too before removing them ?

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

by fabpot at 2012-11-13T18:02:18Z

Any image useful for other bundles should not be deleted. So, if DoctrineBundle is using the blue_pico_* images, I'm going to revert their deletion.

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

by schmittjoh at 2012-11-13T18:07:02Z

I'm using them in two bundles, JMSDebuggingBundle and JMSJobQueueBundle (same for the exception related templates).

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

by dlsniper at 2012-11-13T22:22:29Z

Wouldn't it be better to have the encoded icons in a separate CSS file as different classes/background images?

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

by fabpot at 2012-11-14T11:28:24Z

ok, I've reverted the removal of the images that might be useful in third-party bundles.
2012-11-14 13:48:11 +01:00
Fabien Potencier
9f1cd84844 moved most static assets directly into the templates
This has been done for several reasons:

 * for consistency with the way we already manage the WDT and the
   profiler icons;
 * it makes the Exception independent from the location of the assets
   (and from the asset() function)
 * this is the second step to make the WebProfiler useable outside the
   full-stack framework

see dbcd171dd3
2012-11-14 12:26:15 +01:00
Fabien Potencier
b126664406 Merge branch '2.1'
* 2.1: (24 commits)
  forced Travis to use source to workaround their not-up-to-date Composer on PHP 5.3.3
  [Routing] removed irrelevant string cast in Route
  Fixed typo
  Make YamlFileLoader and XmlFileLoader file loading extensible
  [HttpKernel] fix typo
  Fixed singularization of "prices"
  [Form] Removed an exception that prevented valid formats from being passed, e.g. "h" for the hour, "L" for the month etc.
  [HttpKernel] fixed Client when using StreamedResponses (closes #5370)
  fixed PDO session handler for Oracle (closes #5829)
  [HttpFoundation] fixed PDO session handler for Oracle (closes #5829)
  [Locale] removed a check that is done too early (and it is done twice anyways)
  Update src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf
  Adding new localized strings for farsi validation.
  [HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes #5937)
  [Form] Fixed forms not to be marked invalid if their children are already marked invalid
  [Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8
  added missing tests from previous merge
  [Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  Fix export-ignore on Windows
  Show correct class name InputArgument in error message
  ...

Conflicts:
	.travis.yml
	src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
2012-11-13 15:08:04 +01:00
Fabien Potencier
0159358a08 refactored CSS, images, templates included in the built-in bundles
The goal is to make things more decoupled and more reusable across
different bundles.

There will be a PR for the distribution bundle too to simplify the code
based on this PR.
2012-11-13 10:20:48 +01:00
Fabien Potencier
812b9b1724 replace _ in stylesheets (ids and classes) by - (should be consistent across the whole framework now) 2012-11-12 18:32:01 +01:00
Fabien Potencier
e0aab4075f renamed sf-exceptionreset to sf-reset 2012-11-12 18:19:16 +01:00
Fabien Potencier
ff9051d19f [TwigBundle] fixed typo 2012-11-12 18:18:57 +01:00
Fabien Potencier
56fe8d1ffd duplicated the code helper code to the Twig bundle
The code has been duplicated and not moved for BC reasons.

This code has been duplicated in the Twig bundle to be able to decouple
the web profiler and the exception templates.
2012-11-12 15:07:56 +01:00
Fabien Potencier
6b54a51963 moved the Stopwatch classes to their own component 2012-11-09 10:08:25 +01:00
Włodzimierz Gajda
646a714ded Fix export-ignore on Windows 2012-11-08 10:51:48 +01:00
Fabien Potencier
275cf8cf00 removed unused use statements 2012-11-04 09:30:21 +01:00
Fabien Potencier
88ea842c5e Merge branch '2.1'
* 2.1: (28 commits)
  Delete use of CreationExeption
  [Form] Fixed error message in PropertyPath to not advice to use a non-existing feature
  [Form] Fixed creation of multiple money fields with different currencies
  [Form] Fixed setting the "data" option to an object in "choice" and "entity" type
  Fixed Serbian plural translations.
  Fixed IPv6 Check in RequestMatcher
  Fix typo
  change what I think is a typo
  [Console] Fix error when mode is not in PATH
  [WebProfilerBundle] fixed macro usage (to be forward compatible with Twig 2.x)
  Change monolog require-dev to use the branch alias instead of dev-master
  [FrameworkBundle] partially reverted previous merge
  [2.1] Added missing error return codes in commands
  Made the router lazy when setting the context
  [WebProfilerBundle] fixed typos
  Fix incorrect variable in FileProfilerStorage
  UnitTest fix
  UnitTest fix
  added a unit test
  fixed #5384
  ...
2012-10-18 23:16:19 +02:00
Fabien Potencier
6b12fc0330 [TwigBundle] fixed unit tests 2012-10-17 15:58:03 +02:00
Fabien Potencier
3c65f6dee2 [TwigBundle] fixed unit tests 2012-10-17 15:22:39 +02:00
Fabien Potencier
98070d50af merged branch hason/return_code (PR #5586)
This PR was squashed before being merged into the 2.1 branch (closes #5586).

Commits
-------

6b66bc3 [2.1] Added missing error return codes in commands

Discussion
----------

[2.1] Added missing error return codes in commands

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
See: #5585

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

by fabpot at 2012-09-24T12:10:47Z

Exit code values are standardized and some values have some well-defined meaning. Have a look here for more info: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Process/Process.php#L67
2012-10-14 11:21:26 +02:00
Martin Hasoň
6b66bc3226 [2.1] Added missing error return codes in commands 2012-10-14 11:21:26 +02:00
Christophe Coevoet
d07ce03d6f [TwigBundle] Moved the registration of the app global to the environment
This makes the app global variable available also when accessing the Twig
environment directly instead of using the TwigEngine.
2012-10-13 17:19:49 +02:00
Fabien Potencier
5956f9f2b4 Merge branch '2.1'
* 2.1:
  fixed CS
  added doc comments
  added doc comments
  [Validator] Updated swedish translation
  Update src/Symfony/Component/Validator/Resources/translations/validators.de.xlf
  [2.1] Exclude tests from zips via gitattributes
  [HttpKernel][Translator] Fixed type-hints
  Updated lithuanian validation translation
  [DomCrawler] Allows using multiselect through Form::setValues().
  [Translation] forced the catalogue to be regenerated when a resource is added (closes symfony/Translation#1)
  Unit test for patched method OptionsResolver::validateOptionValues().
  validateOptionValues throw a notice if an allowed value is set and the corresponding option isn't.
  [Form] Hardened code of ViolationMapper against errors
  [HttpFoundation] Fixed #5611 - Request::splitHttpAcceptHeader incorrect result order.
  [Form] Fixed negative index access in PropertyPathBuilder
  Update src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf

Conflicts:
	src/Symfony/Component/DomCrawler/Form.php
	src/Symfony/Component/Process/Process.php
2012-10-06 21:57:59 +02:00
Igor Wiedler
462dddfac9 [2.1] Exclude tests from zips via gitattributes 2012-10-04 17:17:57 +02:00
Fabien Potencier
5c809d8ffb [TwigBundle] added support for Twig namespaced paths (Twig 1.10)
In a template, you can now use native Twig template names, instead of
the Symfony ones:

Before (still works):

    {% extends "AcmeDemoBundle::layout.html.twig" %}
    {% include "AcmeDemoBundle:Foo:bar.html.twig" %}

After:

    {% extends "@AcmeDemo/layout.html.twig" %}
    {% include "@AcmeDemo/Foo/bar.html.twig" %}

Using native template names is also faster.

The only drawback is that the new notation looks similar to the way we
locate resources in Symfony, which would be
@AcmeDemoBundle/Resources/views/Foo/bar.html.twig. We could have used
the same notation, but it is rather verbose (and by the way, using this
notation did not work anyway in templates).
2012-10-03 15:33:19 +02:00
Filippo Tessarotto
45bf52358e Optimize autoload prefix in composer.json
By having more specific autoload prefixes it is possible to reduce the
number of stat calls made. Also it prevents conflicts with similar
namespaces.
2012-09-28 09:34:16 +02:00
Fabien Potencier
81206a2c92 Merge branch '2.1'
* 2.1:
  Create CONTRIBUTING.md file for auto-linking in PR's
  Added Bulgarian translation
  [Profiler]Use the abstract method to get client IP
  Typo fix
  Fixing incorrect word in twig:lint command description
  Rename $key parameter to $name for consistency
  =Minor chnage: replaced function by method
  Fixed the phpdoc in the DependencyInjection component
2012-09-17 22:42:23 +02:00
Richard Miller
2bcb6f2c9b Fixing incorrect word in twig:lint command description 2012-09-16 20:33:46 +01:00
Fabien Potencier
13937de2c8 replaced self.version/2.1.* by 2.2.* in composer.json files 2012-09-10 12:59:37 +02:00
Fabien Potencier
a9a0f420e2 merged 2.1 2012-09-10 12:54:04 +02:00
Fabien Potencier
3c32fd993d replaced self.version by 2.1.* in composer.json files 2012-09-10 12:53:42 +02:00
Fabien Potencier
4dc197c3e1 udpated composer.json to 2.2 2012-09-06 20:45:30 +02:00
William DURAND
933e821496 Add minimum-stability (dev) in each component 2012-08-22 15:48:41 +02:00
Bernhard Schussek
629093ed25 [Form] Extracted common parts of FormHelper and FormExtension into separate classes 2012-07-16 21:39:27 +02:00
Fabien Potencier
cd24e6ea8f Revert "raised the minimum version of PHP to 5.3.4 (closes #3856)"
This reverts commit 2dcc44897e.
2012-07-15 12:13:51 +02:00
Jordan Alliot
1764574198 [TwigBundle] Improved logs display on exception page 2012-07-14 13:58:32 +02:00
Fabien Potencier
2dcc44897e raised the minimum version of PHP to 5.3.4 (closes #3856)
We've raised the minimum version of PHP because of a PHP
bug before 5.3.4:

https://bugs.php.net/bug.php?id=52083
https://bugs.php.net/bug.php?id=50027
2012-07-13 21:22:46 +02:00
Fabien Potencier
3f05e7047f ensured that an exception is always converted to an error response (and that we keep the HTTP status code and headers) 2012-07-13 11:55:51 +02:00
Arnaud Kleinpeter
dc4d3437ce [TwigBundle] Fixed error message 2012-07-09 23:12:46 +02:00
Fabien Potencier
39e821c1eb [TwigBundle] added a new paths setting to allow configuration of more paths for the filesystem loader (refs #4649) 2012-07-09 17:37:31 +02:00
Fabien Potencier
8f267ada09 merged branch everzet/twig-paths (PR #4649)
Commits
-------

dbeff69 [TwigBundle] added support for custom loader paths

Discussion
----------

[TwigBundle] added support for custom loader paths

Before this commit, there was no ability to specify custom
search paths for Twig loader. Lets say we have twig templates
outside bundles directories (parts of the domain logic, not
application) - we want to be able to load them.

This commit adds `loader_paths` parameter to twig config,
which is used to set custom paths to the loader.

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

by travisbot at 2012-06-25T09:50:44Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1699654) (merged dbeff697 into 03c8d4d2).

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

by vicb at 2012-06-26T06:14:30Z

You also need to support xml in the configuration and update the xsd file.

edit: adding some DI unit tests is probably a good idea.

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

by everzet at 2012-06-26T08:49:20Z

@vicb agree, was just a fast stabbing ;)

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

by fabpot at 2012-06-28T14:06:02Z

I'm +1. Can you "finish" the PR?

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

by fabpot at 2012-07-02T13:23:33Z

@everzet If you don't have time, I can do the remaining work.
2012-07-09 17:37:22 +02:00
Fabien Potencier
3f9e8ffe5c [ClassLoader] made ClassCollectionLoader::load() automatically include class dependencies 2012-07-04 15:19:35 +02:00
everzet
dbeff6979b [TwigBundle] added support for custom loader paths
Before this commit, there was no ability to specify custom
search paths for Twig loader. Lets say we have twig templates
outside bundles directories (parts of the domain logic, not
application) - we want to be able to load them.

This commit adds `loader_paths` parameter to twig config,
which is used to set custom paths to the loader.
2012-06-25 11:36:26 +02:00
Fabien Potencier
f8e68e58bf merged branch alexandresalome/twig-linter-context (PR #4452)
Commits
-------

df5590e [TwigBundle] Fix return code in LintComand
604a79a [TwigBundle] Fix line start in twig:lint command
91936b5 [TwigBundle] Fancy output for twig:lint

Discussion
----------

[TwigBundle] Fancy output for twig:lint

Previous PR : #3804

@marcw @fabpot Since no exception is raised, the return code is always 0. Do I add ``return rand(64, 113)`` ?

Screenshot : http://twitpic.com/9qql09

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

by travisbot at 2012-05-29T21:18:33Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1470256) (merged 91936b53 into adf07f1e).

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

by travisbot at 2012-05-29T21:21:54Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1470353) (merged 604a79ab into adf07f1e).

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

by fabpot at 2012-05-30T16:45:24Z

@alexandresalome just return 1 in case of a problem.

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

by travisbot at 2012-06-06T20:06:04Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1550631) (merged df5590ec into adf07f1e).
2012-06-08 09:58:39 +02:00
alexandresalome
df5590ec60 [TwigBundle] Fix return code in LintComand 2012-06-06 21:11:24 +02:00
Fabien Potencier
f5dee51c9e merged branch schmittjoh/configAttr (PR #4425)
Commits
-------

23bb668 [FrameworkBundle][SecurityBundle] updated configuration to new method names
8775f2c [Config] replaced setInfo(), setExample() with more generic attributes

Discussion
----------

[Config] replaced setInfo(), setExample() with more generic attributes

This replaces ``setInfo`` and ``setExample`` with a more generic attribute system which provides more flexibility and is more future prove.

I have kept the specialized ``setInfo`` and ``setExample`` methods because they are a bit shorter, and also a good demonstration of what the system could be used for. However for consistency, I have renamed them to ``info()`` and ``example()`` respectively.

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

by travisbot at 2012-05-26T17:37:06Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1442720) (merged 8775f2c1 into 9e951991).

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

by stof at 2012-05-26T17:42:02Z

and you forgot to update FrameworkBundle

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

by travisbot at 2012-05-26T17:46:37Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1442764) (merged 23bb668e into 9e951991).
2012-05-30 07:56:53 +02:00
alexandresalome
604a79aba2 [TwigBundle] Fix line start in twig:lint command 2012-05-29 23:15:22 +02:00
alexandresalome
91936b533d [TwigBundle] Fancy output for twig:lint 2012-05-29 23:06:08 +02:00
Fabien Potencier
adf07f1e53 merged 2.0 2012-05-27 12:30:27 +02:00
Johannes M. Schmitt
8775f2c17c [Config] replaced setInfo(), setExample() with more generic attributes 2012-05-26 12:30:39 -05:00
Fabien Potencier
7f93bf1f5b [TwigBundle] fixed a PHP warning (closes #4397) 2012-05-24 16:44:41 +02:00
Fabien Potencier
95ca5fe11e fixed typo 2012-05-23 17:39:12 +02:00
Christophe Coevoet
7a85b4340b [TwigBundle] Fixed the path to templates when using composer
When installing the bundle and the bridge from the standalone repositories
the relative path between them is different. This simply backports the
change done in symfony 2.1 to allow using subtree repositories with 2.0.x
too.
2012-05-22 22:57:32 +02:00
Fabien Potencier
3bdf52a16a fixed CS 2012-05-18 19:42:42 +02:00
Fabien Potencier
ec36ae7eda merged 2.0 2012-05-18 19:04:58 +02:00
Fabien Potencier
c9ba077a20 added missing LICENSE files 2012-05-18 19:00:00 +02:00
Alexander Deruwe
6341de025e Be more specific in phpdoc (Fixes #3216) 2012-05-16 20:34:56 +02:00
Fabien Potencier
41621e42e9 fixed phpdoc @param alignment 2012-05-15 22:19:31 +02:00
corphi
0a0e74b9af Replaced &raquo; by &#187; (for XHTML compatibility) 2012-05-09 03:05:23 +03:00
Fabien Potencier
fe6b26c5d0 [TwigBundle] updated CHANGELOG 2012-05-07 10:53:05 +02:00
Fabien Potencier
6e6eb6c462 merged branch symfony/escaping-839 (PR #4105)
Commits
-------

1e84f1e [TwigBundle] implemented context auto-escaping in Twig templates based on the template extension

Discussion
----------

[2.2] Implements context escaping for Twig (fixes #839)
2012-05-07 10:51:11 +02:00