Commit Graph

23954 Commits

Author SHA1 Message Date
Nicolas Grekas
99884c712d Merge branch '2.8' into 3.0
* 2.8:
  Fix DeprecationErrorHandler on PHP 5.3
2015-12-06 16:21:13 +01:00
Nicolas Grekas
a4aafca33d Fix DeprecationErrorHandler on PHP 5.3 2015-12-06 16:19:18 +01:00
Christophe Coevoet
05aff6a19c Merge branch '2.8' into 3.0
* 2.8:
  Fix the exception message expectation
2015-12-05 19:14:16 +01:00
Christophe Coevoet
27ba4b29f0 Merge branch '2.7' into 2.8
* 2.7:
  Fix the exception message expectation
2015-12-05 19:11:45 +01:00
Christophe Coevoet
0cef1ef54c Fix the exception message expectation
The message was changed between 2.3 and 2.7.
2015-12-05 19:10:05 +01:00
Christophe Coevoet
d553264958 Merge branch '2.8' into 3.0
* 2.8:
  [Process] Fix stopping a process on Windows
  [PhpUnitBridge] Add weak-verbose mode and match against message instead of test name
  Added a note about the new requirement iconv.
  Improved error messages for Yaml Deprecations
  Added a test case for the Logger class.
  [Form] Fix choices defined as Traversable
  CS: general fixes
  Suggested Process dependency
2015-12-05 18:45:07 +01:00
Christophe Coevoet
dbb0ba8f11 Merge branch '2.7' into 2.8
* 2.7:
  [Process] Fix stopping a process on Windows
  Added a test case for the Logger class.
  CS: general fixes
2015-12-05 18:37:59 +01:00
Christophe Coevoet
237b13c56c Merge branch '2.3' into 2.7
* 2.3:
  [Process] Fix stopping a process on Windows
  Added a test case for the Logger class.
  CS: general fixes
2015-12-05 18:37:09 +01:00
Christophe Coevoet
b6e13f8861 minor #16650 Suggested Process dependency (gnugat)
This PR was merged into the 2.8 branch.

Discussion
----------

Suggested Process dependency

The `server:run` command requires the Process component.

Commits
-------

7c1231a Suggested Process dependency
2015-12-05 16:18:14 +01:00
Christophe Coevoet
800232c3d6 minor #16813 [Process] Fix stopping a process on Windows (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fix stopping a process on Windows

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

Commits
-------

80fb51c [Process] Fix stopping a process on Windows
2015-12-05 16:09:16 +01:00
Christophe Coevoet
e49b766037 feature #16789 [PhpUnitBridge] Add weak-verbose mode and match against message instead of test name (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PhpUnitBridge] Add weak-verbose mode and match against message instead of test name

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

