Commit Graph

15491 Commits

Author SHA1 Message Date
Fabien Potencier
eb6da72cf8 feature#8288 [Process] Added support for stdout and stderr flush (Issue #7884) (imobilis)
This PR was squashed before being merged into the master branch (closes #8288).

Discussion
----------

[Process] Added support for stdout and stderr flush (Issue #7884)

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7884
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/2728

**To-do**
- [x] Submit changes to the documentation.
- [x] Fix a test broken on travis.
- [x] Fix mistakes on the documentation.
- [x] Removed flush + get methods.
- [x] Changed tests assert calls.

This PR introduces flushing methods for both stdout and stderr on Process class. The new methods are:
- flushOutput(): clears the output buffer.
- flushErrorOutput(): clears the error output buffer.

Tests for new methods are included on the PR.

Commits
-------

90daef7 [Process] Added support for stdout and stderr flush (Issue #7884)
2013-09-27 15:52:58 +02:00
Juan Traverso
90daef75c6 [Process] Added support for stdout and stderr flush (Issue #7884) 2013-09-27 15:52:56 +02:00
Fabien Potencier
c5a65780db [Translation] fixed CS 2013-09-27 15:28:11 +02:00
Fabien Potencier
9988475881 feature#8534 [Translation] Added support for JSON format (both loader and dumper). (singles)
This PR was merged into the master branch.

Discussion
----------

[Translation] Added support for JSON format (both loader and dumper).

Based on `IniFileLoader\Dumper`.

Q | A
--- | ---
Bug fix? |no
New feature?	| yes
BC breaks?|	no
Deprecations?	|no
Tests pass?	| yes
Fixed tickets	| -
License	| MIT
Doc | this component don't have docs

Commits
-------

fcef021 [Translation] Added support for JSON format (both loader and dumper).
2013-09-27 15:25:18 +02:00
Fabien Potencier
21bddb83c1 feature#9147 [Translator] added getLoaders() method (fabpot)
This PR was merged into the master branch.

Discussion
----------

[Translator] added getLoaders() method

see #8984

Commits
-------

6cb4c7c added getLoaders() method
2013-09-27 14:34:27 +02:00
Nicolas Talle
6cb4c7c70e added getLoaders() method 2013-09-27 14:04:15 +02:00
Fabien Potencier
dfd3e99dec bumped Symfony version to 2.3.6 2013-09-27 12:40:14 +02:00
Bernhard Schussek
bf85e8365a [FrameworkBundle][SecurityBundle] Added service configuration for the new Security CSRF sub-component 2013-09-27 10:16:29 +02:00
Bernhard Schussek
2048cf6d35 [Form] Deprecated the CSRF implementation and added an optional dependency to the Security CSRF sub-component instead 2013-09-27 10:12:40 +02:00
Bernhard Schussek
85d49597a9 [Security] Changed Security HTTP sub-component to depend on CSRF sub-component instead of Form 2013-09-27 10:08:57 +02:00
Bernhard Schussek
1bf16400fb [Security] Added CSRF sub-component 2013-09-27 10:08:54 +02:00
Fabien Potencier
aa5626cd2a updated VERSION for 2.3.5 2013-09-27 09:31:40 +02:00
Fabien Potencier
0db6cd7c4e updated CHANGELOG for 2.3.5 2013-09-27 09:31:22 +02:00
Fabien Potencier
3b2dd19fed minor#9143 Set cost type to integer (datibbaw)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #9143).

Discussion
----------

Set cost type to integer

This seems to be a remnant of when the code dealt with crypt() directly. The password_hash() function expects the cost option to be an LVAL (it does a type conversion for strings).

Commits
-------

93ec8bf Set cost type to integer
2013-09-27 09:20:29 +02:00
datibbaw
8753db942a Set cost type to integer
This seems to be a remnant of when the code dealt with crypt() directly. The password_hash() function expects the cost option to be an LVAL (it does a type conversion for strings).
2013-09-27 09:20:28 +02:00
Fabien Potencier
e24dbf7cba minor#9120 Update FormTypeCsrfExtension.php (tweini)
This PR was merged into the master branch.

Discussion
----------

Update FormTypeCsrfExtension.php

There is no need to store the FormFactory in an Attribute.
The FormFactory can be retrieved directly.

Commits
-------

90d59ea Update FormTypeCsrfExtension.php
2013-09-27 09:15:33 +02:00
Jakub Zalas
bb0125b2f9 [DependencyInjection] Prevented inlining of lazy loaded private service definitions. 2013-09-26 23:39:53 +01:00
Fabien Potencier
4330ae5a0a merged branch bschussek/issue2480 (PR #9133)
This PR was merged into the master branch.

Discussion
----------

[Validator] Simplified usage of the Callback constraint

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | fixes #2480, replaces #3939
| License       | MIT
| Doc PR        | symfony/symfony-docs#3012

Commits
-------

cccb1db [Validator] Simplified usage of the Callback constraint
2013-09-26 21:12:02 +02:00
Fabien Potencier
9dffa6fdb8 merged branch tyx/fix/form-profiling (PR #9137)
This PR was merged into the master branch.

Discussion
----------

[Form] form_debug.xml should be loaded only if form config is enabled

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |  -
| License       | MIT
| Doc PR        | -

Explication here:
1972a91653 (commitcomment-4187567)

Commits
-------

b668e24 form_debug.xml should be loaded only if form config is enabled
2013-09-26 21:08:50 +02:00
Fabien Potencier
54e2abd2ce [Routing] removed extra argument 2013-09-26 21:07:06 +02:00
Timothée Barray
b668e24fa7 form_debug.xml should be loaded only if form config is enabled 2013-09-26 15:56:56 +02:00
Fabien Potencier
9a65ce3886 Merge branch '2.2' into 2.3
* 2.2:
  bumped Symfony version to 2.2.9
  updated VERSION for 2.2.8
  updated CHANGELOG for 2.2.8
  bumped the version
  fixed typo
  updated VERSION for 2.2.7
  update CONTRIBUTORS for 2.2.7
  updated CHANGELOG for 2.2.7
  bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com"

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2013-09-26 14:37:59 +02:00
Fabien Potencier
3ead941404 bumped Symfony version to 2.2.9 2013-09-26 14:19:27 +02:00
Bernhard Schussek
cccb1db2b2 [Validator] Simplified usage of the Callback constraint 2013-09-26 13:52:04 +02:00
Fabien Potencier
e80fc4aa25 updated VERSION for 2.2.8 2013-09-26 09:49:44 +02:00
Fabien Potencier
5c2dec6d72 updated CHANGELOG for 2.2.8 2013-09-26 09:49:39 +02:00
Fabien Potencier
ee2de12900 bumped the version 2013-09-26 09:32:59 +02:00
Fabien Potencier
f681444810 fixed typo 2013-09-26 09:30:20 +02:00
Fabien Potencier
803d434839 merged branch jakzal/domcrawler-xpath-namespace-fix (PR #9129)
This PR was merged into the master branch.

Discussion
----------

[DomCrawler] Fixed an issue with namespace prefix matching being to greedy

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9121
| License       | MIT
| Doc PR        | -

The regexp matching prefixes is naive and matches most of strings followed by a colon: `/(?P<prefix>[a-z_][a-z_0-9\-\.]*):[^"\/]/i`.

It is also incomplete as it does not match all the supported characters (like the unicode ones). Implementing [the actual specification](http://www.w3.org/TR/2004/REC-xml-names11-20040204/#NT-PrefixedName) would mean creating a very complex expression, especially because we have to ignore strings contained in quotes etc.

This would match any XML tag name (names in quotes not ignored):

```php
$ncNameStartChar = 'a-z_\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\x{2FF}\\x{370}-\\x{37D}\\x{37F}-\\x{1FFF}\\x{200C}-\\x{200D}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}';
$ncNameChar = $ncNameStartChar.'.\\-0-9\\xB7\\x{0300}-\\x{036F}\\x{203F}-\\x{2040}';
$ncName = '['.$ncNameStartChar.']['.$ncNameChar.']*';
$regexp = sprintf('/(?P<prefix>%s):%s/iu', $ncName, $ncName);
```

Therefore, I decided NOT to throw an exception if found prefix is actually not a prefix. If a prefix used in xpath doesn't exist we'll still get a warning when running it (`DOMXPath::query(): Undefined namespace prefix`).

The current implementation is simple and will work in most situations. For edge cases, it's still possible to register prefixes manually.

What do you think?

Commits
-------

3292163 [DomCrawler] Fixed an issue with namespace prefix matching being to greedy.
2013-09-26 08:29:27 +02:00
Jakub Zalas
3292163fad [DomCrawler] Fixed an issue with namespace prefix matching being to greedy.
The regexp matching prefixes is naive and matches most of strings followed by a colon. It is also incomplete as it does not match all the supported characters (like the unicode ones). It is simple though and sufficient in most situations.
2013-09-25 23:07:33 +01:00
Fabien Potencier
498d8c0ba3 updated VERSION for 2.2.7 2013-09-25 21:27:10 +02:00
Fabien Potencier
3fb8ad2d88 update CONTRIBUTORS for 2.2.7 2013-09-25 21:13:45 +02:00
Fabien Potencier
55de9d9746 merged branch bschussek/form-debugger (PR #9082)
This PR was merged into the master branch.

Discussion
----------

[Form] Implemented form debugger

Same as #9021 (kudos to @digitalkaoz!), with some added caramel.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

**Note:** Please keep in mind that this is a first version only. Not all features (especially UX/UI-wise) that I'd like to see are in there, but it's good enough for a first merge.

Commits
-------

89509d9 [Form] Improved form debugger
f56c577 [HttpKernel] Extracted value exporting logic of DataCollector into a separate ValueExporter class
56d78ed [Form] Decoupled methods of ResolvedFormType so that they can be overridden individually by decorators
a994a5d [Form] Merged subsriber/collector, also collect valid forms
1972a91 [Form] Added form debug collector
2013-09-25 19:00:08 +02:00
Bernhard Schussek
89509d9847 [Form] Improved form debugger 2013-09-25 17:47:13 +02:00
Bernhard Schussek
f56c5774a8 [HttpKernel] Extracted value exporting logic of DataCollector into a separate ValueExporter class 2013-09-25 17:47:12 +02:00
Fabien Potencier
e43955ac96 updated CHANGELOG for 2.2.7 2013-09-25 16:49:03 +02:00
Bernhard Schussek
56d78eda56 [Form] Decoupled methods of ResolvedFormType so that they can be overridden individually by decorators 2013-09-25 15:59:51 +02:00
Robert Schönthal
a994a5d410 [Form] Merged subsriber/collector, also collect valid forms 2013-09-25 15:59:51 +02:00
Robert Schönthal
1972a91653 [Form] Added form debug collector 2013-09-25 15:59:51 +02:00
Fabien Potencier
36d22ca9f7 merged branch povilas/cookiejar-bugfix (PR #9125)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9125).

Discussion
----------

[BrowserKit] bugix: CookieJar returns cookies with domain "domain.com" f...

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Fixes this bug:
```php
$cookieJar = new CookieJar();
$cookieJar->set(new Cookie('foo', 'bar', null, '/', '.example.com'));

print_r($cookieJar->allValues('http://wwwexample.com'));
// expected result: array()
// actual result: array('foo' => 'bar')
```

Commits
-------

060b28e [BrowserKit] bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com"
2013-09-25 15:49:28 +02:00
Povilas Skruibis
89809541b9 bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com" 2013-09-25 15:49:28 +02:00
Fabien Potencier
213480135c merged branch kepten/fix_form_attribute_handling (PR #9124)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] fixed HTML5 form attribute handling XPath query

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | 0a67c88e0e (commitcomment-4120595)
| License       | MIT
| Doc PR        | no

The XPath query used was not handling descendant form elements correctly, so I fixed it and added tests for it.

Commits
-------

bb59ac2 fixed HTML5 form attribute handling XPath query
2013-09-25 13:19:32 +02:00
Fabien Potencier
6c18f6015a merged branch jakzal/merge-fix (PR #9122)
This PR was merged into the 2.3 branch.

Discussion
----------

Removed old way of building icu data

Somehow these lines leaked from 2.2 while merging #9018. This needs to go to 2.3 and master.

Commits
-------

714a762 Removed old way of building icu data.
2013-09-25 13:15:31 +02:00
Robert Kiss
bb59ac2879 fixed HTML5 form attribute handling XPath query 2013-09-25 11:22:53 +02:00
Jakub Zalas
714a762fc9 Removed old way of building icu data. 2013-09-25 09:44:05 +01:00
Fabien Potencier
98c0d38a44 merged branch jakzal/domcrawler-namespace-autodiscovery (PR #6650)
This PR was merged into the master branch.

Discussion
----------

[DomCrawler] Added auto-discovery and explicit registration of namespaces in filter() and filterByXPath()

| Q | A
| --- | ---
|Bug fix: | no
|Feature addition: |yes
|Backwards compatibility break: | yes, default namespace is no longer removed in the `addContent` method
|Symfony2 tests pass: | yes|
|Fixes the following tickets: | #4845
|Todo: | -
|License of the code:| MIT
|Documentation PR: | symfony/symfony-docs#2979

* added support for automatic discovery and explicit registration of document namespaces for `Crawler::filterXPath()` and `Crawler::filter()`
* improved content type guessing in `Crawler::addContent()`
* [BC BREAK] `Crawler::addXmlContent()` no longer removes the default document namespace

I mentioned in #4845 it would probably be possible to use [DOMNode::lookupNamespaceURI()](http://www.php.net/manual/en/domnode.lookupnamespaceuri.php) to find a namespace URI by given prefix. Unfortunately we cannot use it here since we'd have to call it on a node in the namespace we're looking for.

Current implementation makes the following query to find a namespace:
```php
$domxpath->query('(//namespace::*[name()="media"])[last()]')
```

Commits
-------

77e2fa5 [DomCrawler] Removed checks if CssSelector is present.
9110468 [DomCrawler] Enabled manual namespace registration.
be1e4e6 [DomCrawler] Enabled default namespace prefix overloading.
943d446 [DomCrawler] Updated the CHANGELOG with namespace auto-registration details.
c6fbb13 [DomCrawler] Added support for an automatic default namespace registration.
587e2dd [DomCrawler] Made that default namespace is no longer removed when loading documents with addXmlContent().
c905bba [DomCrawler] Added more tests for namespaced filtering.
6e717a3 [DomCrawler] Made sure only the default namespace is removed when loading an XML content.
e5b8abb [DomCrawler] Added auto-discovery of namespaces in Crawler::filter() and Crawler::filterByXPath().
2013-09-25 08:05:47 +02:00
Fabien Potencier
6a28718453 Merge branch '2.3'
* 2.3:
  Run all tests in parallel.
  Fixed an entity class name.
  [HttpKernel] fix usage of deprecated FlattenException

Conflicts:
	src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
2013-09-25 08:04:58 +02:00
Fabien Potencier
453f0d25f7 Merge branch '2.2' into 2.3
* 2.2:
  Run all tests in parallel.
  Fixed an entity class name.

Conflicts:
	.travis.yml
	src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
2013-09-25 08:04:15 +02:00
Fabien Potencier
3ab545734a merged branch adrienbrault/metadata-bag-test (PR #9118)
This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] Remove useless reflection usage in MetadataBagTest

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | np
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Commits
-------

ea27961 [HttpFoundation] Remove useless reflection usage in MetadataBagTest
2013-09-25 08:02:00 +02:00
Fabien Potencier
53b2048c4c merged branch Tobion/flattenexception (PR #9111)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] fix usage of deprecated FlattenException

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9108
| License       | MIT

Commits
-------

8bad61d [HttpKernel] fix usage of deprecated FlattenException
2013-09-25 08:01:03 +02:00