Commit Graph

18263 Commits

Author SHA1 Message Date
Laurent Ghirardotti
638ce847b3 [Doc] Use Markdown syntax highlighting 2014-10-01 07:38:33 +02:00
Fabien Potencier
03f3dec065 [Finder] tweaked docs 2014-10-01 07:36:12 +02:00
Fabien Potencier
c8daa9c420 minor #12059 [Finder] Add info about possibilities offered by SplFileInfo (ywarnier)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12059).

Discussion
----------

[Finder] Add info about possibilities offered by SplFileInfo

Minor documentation improvement

Commits
-------

b2219cf [Finder] Add info about possibilities offered by SplFileInfo
2014-10-01 07:33:40 +02:00
Yannick Warnier
b2219cf150 [Finder] Add info about possibilities offered by SplFileInfo 2014-10-01 07:33:40 +02:00
Fabien Potencier
d002f1744a minor #12088 fix components tests (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

fix components tests

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

Since #12006, the `ContainerBuilder` contains the `addExpressionLanguageProvider()` method which references a class from the ExpressionLanguage component. By default, the PHPUnit mock API tries to mock all methods of the class being doubled. Since the ExpressionLanguage component is not required to run the tests, creating the mock objects fails when the mock API fails to mock the `addExpressionLanguageProvider()` method.

Commits
-------

2f2a732 fix components tests
2014-10-01 07:29:49 +02:00
Fabien Potencier
e6bcb1cff4 fixed CS 2014-10-01 07:28:47 +02:00
Fabien Potencier
408c6aa501 minor #12086 [Security][Http][Authentication] Make a test pass on HHVM (AlphaStream)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #12086).

Discussion
----------

[Security][Http][Authentication] Make a test pass on HHVM

