Commit Graph

11373 Commits

Author SHA1 Message Date
Roumen Damianoff
7cba683f04 Updated Bulgarian translation
Added Bulgarian translation for form component.
Updated Bulgarian translation for validator messages.
2012-11-25 01:16:21 +02:00
Fabien Potencier
1c0ba78833 [Form] simplified a test from previous merge 2012-11-24 13:04:10 +01:00
Fabien Potencier
ac24f3e514 merged branch stfalcon/patch-1 (PR #5028)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5028).

Commits
-------

5bfe757 Update src/Symfony/Component/Form/Extension/Core/Type/FileType.php

Discussion
----------

Update src/Symfony/Component/Form/Extension/Core/Type/FileType.php

fixed https://github.com/dustin10/VichUploaderBundle/issues/27

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

by bschussek at 2012-07-24T12:44:11Z

Thank you for the PR! Could you please add a test case?

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

by stfalcon at 2012-07-25T13:53:24Z

> Could you please add a test case?

And what to check? I added one static option :)

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

by bschussek at 2012-07-25T14:22:40Z

Whatever was the reason for adding the option ;) The test should fail when the option is not added and succeed when the option is there.

Probably it is sufficient to create a new field of type "file" in the test which comes prefilled with a `File` object.

```
$file = $this->getMock('Symfony\Component\HttpFoundation\File\File');
$this->factory->create('file', $file)
```

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

by stfalcon at 2012-11-15T12:32:01Z

sorry, it's bug in VichUploaderBundle

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

by stfalcon at 2012-11-21T17:00:59Z

or not :)

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

by stfalcon at 2012-11-22T19:47:34Z

@bschussek done! it was really a bug with FileType

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

by stfalcon at 2012-11-22T22:15:18Z

@stof who can merge it? I want close this bug https://github.com/dustin10/VichUploaderBundle/issues/27 :)

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

by stof at 2012-11-23T02:15:46Z

@stfalcon the rule is that only @fabpot merges PRs on symfony.

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

by stfalcon at 2012-11-23T10:12:05Z

