Commit Graph

17827 Commits

Author SHA1 Message Date
Nicolas Grekas c7f7a9a569 minor #16946 Clean useless deprecation silencing (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Clean useless deprecation silencing

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

We added these when we triggered unsilenced notices. But we silence them now.

Commits
-------

9953550 Clean useless deprecation silencing
2015-12-11 08:22:19 +01:00
Nicolas Grekas 423f83f75e bug #16915 [Process] Enhance compatiblity with --enable-sigchild (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Enhance compatiblity with --enable-sigchild

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

This is complete rewrite of the fallback `--enable-sigchild` handling in the Process class.
It removes most of the differences between this and a non-sigchild-enabled php.
Which means the test suite doesn't need anymore to be replayed 3 times (which is how I started this PR, looking for a way to test this component in less time).

I validated this with a locally compiled php, sigchild-enabled. Green.
Changes affect only this special-mode php.

Ping @romainneutron and @Seldaek (original writer of the sigchild support)

Submitted on 2.3 as bugfix, which it is to me.

Commits
-------

e7cc4aa [Process] Enhance compatiblity with --enable-sigchild
2015-12-10 17:39:45 +01:00
Nicolas Grekas e7cc4aa715 [Process] Enhance compatiblity with --enable-sigchild 2015-12-10 16:01:44 +01:00
Nicolas Grekas 99535506e8 Clean useless deprecation silencing 2015-12-10 15:12:08 +01:00
Tobias Schultze 4cde2d1e33 bug #16829 [FrameworkBundle] prevent cache:clear creating too long paths (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] prevent cache:clear creating too long paths

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

Commits
-------

6e279c5 [FrameworkBundle] prevent cache:clear creating too long paths
2015-12-10 01:42:36 +01:00
Fabien Potencier d6dd9a48dd minor #16894 Backport: [Validator] Updated Luxembourgish translations for 2.8 (mweimerskirch)
This PR was merged into the 2.3 branch.

Discussion
----------

Backport: [Validator] Updated Luxembourgish translations for 2.8

| Q             | A
| ------------- | ---
| Fixed tickets | https://github.com/symfony/symfony/pull/16847#discussion-diff-46756549
| License       | MIT

Commits
-------

f9a811b [Validator] Updated Luxembourgish translations for 2.8
2015-12-08 19:06:43 +01:00
Nicolas Grekas ed226961ab minor #16875 [Process] Always call proc_close (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Always call proc_close

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

This should fix one more transient test, and a wrong behavior.

Commits
-------

ccb67d7 [Process] Always call proc_close
2015-12-08 18:10:57 +01:00
Nicolas Grekas ccb67d7bd2 [Process] Always call proc_close 2015-12-08 18:02:07 +01:00
Michel Weimerskirch f9a811b4de [Validator] Updated Luxembourgish translations for 2.8
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
Conflicts:
	src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf
2015-12-08 00:21:08 +01:00
Fabien Potencier e5dda019ae bug #16870 [FrameworkBundle] Disable the server:run command when Process component is missing (gnugat, xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Disable the server:run command when Process component is missing

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

This also backports the improvement for the `suggest` section from #16650 to the `2.3` branch.

Commits
-------

99d1741 disable server:run cmd without Process component
604174c Suggested Process dependency
2015-12-07 22:51:02 +01:00
Christian Flothmann 99d174176a disable server:run cmd without Process component 2015-12-06 23:31:12 +01:00
Loïc Faugeron 604174c963 Suggested Process dependency
The `server:run` command requires the Process component.
2015-12-06 23:31:09 +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 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
Alexander M. Turek 78c0a6e3a4 Added a test case for the Logger class. 2015-12-05 11:47:18 +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 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
Tobias Schultze 6e279c5f8a [FrameworkBundle] prevent cache:clear creating too long paths 2015-12-05 03:07:20 +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
Jeremy Benoist 230acb2841 Fix typo 2015-12-03 06:49:53 +01:00
Christophe Coevoet fb791fdbcb bug #16772 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error (weaverryan)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16772).

Discussion
----------

Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error

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

This fixes a "Database not Found" error when using `doctrine/orm` 2.5 while warming up your cache under certain situations. Basically, if you use the `EntityUserProvider`, then during cache warmup, Twig requires the `security.authorization_checker` which eventually requires this `EntityUserProvider`, which previously caused Doctrine to calculate the metadata for your User class. If no database exists (and you haven't specified the platform), you'll get the error.

More broadly, this simply tries to do less work in the constructor. It's a "bug fix", only kind of, but as it's completely an internal refactoring, it should be quite safe.

Thanks!

Commits
-------

44a2861 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error
2015-12-02 16:35:50 +01:00
Ryan Weaver 44a28612da Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error 2015-12-02 16:35:49 +01:00
Dariusz Ruminski d3f671e8f6 CS: general fixes 2015-12-01 23:08:33 +01:00
Dariusz Ruminski 45d250d25f CS: remove unneeded parentheses around control statements 2015-12-01 12:58:24 +01:00
Fabien Potencier d9b8d0c1e9 bug #16753 [Process] Fix signaling/stopping logic on Windows (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fix signaling/stopping logic on Windows

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

Commits
-------

9afbea2 [Process] Fix signaling/stopping logic on Windows
2015-11-30 13:29:40 +01:00
Nicolas Grekas 9afbea27e9 [Process] Fix signaling/stopping logic on Windows 2015-11-30 11:29:50 +01:00
Fabien Potencier 52209dbcdc minor #16737 [Yaml] minor CS cleaning (mhujer)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #16737).

Discussion
----------

[Yaml] minor CS cleaning

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

PHPStorm reported different types of coding style suggestions along the Symfony codebase. I've fixed some of them in the Yaml compontent and I have two questions:
1) What is the correct branch for such changes? Not all of them can be fixed in 2.3/2.8, for example `ParserTest`'s docblock is different there.
2) Should I create similar PRs for other components or is there a plan to do all such fixes at once someday in the future (e.g. after 2.8/3.0 is released)?