The test mocks AuthenticationException mocking all its (and its ancestors') methods. In HHVM's implementation of \Exception, a static method is called upon instantiation. Mock object generator, however, mocks static methods with 'throw' statements. All of these cause the SimpleAuthenticationHandlerTest to fail on HHVM when attempting to instantiate the mock.

The solution is to disable method mocking for AuthenticationException. An instance of this class is merely passed around between the authentication handler and the failure handler, and no methods are invoked on it. Hence, disabling method mocking should not weaken the unit test.

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

Commits
-------

7ff903e [Security][Http][Authentication] Make a test pass on HHVM
2014-10-01 07:27:37 +02:00
Alex Bakhturin
7ff903ed39 [Security][Http][Authentication] Make a test pass on HHVM 2014-10-01 07:27:37 +02:00
Christian Flothmann
2f2a732807 fix components tests
Since #12006, the `ContainerBuilder` contains the
`addExpressionLanguageProvider()` method which references a class from
the ExpressionLanguage component. By default, the PHPUnit mock API
tries to mock all methods of the class being doubled. Since the
ExpressionLanguage component is not required to run the tests,
creating the mock objects fails when the mock API fails to mock
the `addExpressionLanguageProvider()` method.
2014-10-01 00:07:12 +02:00
Bernhard Schussek
b45ebef229 [Intl] FIxed failing test 2014-09-30 23:25:54 +02:00
Bernhard Schussek
40eaa80ef6 bug #11998 [Intl] Integrated ICU data into Intl component #2 (webmozart)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11998).

Discussion
----------

[Intl] Integrated ICU data into Intl component #2

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

Follow-up PR to #11920. This PR contains generated data files only.

Commits
-------

65a8b9f [Intl] Generated the data for ICU version 54-rc
2014-09-30 23:21:32 +02:00
Bernhard Schussek
65a8b9fc93 [Intl] Generated the data for ICU version 54-rc 2014-09-30 23:21:31 +02:00
Bernhard Schussek
1ce0f875be bug #11920 [Intl] Integrated ICU data into Intl component #1 (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Integrated ICU data into Intl component #1

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

This PR is an alternative implementation to #11884. It depends on ~~#11906~~ and ~~#11907~~ being merged first (~~these are included in the diff until after a merge+rebase~~ merged+rebased now).

With this PR, the ICU component becomes obsolete. The ICU data is bundled with Intl in two different formats: JSON and the binary ICU resource bundle format (version 2) readable by PHP's `\ResourceBundle` class. For a performance comparison between the two, see my [benchmark](/webmozart/json-res-benchmark).

~~The data is contained in two zip files: json.zip (2.6MB) and rb-v2.zip (3.8MB). The handler~~

```php
\Symfony\Component\Intl\Composer\ScriptHandler::decompressData()
```

~~needs to be added as Composer hook and decompresses the data after install/update.~~

The data is included as text/binary now. Git takes care of the compression.

Before this PR can be merged, I would like to find out what the performance difference between the two formats is in real applications. For that, I need benchmarks from some real-life applications which use ICU data - e.g. in forms (language drop-downs, country selectors etc.) - for both the JSON and the binary data. You can force either format to be used by hard-coding the return value of `Intl::detectDataFormat()` to `Intl::JSON` and `Intl::RB_V2` respectively. I'll also try to create some more realistic benchmarks.

If JSON is not significantly slower/takes up significantly more memory than the binary format, we can drop the binary format altogether.

Commits
-------

be819c1 [Intl] Integrated ICU data into Intl component
2014-09-30 23:20:37 +02:00
Fabien Potencier
e24a822c40 minor #12080 [EventDispatcher] fix doc bloc on EventDispatcherInterface (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[EventDispatcher] fix doc bloc on EventDispatcherInterface

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

The doc block says that an array of event names is accepted as input, but no implementation is compliant with that description.

Commits
-------

e3dacbd [EventDispatcher] fix doc bloc on EventDispatcherInterface
2014-09-30 16:01:01 +02:00
Nicolas Grekas
e3dacbd08c [EventDispatcher] fix doc bloc on EventDispatcherInterface 2014-09-30 09:22:23 +02:00
Fabien Potencier
4af20505a6 minor #12070 [Validator] Update validators.zh_CN.xlf, fix translation error (michaeljayt)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12070).

Discussion
----------

[Validator] Update validators.zh_CN.xlf, fix translation error

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

Commits
-------

ab5aaab [Validator] Update validators.zh_CN.xlf, fix translation error
2014-09-29 08:58:14 +02:00
Michael J
ab5aaab414 [Validator] Update validators.zh_CN.xlf, fix translation error 2014-09-29 08:58:14 +02:00
Fabien Potencier
6e534f2023 bumped Symfony version to 2.5.6 2014-09-28 20:29:08 +02:00
Fabien Potencier
2aef97bbc9 updated VERSION for 2.5.5 2014-09-28 19:33:53 +02:00
Fabien Potencier
33af15518b updated CHANGELOG for 2.5.5 2014-09-28 19:33:46 +02:00
Fabien Potencier
6beca0a945 bumped Symfony version to 2.3.21 2014-09-28 18:55:34 +02:00
Fabien Potencier
5ef0ea8414 updated VERSION for 2.3.20 2014-09-28 18:24:47 +02:00
Fabien Potencier
523b9b78b8 update CONTRIBUTORS for 2.3.20 2014-09-28 18:24:25 +02:00
Fabien Potencier
f0d90031a3 updated CHANGELOG for 2.3.20 2014-09-28 18:24:13 +02:00
Fabien Potencier
a4217c3ee0 fixed deps 2014-09-28 17:56:11 +02:00
Fabien Potencier
8d75b4b56f Merge branch '2.4' into 2.5
* 2.4:
  [Debug] fixed class lookup when using PSR-0 with a target dir
  fixed standalone tests
  fixed standalone tests
  [Validator] fixed component standalone tests
  fixed standalone component tests depending on Validator and Form
  fixed some composer.json to make standalone component tests pass
  [SecurityBundle] fixed tests when used in standalone

Conflicts:
	src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php
	src/Symfony/Component/Validator/composer.json
2014-09-28 17:22:14 +02:00
Fabien Potencier
cff4bbbf5d minor #12071 [Debug] fixed class lookup when using PSR-0 with a target dir (fabpot)
This PR was merged into the 2.4 branch.

Discussion
----------

[Debug] fixed class lookup when using PSR-0 with a target dir

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

Commits
-------

f5b38ec [Debug] fixed class lookup when using PSR-0 with a target dir
2014-09-28 17:18:49 +02:00
Fabien Potencier
f5b38ec995 [Debug] fixed class lookup when using PSR-0 with a target dir 2014-09-28 17:03:21 +02:00
Fabien Potencier
3a1661bb38 fixed standalone tests 2014-09-28 17:02:53 +02:00
Fabien Potencier
b6bbe8bc25 fixed standalone tests 2014-09-28 15:40:52 +02:00
Fabien Potencier
158939e8fe [Validator] fixed component standalone tests 2014-09-27 23:11:35 +02:00
Fabien Potencier
09a3c4c956 fixed standalone component tests depending on Validator and Form 2014-09-27 22:43:02 +02:00
Fabien Potencier
5c3cea59ba fixed some composer.json to make standalone component tests pass 2014-09-27 22:16:29 +02:00
Fabien Potencier
de780e88fd Merge branch '2.3' into 2.4
* 2.3:
  [SecurityBundle] fixed tests when used in standalone
2014-09-27 21:38:45 +02:00
Fabien Potencier
98b2db5a1d [SecurityBundle] fixed tests when used in standalone 2014-09-27 21:29:57 +02:00
Fabien Potencier
aa5179b8c8 Merge branch '2.4' into 2.5
* 2.4:
  Make Doctrine's dependency injection test less fragile.
  [Finder] [Iterator] Make the tests less fragile
  [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
  Fix expression language in the container when using the "container" variable
2014-09-27 10:35:39 +02:00
Fabien Potencier
e768f37685 Merge branch '2.3' into 2.4
* 2.3:
  Make Doctrine's dependency injection test less fragile.
  [Finder] [Iterator] Make the tests less fragile
  [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
2014-09-27 10:35:25 +02:00
Fabien Potencier
2ecbf87aa3 minor #12058 [Doctrine][DependencyInjection] Make a test less fragile. (AlphaStream)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12058).

Discussion
----------

[Doctrine][DependencyInjection] Make a test less fragile.

The test checks that a few items are ordered according to the value of their 'priority' attribute. However, a few of the items have the same value of this attribute. RegisterEventListenersAndSubscribersPass doesn't use a stable sorting, yet the test asserts that items that are 'equal' shall go in the original order. Modified so that the order of the original items is not checked.

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

Commits
-------

f1ae970 Make Doctrine's dependency injection test less fragile.
2014-09-27 09:50:52 +02:00
Alex Bakhturin
f1ae970a4e Make Doctrine's dependency injection test less fragile.
[Doctrine][DependencyInjection] The test checks that a few items are ordered according to the value of their 'priority' attribute. However, a few of the items have the same value of this attribute. RegisterEventListenersAndSubscribersPass doesn't use a stable sorting, yet the test asserts that items that are 'equal' shall go in the original order. Modified so that the order of the original items is not checked.
2014-09-27 09:50:52 +02:00
Bernhard Schussek
be819c162f [Intl] Integrated ICU data into Intl component 2014-09-26 16:16:55 +02:00
Fabien Potencier
55b35a2a64 minor #12028 [Finder] [Iterator] Make the tests less fragile (AlphaStream)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12028).

Discussion
----------

[Finder] [Iterator] Make the tests less fragile

Modified the Iterator tests so that they assert only on what's actually being tested. In particular, the tests were checking the order of the files [that were created virtually simultaneously] after sorting them by date. This change is a part of the effort to make Symfony successfully pass tests on HHVM

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

Commits
-------

10f9135 [Finder] [Iterator] Make the tests less fragile
2014-09-26 06:59:53 +02:00
Alex Bakhturin
10f9135f63 [Finder] [Iterator] Make the tests less fragile 2014-09-26 06:59:53 +02:00
Fabien Potencier
d7615e70d2 bug #12016 [Validator] Added ConstraintValidator::buildViolation() helper for BC with the 2.4 API (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Added ConstraintValidator::buildViolation() helper for BC with the 2.4 API

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

This PR adds a `buildViolation()` helper method to the base `ConstraintValidator` to remove the API checks (2.4 vs. 2.5) from the constraint validator implementations. Once the 2.4 API is removed, this helper method will be removed as well.

**Todos**

- [x] Backport changes from #12021

Commits
-------

6b0c24a [Validator] Added ConstraintValidator::buildViolation() helper for BC with 2.4 API
2014-09-25 16:01:10 +02:00
Fabien Potencier
07b234e1c7 bug #12031 [Validator] Fixed LegacyValidator when only a constraint is validated (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Fixed LegacyValidator when only a constraint is validated

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

The 2.5-BC API is currently broken for the following use case:

```php
$validator->validate($value, $constraint);
```

This is fixed now.

Commits
-------

1d48206 [Validator] Fixed LegacyValidator when only a constraint is validated
2014-09-25 15:54:04 +02:00
Bernhard Schussek
1653ca5e59 bug #9453 [Form][DateTime] Propagate invalid_message & invalid_message_parameters to date & time (egeloen)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #9453).

Discussion
----------

[Form][DateTime] Propagate invalid_message & invalid_message_parameters to date & time

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

This PR propagates the `invalid_message` & `invalid_message_parameters` in the datetime form type to the date & time sub form types. It allows to have the good error message if you use something else than the `single_widget` widget.

I have looked the `DateTimeTypeTest` but I have not found tests related to this kind of propagation, so for now I have not added tests yet.

Commits
-------

ea4ae74 [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets
2014-09-25 15:00:50 +02:00
Eric GELOEN
ea4ae74011 [Form][DateTime] Propagate invalid_message & invalid_message parameters to date & time sub widgets 2014-09-25 15:00:50 +02:00
Bernhard Schussek
6b0c24adf7 [Validator] Added ConstraintValidator::buildViolation() helper for BC with 2.4 API 2014-09-25 12:25:17 +02:00
Fabien Potencier
da4e85e1c6 bug #12030 Fix expression language in the container when using the "container" variable (fabpot)
This PR was squashed before being merged into the 2.4 branch (closes #12030).

Discussion
----------

Fix expression language in the container when using the "container" variable

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

See #11995 for the description of the problem.

Commits
-------

2b2f0df Fix expression language in the container when using the "container" variable
2014-09-25 11:55:41 +02:00
Fabien Potencier
2b2f0df27e Fix expression language in the container when using the "container" variable 2014-09-25 11:55:38 +02:00
Fabien Potencier
f94ba9ab43 bug #12032 [Command] Set the process title as late as possible (lyrixx)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #12032).

Discussion
----------

[Command] Set the process title as late as possible

| Q             | A
| ------------- | ---
| Bug fix?      | yes (so it could be merged into 2.5)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

To be able to customize to process title in the `initialize` method of the
current command with some arguments or options

Commits
-------

44997d3 [Command] Set the process title as late as possible
2014-09-25 11:53:57 +02:00