@fabpot do you have a minute :)? it's simple PR but many people wait for it
2012-11-24 12:59:06 +01:00
Stepan Tanasiychuk
2fe04e1378 Update src/Symfony/Component/Form/Extension/Core/Type/FileType.php 2012-11-24 12:59:05 +01:00
Fabien Potencier
eb0a60e1a0 merged branch armetiz/patch-9 (PR #6021)
This PR was merged into the 2.1 branch.

Commits
-------

82334d2 Force loader to be null or a EntityLoaderInterface

Discussion
----------

Force loader to be null or a EntityLoaderInterface
2012-11-24 12:54:39 +01:00
Fabien Potencier
deb740b6ed merged branch bamarni/preloaded-extension (PR #5479)
This PR was merged into the 2.1 branch.

Commits
-------

84635bd [Form] allowed no type guesser to be registered

Discussion
----------

[Form] made the factory builder pass null when no type guesser registered

reopened #5422 against 2.1 as it's a bug fix

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

by stof at 2012-10-13T21:23:34Z

@fabpot anything left for this PR ?

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

by fabpot at 2012-10-14T09:41:29Z

@bamarni Can you add some unit tests and also update the FormExtensionInterface interface phpdoc as `getTypeGuesser` can now return `null`? Thanks. ping @bschussek

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

by bamarni at 2012-10-14T17:10:27Z

I've added a few tests covering this.

@fabpot : the phpdoc is already correct, it currently can return null, this only occurs with this convenient class.

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

by bschussek at 2012-10-16T07:43:41Z

This PR breaks FormFactory::createBuilderForProperty(), which expects a guesser to be present. Can you check the component for other uses of the guesser and add a null-check there?

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

by bamarni at 2012-10-16T10:57:54Z

I cannot find other places than the factory (searching for 'getTypeGuesser').

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

by bschussek at 2012-11-08T16:58:37Z

You should also adapt `FormRegistry::getTypeGuesser()` not to build a `FormTypeGuesserChain` if the array of guessers is empty. In that case it will return now `null` (adapt the doc block). We also need a different was of checking if the type guessers have already been parsed in FormRegistry. Otherwise the first if condition in `FormRegistry::getTypeGuesser()` will never become false. You could for example initialize the property `$guesser` to `false` and only set it to `null` after the first run of `getTypeGuesser()`.

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

by bamarni at 2012-11-08T18:40:00Z

good catch I had missed it! I've applied your suggestion in the latest commit. Do you see anything else before I squash?

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

by bschussek at 2012-11-08T18:45:15Z

A test for `FormRegistry::getTypeGuesser()` would of course be awesome.

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

by bamarni at 2012-11-08T18:52:13Z

Then it was already awesome! (see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Tests/FormRegistryTest.php#L252)

I've also added one for the null case if it's what you meant.
2012-11-24 12:52:59 +01:00
Fabien Potencier
aa12428867 merged branch xkobal/2.1 (PR #6079)
This PR was squashed before being merged into the 2.1 branch (closes #6079).

Commits
-------

bbeff54 Xliff with other node than source or target are ignored

Discussion
----------

Xliff with other node than source or target are ignored

Referring to the xliff XSD, the format can allow other nodes like <note>. Check only count is dangerous if others nodes are present, and we aren't sure that nodes are the two we wan't (source and target)

And the real problem if that if there is other node in translation, the translation is silently ignored.

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

by stloyd at 2012-11-20T17:44:47Z

You should add test that covers this, as well as #6078 should be closed (branch `2.1` is merged from time to time to `master`).

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

by xkobal at 2012-11-21T11:13:32Z

I have added a new node to xliff fixtures and edit test to be sure node isn't ignored.
2012-11-21 16:37:43 +01:00
Xavier HAUSHERR
bbeff543cd Xliff with other node than source or target are ignored 2012-11-21 16:37:42 +01:00
Fabien Potencier
b3c3e89462 merged branch malaney/FilesystemMirrorSymlinkFix (PR #6073)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6073).

Commits
-------

c1c822b Filesystem Component mirror symlinked directory fix

Discussion
----------

Filesystem Component mirror symlinked directory fix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:#6070
Todo:
License of the code: MIT
Documentation PR:

Because of the order in which file types (i.e. dir, link, file) are checked in the Filesystem component, symlinked directories get treated as directories instead of symlinks.  As a result symlinked directories are not truly mirrored when performing a php app/console assets:install.  This PR checks that a file is a symlink BEFORE checking that its a directory and properly symlinks as necessary.
2012-11-20 14:21:33 +01:00
Malaney J. Hill
f211b198c7 Filesystem Component mirror symlinked directory fix 2012-11-20 14:21:32 +01:00
Fabien Potencier
0a8c0eeb5a merged branch Tobion/patch-7 (PR #6068)
This PR was merged into the 2.1 branch.

Commits
-------

915dd30 info about session namespace
4b21d18 fix upgrade info about locale

Discussion
----------

fix upgrade info about locale

it duplicated the header and had an irrelevant point inbetween

I also added an entry about session namespace.
2012-11-19 22:13:35 +01:00
Fabien Potencier
c40cda6bb8 merged branch tucksaun/fix-process-tests-osx (PR #6072)
This PR was merged into the 2.1 branch.

Commits
-------

0f4d8af [Process][Tests] fixed chainedCommandsOutput tests

Discussion
----------

[Process][Tests] fixed chainedCommandsOutput tests

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (previously no)
Fixes the following tickets: -
Todo: -
License of the code: MIT

Currently, if you run the Process Component tests on an OS where echo does not support the -n option (like MacOS X), they will fail.

This PR fix that by using only a simple echo which is universal.
2012-11-19 22:12:23 +01:00
Tugdual Saunier
0f4d8af6cf [Process][Tests] fixed chainedCommandsOutput tests
for OS where echo does not support -n option (like MacOS X)
2012-11-19 21:53:52 +01:00
Tobias Schultze
915dd301e4 info about session namespace 2012-11-19 17:25:14 +01:00
Tobias Schultze
4b21d18738 fix upgrade info about locale
it duplicated the header and had an irrelevant point inbetween
2012-11-19 17:13:42 +01:00
Fabien Potencier
8f33f2ea86 merged branch Tobion/routing-centos (PR #6062)
This PR was merged into the 2.1 branch.

Commits
-------

1daefa5 [Routing] made it compatible with older PCRE version (pre 8)

Discussion
----------

[Routing] compatibility with older PCRE version (pre 8)

fixes #4093

Ok I changed my mind about this issue.
1. I figured more people are affected than I thought and CentOS is stubborn.
2. Symfony still uses the old regex style `?P<param>` in several other components. So also doing so in the routing makes it more consistent.
3. Even if it's definitely not good to use an over 6 year old PCRE version with a recent PHP version, we can still try to provide the best experience. It doesn't mean we support outdated software stacks of custom PHP compilations as we won't and cannot specifically test against it.

@fabpot: I will do a seperate PR on master when you merged this because the code changed alot in master so it cannot easily be merged I guess. I will also convert the symfony requirement for PCRE in the requirements check to a recommendation.
2012-11-19 11:35:29 +01:00
Tobias Schultze
1daefa5f4b [Routing] made it compatible with older PCRE version (pre 8) 2012-11-19 10:25:59 +01:00
Fabien Potencier
c4631c5fe6 merged branch Tobion/patch-2 (PR #6048)
This PR was merged into the 2.1 branch.

Commits
-------

ea2bb09 tiny refactoring for consistency

Discussion
----------

tiny refactoring for consistency

no need to use the iterator within the class. not done anywhere else.
2012-11-19 08:43:54 +01:00
Tobias Schultze
ea2bb09d55 tiny refactoring for consistency 2012-11-18 18:36:28 +01:00
Fabien Potencier
461db28d33 merged branch eriksencosta/patch-2 (PR #6032)
This PR was merged into the 2.1 branch.

Commits
-------

0b088ec fixed docblock return type

Discussion
----------

fixed docblock return type
2012-11-17 18:06:46 +01:00
Eriksen Costa
0b088ec939 fixed docblock return type 2012-11-16 14:51:07 -02:00
Thomas Tourlourat
82334d2640 Force loader to be null or a EntityLoaderInterface 2012-11-15 16:44:00 +01:00
Fabien Potencier
9a2edb9a63 merged branch lolautruche/httpCacheStoreExtendable (PR #6016)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #6016).

Commits
-------

9b0cad4 Added HttpCache\Store::generateContentDigest() + changed  visibility

Discussion
----------

Added HttpCache\Store::generateContentDigest() + changed $root visibility

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

## Description
This PR adds 2 small changes in base `HttpCache\Store`:

1. Adds `generateContentDigest()` protected method, allowing to easily override the default behavior for special cases.
2. Change `$root` visibility to *protected* to let descendant access it.

This allows special implementations of HttpCache when storing specific cache files in a different place is needed.

## Example
An example of implementation can be found [in eZ Publish 5 source code](https://github.com/ezsystems/ezp-next/blob/master/eZ/Publish/Core/MVC/Symfony/Cache/Http/LocationAwareStore.php). In this example, eZ Publish content cache entities are stored under a different folder than regular cache entities in order to ease cache purge based on a content location.

## Testing
No unit tests were added since the behavior didn't change and the new method is protected.

PS : It would be nice to have this in 2.1 branch as well 😃
2012-11-15 14:23:01 +01:00
Jérôme Vieilledent
d2920c94a1 Added HttpCache\Store::generateContentDigest() + changed visibility 2012-11-15 14:23:00 +01:00
Fabien Potencier
2d488b79f2 Merge branch '2.0' into 2.1
* 2.0:
  fixed comment. The parent ACL is not accessed in this method.
  [HttpFoundation] Make host & methods really case insensitive in the RequestMacther
  [Validator] fixed Ukrainian language code (closes #5972)
  Fixed case of php function

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.uk.xliff
	src/Symfony/Component/HttpFoundation/RequestMatcher.php
2012-11-13 17:29:06 +01:00
Fabien Potencier
2fa9bd0b3f forced Travis to use source to workaround their not-up-to-date Composer on PHP 5.3.3 2012-11-13 15:04:20 +01:00
Fabien Potencier
cb00411fc8 merged branch Jola/comment-fix (PR #5992)
This PR was merged into the 2.0 branch.

Commits
-------

b3a8efd fixed comment. The parent ACL is not accessed in this method.

Discussion
----------

fixed comment. The parent ACL is not accessed in this method.

Just fixed a comment on PermissionGrantingStrategy.
hasSufficientPermissions() is not accessing the parent ACL. That's done in isGranted().
2012-11-13 13:50:22 +01:00
Fabien Potencier
7b4a27893a merged branch Tobion/patch-2 (PR #5997)
This PR was merged into the 2.1 branch.

Commits
-------

7569ee2 [Routing] removed irrelevant string cast in Route

Discussion
----------

[Routing] removed irrelevant string cast in Route

Even if the passed key is an integer, casting to string won't make any difference in array keys (it remains an int key).
2012-11-13 13:49:04 +01:00
Tobias Schultze
7569ee2964 [Routing] removed irrelevant string cast in Route
Even if the passed key is an integer, casting to string won't make any difference in array keys (it remains an int key).
2012-11-12 17:54:27 +01:00
Fabien Potencier
938670d34b merged branch jdreesen/patch-1 (PR #5991)
This PR was merged into the 2.1 branch.

Commits
-------

3881649 Fixed typo

Discussion
----------

Fixed typo

Fixed a small typo in the docblock
2012-11-12 15:04:21 +01:00
Jörn Lang
b3a8efd6cd fixed comment. The parent ACL is not accessed in this method. 2012-11-12 15:01:47 +01:00
Jacob Dreesen
3881649477 Fixed typo
Fixed a small typo in the docblock
2012-11-12 14:58:31 +01:00
Fabien Potencier
d060fd4953 merged branch vicb/security (PR #5988)
This PR was merged into the 2.0 branch.

Commits
-------

e12bd12 [HttpFoundation] Make host & methods really case insensitive in the RequestMacther

Discussion
----------

[HttpFoundation] Make host & methods really case insensitive in the Requ...

...estMacther

and backport changes from 2.2

Details:
- does not take case into account when checking the host (the `Request` always returns a lowercase value) to protect against user typo,
- makes the constructor case proof by invoking setters rather than setting properties directly (you could then add un unreachable method i.e; `get`)

Please propagate to 2.1/2.2 if accpeted. Thanks.
2012-11-12 14:56:10 +01:00
Victor Berchet
e12bd123be [HttpFoundation] Make host & methods really case insensitive in the RequestMacther
and backport changes from 2.2
2012-11-12 13:39:12 +01:00
Fabien Potencier
d55d3b823d merged branch igorw/protected-fileloader (PR #5981)
This PR was merged into the 2.1 branch.

Commits
-------

c659e78 Make YamlFileLoader and XmlFileLoader file loading extensible

Discussion
----------

Make YamlFileLoader and XmlFileLoader file loading extensible

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Documentation PR: not needed

For phpBB we want to use a non-dumped container in the dev env to prevent having to clear the cache all the time. We're creating the container twice because we need some information at compile time which must be fetched from the container. The process is as follows:

Create temp container, get list of installed extensions (think bundles), create a compiler pass with the extensions list, create a new container with that compiler pass, compile it, dump it.

The problem is that we need to load and parse the YAML twice which is really slow. Caching it in the YamlFileLoader should save 50-100ms per page load.

By changing visibility to protected it becomes possible to extend the loader and cache file contents.
2012-11-12 10:50:10 +01:00
Igor Wiedler
c659e7858a Make YamlFileLoader and XmlFileLoader file loading extensible
By changing visibility to protected it becomes possible to extend the
loader and cache file contents. phpBB needs this.
2012-11-11 12:59:36 +01:00
Fabien Potencier
15a5868ab4 [Validator] fixed Ukrainian language code (closes #5972) 2012-11-10 19:51:50 +01:00
Fabien Potencier
d9b291b878 merged branch Tobion/patch-2 (PR #5969)
This PR was merged into the 2.1 branch.

Commits
-------

8e62248 [HttpKernel] fix typo

Discussion
----------

[HttpKernel] fix typo
2012-11-10 19:40:26 +01:00
Tobias Schultze
8e6224840e [HttpKernel] fix typo 2012-11-10 11:47:17 +01:00
Fabien Potencier
5bdf8cbaf9 merged branch fabpot/client-streamed-response (PR #5961)
This PR was merged into the 2.1 branch.

Commits
-------

84b760b [HttpKernel] fixed Client when using StreamedResponses (closes #5370)

Discussion
----------

[HttpKernel] fixed Client when using StreamedResponses (closes #5370)
2012-11-10 09:18:00 +01:00
Fabien Potencier
d2fdd5afbd merged branch pvanliefland/form_singularify_prices (PR #5967)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5967).

Commits
-------

79f750d [Form] Fixed singularization of "prices"

Discussion
----------

[Form] Fixed singularization of "prices"

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

This PR is similar to #4758, although in this case, the singularization of "prices" into "prex" or "prix" is obviously a mistake. I guess anyone working on a e-commerce platform with multiple prices on a product model could encounter this issue.

I adapted the tests as well ; there shouldn't be any bc break.

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

by bschussek at 2012-11-10T07:23:00Z

👍
2012-11-10 09:15:15 +01:00
pvanliefland
92849480d3 Fixed singularization of "prices" 2012-11-10 09:15:15 +01:00
Fabien Potencier
de63128cab merged branch bschussek/issue5730 (PR #5962)
This PR was merged into the 2.1 branch.

Commits
-------

0f75586 [Form] Removed an exception that prevented valid formats from being passed, e.g. "h" for the hour, "L" for the month etc.

Discussion
----------

[Form] Removed an exception that prevented valid formats from being passed

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5730
Todo: -
License of the code: MIT
Documentation PR: -
2012-11-09 17:32:10 +01:00
Bernhard Schussek
0f75586248 [Form] Removed an exception that prevented valid formats from being passed, e.g. "h" for the hour, "L" for the month etc. 2012-11-09 17:22:53 +01:00
Fabien Potencier
84b760b923 [HttpKernel] fixed Client when using StreamedResponses (closes #5370) 2012-11-09 16:49:48 +01:00
Fabien Potencier
ae61d354c9 merged branch fabpot/response-protocol (PR #5954)
This PR was merged into the 2.1 branch.

Commits
-------

e34fb41 [HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes #5937)

Discussion
----------

[HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes #5937)
2012-11-09 15:00:29 +01:00
Fabien Potencier
d965464d86 merged branch fabpot/pdo-session-handler (PR #5960)
This PR was merged into the 2.1 branch.

Commits
-------

67e697f fixed PDO session handler for Oracle (closes #5829)

Discussion
----------

fixed PDO session handler for Oracle (closes #5829)
2012-11-09 14:59:32 +01:00
matt foster
67e697f7cb fixed PDO session handler for Oracle (closes #5829) 2012-11-09 14:46:23 +01:00
matt foster
c2a8a0b8bd [HttpFoundation] fixed PDO session handler for Oracle (closes #5829) 2012-11-09 14:44:15 +01:00
Fabien Potencier
a30383d12c [Locale] removed a check that is done too early (and it is done twice anyways) 2012-11-09 13:55:40 +01:00