Commits
-------

613804d [Yaml] minor CS cleaning
2015-11-29 11:53:55 +01:00
Martin Hujer 613804d0cf [Yaml] minor CS cleaning 2015-11-29 11:53:50 +01:00
Fabien Potencier 0239d4ae7e bug #16733 [Console] do not encode backslashes in console default description (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] do not encode backslashes in console default description

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

Commits
-------

873a541 [Console] do not encode backslashes in console default description
2015-11-29 11:50:28 +01:00
Tobias Schultze 873a5417a8 [Console] do not encode backslashes in console default description 2015-11-28 23:15:59 +01:00
Fabien Potencier b2899a6c2e bug #16312 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released (mpdude)
This PR was squashed before being merged into the 2.3 branch (closes #16312).

Discussion
----------

[HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released

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

I've been trying to debug #15813 and modified the Store in a way to keep unique request IDs in the .lck file. That way, I was hoping to find out which request is blocking and/or if the request is actually still running.

It turned out that `is_file()` would claim that a lock file still exists, but a subsequent attempt to read the information from that file returned "file not found" errors.

So, my assumption is that the `is_file()` result is based on the fstat cache and wrong once a process has seen the lock file.

@jakzal said in https://github.com/symfony/symfony/issues/15813#issuecomment-149013691 that `unlink()`ing the lock file should clear the statcache, but I doubt this is true across PHP processes.

Commits
-------

982710f [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released
2015-11-28 11:48:57 +01:00
Matthias Pigulla 982710ff18 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released 2015-11-28 11:48:55 +01:00
Nicolas Grekas 59b782a200 [ci] Force update of ./phpunit deps 2015-11-28 10:05:13 +01:00
Nicolas Grekas 4e73e1a436 minor #16702 [Process] Don't catch RuntimeException when it complicates tests debugging (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Don't catch RuntimeException when it complicates tests debugging

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

See https://github.com/symfony/symfony/pull/16702/files?w=1

Commits
-------

8588a4f [Process] Don't catch RuntimeException when it complicates tests debugging
2015-11-27 12:58:28 +01:00
Nicolas Grekas 8588a4f63b [Process] Don't catch RuntimeException when it complicates tests debugging 2015-11-27 09:37:23 +01:00
Nicolas Grekas f8a7ddb9f8 minor #16684 [appveyor] Workaround transient segfault when APCu is enabled (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[appveyor] Workaround transient segfault when APCu is enabled

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

See e.g. https://ci.appveyor.com/project/nicolas-grekas/symfony/build/1.0.4#L1186

Commits
-------

12a152b [appveyor] Workaround transient segfault when APCu is enabled
2015-11-27 09:29:25 +01:00
Fabien Potencier 12e63398fe minor #16700 Fixed the wrong source name and the ja translation (hainey)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16700).

Discussion
----------

Fixed the wrong source name and the ja translation

Commits
-------

90f3b94 Fixed the wrong source name and the ja translation
2015-11-27 06:41:09 +01:00
hainey 90f3b941d3 Fixed the wrong source name and the ja translation 2015-11-27 06:41:08 +01:00
Fabien Potencier 82b6ec192b bug #16695 [SecurityBundle] disable the init:acl command if ACL is not used (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[SecurityBundle] disable the init:acl command if ACL is not used

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

Related to #16694 but this should go in 2.3 IMO because it was just forgotten. The other acl command already has this logic: https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php#L36

It ensures the command list is not flooded with unusable commands.

Commits
-------

55f84a3 [SecurityBundle] disable the init:acl command if ACL is not used
2015-11-26 21:09:40 +01:00
Tobias Schultze 55f84a3369 [SecurityBundle] disable the init:acl command if ACL is not used 2015-11-26 20:19:29 +01:00
Fabien Potencier fd140fc045 minor #16691 [DI] remove useless condition around unset (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[DI] remove useless condition around unset

| 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
-------

478375d [DI] remove useless condition around unset
2015-11-26 19:04:30 +01:00
Tobias Schultze 478375d664 [DI] remove useless condition around unset 2015-11-26 18:53:25 +01:00
Nicolas Grekas 12a152b666 [appveyor] Workaround transient segfault when APCu is enabled 2015-11-26 16:12:01 +01:00
Nicolas Grekas 5f93188dc0 bug #16676 [HttpFoundation] Workaround HHVM rewriting HTTP response line (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Workaround HHVM rewriting HTTP response line

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

Commits
-------

5013f98 [HttpFoundation] Workaround HHVM rewriting HTTP response line
2015-11-26 10:19:28 +01:00
Nicolas Grekas 5013f9895f [HttpFoundation] Workaround HHVM rewriting HTTP response line 2015-11-26 07:58:58 +01:00