This is double a DX bug fix:
- the weak-verbose allows showing messages but exit with 0 (see #14475)
- matching against $class::$method was a mistake of mine: you can already `--filter` in phpunit to get by-test filtering but you can't select which message should be traced without this change. I stumbled upon this limitation while doing a Symfony 3 migration workshop...

Commits
-------

a670ff1 [PhpUnitBridge] Add weak-verbose mode and match against message instead of test name
2015-12-05 15:33:16 +01:00
Tobias Schultze
58e3b02ec2 minor #16856 [2.8] Added a note about the new requirement iconv (derrabus)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Added a note about the new requirement iconv

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

When upgrading from 2.7 to 2.8, we need to ensure that `ext-iconv` is present. This PR adds a note about this to the UPGRADE-2.8 file.

Commits
-------

af4f5c5 Added a note about the new requirement iconv.
2015-12-05 14:51:42 +01:00
Christophe Coevoet
1e532b3cbd minor #16748 [DX][YAML] Improved Deprecation Notices (peterrehm)
This PR was merged into the 2.8 branch.

Discussion
----------

[DX][YAML] Improved Deprecation Notices

Show the actual invalid string for the Yaml deprecations to ease the upgrade as you can grep the strings.

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

Related #16745

Commits
-------

3179407 Improved error messages for Yaml Deprecations
2015-12-05 14:47:06 +01:00
Christophe Coevoet
2d14689485 minor #16790 CS: general fixes (keradus)
This PR was merged into the 2.3 branch.

Discussion
----------

CS: general fixes

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

Commits
-------

d3f671e CS: general fixes
2015-12-05 13:33:53 +01:00
Christophe Coevoet
d3247d83c8 minor #16850 [MonologBridge] Added a test case for the Logger class (derrabus)
This PR was merged into the 2.3 branch.

Discussion
----------

[MonologBridge] Added a test case for the Logger class

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

So far, there is no test case that ensures that the `Symfony\Bridge\Monolog\Logger` can be instantiated. Because of this, bug #16837 was not discovered by the tests. This PR adds a simple test case that tests some basic functionality of that particular class.

Commits
-------

78c0a6e Added a test case for the Logger class.
2015-12-05 13:32:04 +01:00
Nicolas Grekas
80fb51c3af [Process] Fix stopping a process on Windows 2015-12-05 13:06:52 +01:00
Nicolas Grekas
a670ff1c9c [PhpUnitBridge] Add weak-verbose mode and match against message instead of test name 2015-12-05 13:02:37 +01:00
Alexander M. Turek
af4f5c5407 Added a note about the new requirement iconv. 2015-12-05 12:34:07 +01:00
Peter Rehm
3179407efd Improved error messages for Yaml Deprecations 2015-12-05 12:17:43 +01:00
Christophe Coevoet
a8a1352a4a bug #16796 [Form] Fix choices defined as Traversable (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fix choices defined as Traversable

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

Commits
-------

021d93a [Form] Fix choices defined as Traversable
2015-12-05 12:16:00 +01:00
Christophe Coevoet
e0eb6d467f Merge branch '2.8' into 3.0
* 2.8:
  Set the redraw frequency at least to 1. Setting it to 0 would otherwise produce an error.
  [Process] Unset callback after stop to free memory
  Improve error message for undefined DIC aliases
  [VarDumper] fixed .sf-dump z-index
  [Validator] Updated Luxembourgish translations for 2.8
  Disallow http-kernel 3.x, fixes #16837.
  [DependencyInjection] Validate class names and factory methods
  ampq → amqp
  Fix typo
  Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error
  [Form] Add context to FormFactory deprecations
  CS: remove unneeded parentheses around control statements
  [TwigBridge] Clean deps now that 2.8.0 is tagged
2015-12-05 12:13:14 +01:00
Christophe Coevoet
54c553cce7 Merge branch '2.7' into 2.8
* 2.7:
  Set the redraw frequency at least to 1. Setting it to 0 would otherwise produce an error.
  [Process] Unset callback after stop to free memory
  Improve error message for undefined DIC aliases
  [VarDumper] fixed .sf-dump z-index
  [DependencyInjection] Validate class names and factory methods
  ampq → amqp
  Fix typo
  CS: remove unneeded parentheses around control statements
  [TwigBridge] Clean deps now that 2.8.0 is tagged
2015-12-05 12:09:21 +01:00
Christophe Coevoet
0bbbb01fbe Merge branch '2.3' into 2.7
* 2.3:
  [Process] Unset callback after stop to free memory
  Improve error message for undefined DIC aliases
  Fix typo
  CS: remove unneeded parentheses around control statements
2015-12-05 12:06:38 +01:00
Christophe Coevoet
55493367a4 bug #16742 [Console][ProgressBar] redrawFrequency should never be 0 (dritter)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16742).

Discussion
----------

[Console][ProgressBar] redrawFrequency should never be 0

Set the redraw frequency at least to 1. Setting it to 0 would otherwise produce a "division by zero" error.

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

### why?
I had a piece of code that used a ProgressBar and set the redraw frequency to a calculated value. In some cases this calculated value was 0 (or just smaller than 1, internally a cast to `int` is made). In the `setProgress` the redraw frequency is used for a calculation of the period. There the error happens (and shows that redraw frequency should never be 0).

### Ticket
There is no ticket concerning this issue. I could do one, if you want.

### Tests
This gets tested implicitly in `ProgressBarTest::testNonDecoratedOutputWithoutMax`.

Commits
-------

a1c207c Set the redraw frequency at least to 1. Setting it to 0 would otherwise produce an error.
2015-12-05 12:03:11 +01:00
Dominik Ritter
a1c207c7d1 Set the redraw frequency at least to 1. Setting it to 0 would otherwise produce an error. 2015-12-05 12:03:00 +01:00
Christophe Coevoet
39ed3598ab minor #16752 [Form] document changes to form type interfaces (xabbuh)
This PR was submitted for the master branch but it was merged into the 3.0 branch instead (closes #16752).

Discussion
----------

[Form] document changes to form type interfaces

| Q             | A
| ------------- | ---
| Fixed tickets | #13407, #16024, #16724, #16749
| License       | MIT

Commits
-------

b297a0c [Form] document changes to form type interfaces
2015-12-05 11:54:29 +01:00
Christian Flothmann
b297a0c6d9 [Form] document changes to form type interfaces 2015-12-05 11:54:29 +01:00
Christophe Coevoet
42a9da9588 minor #16773 [TwigBridge] Clean deps now that 2.8.0 is tagged (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Clean deps now that 2.8.0 is tagged

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

Commits
-------

e6efe7e [TwigBridge] Clean deps now that 2.8.0 is tagged
2015-12-05 11:51:33 +01:00
Alexander M. Turek
78c0a6e3a4 Added a test case for the Logger class. 2015-12-05 11:47:18 +01:00
Christophe Coevoet
77b1ab29f6 minor #16774 [DomCrawler] add upgrade hint on interface changes (havvg)
This PR was merged into the 3.0 branch.

Discussion
----------

[DomCrawler] add upgrade hint on interface changes

Commits
-------

e80e5dc [DomCrawler] add upgrade hint on interface changes
2015-12-05 11:40:42 +01:00
Christophe Coevoet
397ce230c6 bug #16846 [MonologBridge] Monolog Bridge 2.8 is incompatible with HttpKernel 3.0 (derrabus)
This PR was merged into the 2.8 branch.

Discussion
----------

[MonologBridge] Monolog Bridge 2.8 is incompatible with HttpKernel 3.0

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

Greetings from the SymfonyCon hackday. I wanted to start my day with an easy PR. 😉

As pointed out by @anlutro in #16837, MonologBridge 2.8 uses a deprecated interface of HttpKernel that has been removed in 3.0. Because of this, MonologBridge 2.8 must not be marked as compatible with HttpKernel 3.0 in composer.json.

Commits
-------

cb8d2c3 Disallow http-kernel 3.x, fixes #16837.
2015-12-05 11:34:21 +01:00
Nicolas Grekas
021d93a322 [Form] Fix choices defined as Traversable 2015-12-05 11:29:52 +01:00
Christophe Coevoet
0310499f42 minor #16798 [Process] Unset callback after stop to free memory (Slamdunk)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #16798).

Discussion
----------

[Process] Unset callback after stop to free memory

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

As of yet, a `Process` instance can't free memory.
The built-in callback has a self-reference to the intance not cleared after instance destruction.
I've tried to change both `buildCallback` and https://github.com/symfony/process/blob/v2.7.6/Process.php#L1373 usage to avoid self-referencing, but it can't be done without breaking BC, and the memory issue is still there.

A simple test script (that obiously can't be embedded in unit-tests)
```php
for ($inc = 0; $inc < 10000; $inc++) {
    $process = new Symfony\Component\Process\Process('echo 1');
    $process->mustRun();
    $process->stop();
    unset($process);

    echo (memory_get_usage(true) / 1000000) . ' MB ' . $inc . PHP_EOL;
}
```
Before:
```
1.572864 MB 0
5.505024 MB 9999
```
After:
```
1.572864 MB 0
1.572864 MB 9999
```
Ok, in this simple scenario 4 MB of RAM is nothing, but in our business app full of IOC where `unset`-ting is hard, our RAM explodes.

After `stop()`, the callback is no longer necessary.

To be clear, the garbage collector in the previous example was already active.
Deactivating it manually, which somewhere is needed to avoid particluar segfaults, obiously leads to worse scenarios:

Before:
```
 gc_disable();
 1.572864 MB 0
29.360128 MB 9999
```
After:
```
 gc_disable();
 1.572864 MB 0
 1.572864 MB 9999
```

Commits
-------

ec93b9a [Process] Unset callback after stop to free memory
2015-12-05 11:16:21 +01:00
Filippo Tessarotto
ec93b9a7f7 [Process] Unset callback after stop to free memory 2015-12-05 11:16:20 +01:00
Christophe Coevoet
32d5c7877f bug #16816 [Config] Throw an exception when using cannotBeEmpty() with numeric or boolean nodes (Ener-Getick)
This PR was merged into the 3.0 branch.

Discussion
----------

[Config] Throw an exception when using cannotBeEmpty() with numeric or boolean nodes

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

Commits
-------

bc20af2 [Config] Throw an exception when using cannotBeEmpty() on numeric or boolean nodes
2015-12-05 11:11:49 +01:00
Christophe Coevoet
fbc353dcda bug #16799 Improve error message for undefined DIC aliases (mpdude)
This PR was squashed before being merged into the 2.3 branch (closes #16799).

Discussion
----------

Improve error message for undefined DIC aliases

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

Additionally, I think the arguments need to be the other way round (`templating` is an alias pointing to `templating.engine.twig`).

Commits
-------

9195cd3 Improve error message for undefined DIC aliases
2015-12-05 11:09:09 +01:00
Matthias Pigulla
9195cd3e44 Improve error message for undefined DIC aliases 2015-12-05 11:09:07 +01:00
Christophe Coevoet
26d9a6f822 minor #16810 [DependencyInjection] Validate class names and factory methods (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] Validate class names and factory methods

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

Because, you know, people do mistakes... I saw this happening during a workshop: when e.g. the factory tag has no `method` attribute, we generate an container that embeds a parse error.

Commits
-------

b2e3850 [DependencyInjection] Validate class names and factory methods
2015-12-05 11:07:33 +01:00
Christophe Coevoet
944bddf888 bug #16825 [VarDumper] fix .sf-dump z-index (debug bar conflict) (Antoine LA)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #16825).

Discussion
----------

[VarDumper] fix .sf-dump z-index (debug bar conflict)

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

Just changed the z-index because the twig dump is actually displaying over the debug bar (#16824).

Commits
-------

a72efb9 [VarDumper] fixed .sf-dump z-index
2015-12-05 11:02:55 +01:00
Antoine LA
a72efb91c5 [VarDumper] fixed .sf-dump z-index 2015-12-05 11:02:55 +01:00
Christophe Coevoet
2b8c9f8269 minor #16847 [Validator] Updated Luxembourgish translations for 2.8 (mweimerskirch)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Updated Luxembourgish translations for 2.8

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

Commits
-------

7874935 [Validator] Updated Luxembourgish translations for 2.8
2015-12-05 10:41:19 +01:00
Michel Weimerskirch
7874935a58 [Validator] Updated Luxembourgish translations for 2.8
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
2015-12-05 10:34:52 +01:00
Alexander M. Turek
cb8d2c3691 Disallow http-kernel 3.x, fixes #16837. 2015-12-05 10:16:31 +01:00
Ener-Getick
bc20af2c05 [Config] Throw an exception when using cannotBeEmpty() on numeric or boolean nodes 2015-12-03 20:32:18 +01:00
Nicolas Grekas
b2e3850d85 [DependencyInjection] Validate class names and factory methods 2015-12-03 12:23:33 +01:00
Tobias Schultze
093ea3b07c minor #16821 [VarDumper] ampq → amqp (dereckson)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #16821).

Discussion
----------

[VarDumper] ampq → amqp

| Q             | A
| ------------- | ---
| Fixed tickets | #16821
| License       | MIT

Fixed typo in code comment.

Commits
-------

717caaa ampq → amqp
2015-12-03 11:46:34 +01:00
Sébastien Santoro
717caaa1a9 ampq → amqp
Fixed typo in code comment.
2015-12-03 11:46:32 +01:00
Tobias Schultze
dd7830314a minor #16803 [Form] Add context to FormFactory deprecations (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Add context to FormFactory deprecations

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

Commits
-------

e2010d2 [Form] Add context to FormFactory deprecations
2015-12-03 10:22:26 +01:00
Tobias Schultze
8ab107c905 minor #16780 CS: remove unneeded parentheses around control statements (keradus)
This PR was merged into the 2.3 branch.

Discussion
----------

CS: remove unneeded parentheses around control statements

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

Commits
-------

45d250d CS: remove unneeded parentheses around control statements
2015-12-03 10:03:30 +01:00
Tobias Schultze
30f9175f6c minor #16820 Fix typo (j0k3r)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix typo

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

Commits
-------

230acb2 Fix typo
2015-12-03 09:47:44 +01:00