Commit Graph

29141 Commits

Author SHA1 Message Date
Fabien Potencier
5921530a1a fixed a CS 2017-01-17 21:51:21 -08:00
Fabien Potencier
cf7d2f2c57 feature #20390 [Ldap] added Ldap entry rename for ExtLdap adapter (fruitwasp)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Ldap] added Ldap entry rename for ExtLdap adapter

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

Commits
-------

2d8eeb200f [LDAP] implemented LDAP entry rename for ExtLdap adapter
2017-01-17 21:50:56 -08:00
Fabien Potencier
e823e85a7c feature #21065 Added cache data collector and profiler page (Nyholm)
This PR was squashed before being merged into the 3.3-dev branch (closes #21065).

Discussion
----------

Added cache data collector and profiler page

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

Adding a first version of cache profiler page. Most things are taken from PHP-cache.
FYI: @aequasi

### What is included?

A collector, recording adapter and a profiler page.

![screen shot 2016-12-27 at 16 07 35](https://cloud.githubusercontent.com/assets/1275206/21502325/4bee2ed4-cc4f-11e6-89fc-37ed16aca864.png)
![screen shot 2016-12-27 at 16 07 45](https://cloud.githubusercontent.com/assets/1275206/21502326/4bee9450-cc4f-11e6-904d-527b7b0ce85b.png)

### What is not included?

* A good logo
* Nice design on the profiler page

This PR aims to pass as the minimum requirement for a cache page. Im happy to do fancy extra features but those should be a different PR.

Commits
-------

7497f1c6b6 Added cache data collector and profiler page
2017-01-17 21:46:26 -08:00
Tobias Nyholm
7497f1c6b6 Added cache data collector and profiler page 2017-01-17 21:46:25 -08:00
Fabien Potencier
71f8f1546f bug #21312 [DI] Do not set values of lazy arguments after inlining them (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Do not set values of lazy arguments after inlining them

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

Commits
-------

04da7c30d9 [DI] Do not inline values of lazy arguments
2017-01-17 21:25:27 -08:00
Robin Chalas
04da7c30d9
[DI] Do not inline values of lazy arguments 2017-01-17 22:10:00 +01:00
Fabien Potencier
f8b02ed038 feature #21306 [DependencyInjection] Always autowire the constructor (dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] Always autowire the constructor

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (because method autowiring has been introduced in 3.3)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Always try to autowire the constructor even if it has not been configured explicitly. It doesn't make sense to autowire some methods but not the constructor. It will also allow to write shorter definitions when using method autowiring:

```yaml
services:
    Foo\Bar: { autowire: ['set*'] }
```

instead of

```yaml
services:
    Foo\Bar: { autowire: ['__construct', 'set*'] }
```

Commits
-------

be3d11faa9 [DependencyInjection] Always autowire the constructor
2017-01-16 08:56:00 -08:00
Kévin Dunglas
be3d11faa9
[DependencyInjection] Always autowire the constructor 2017-01-16 16:26:58 +01:00
Fabien Potencier
839920828e feature #20493 [Debug] Trigger deprecation on @final annotation in DebugClassLoader - prepare making some classes final (GuilhemN)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Debug] Trigger deprecation on `@final` annotation in DebugClassLoader - prepare making some classes final

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | follows https://github.com/symfony/symfony/pull/19734
| License       | MIT
| Doc PR        |  |

BC promises become quickly huge but making classes `final` can limit these promises.
At the same time, many classes of the symfony codebase are not meant to be extended and could be  `final`; that's the goal of this PR: prepare making them final in 4.0 by triggering deprecations in their constructor:
```php
public function __construct()
{
    if (__CLASS__ !== get_class($this)) {
        @trigger_error(sprintf('Extending %s is deprecated since 3.3 and won\'t be supported in 4.0 as it will be final.', __CLASS__), E_USER_DEPRECATED);
    }
}
```

I updated two classes for now but we can do much more if you like it.

Commits
-------

c2ff111986 [Debug] Trigger deprecation on `@final` annotation in DebugClassLoader
2017-01-15 08:47:36 -08:00
Fabien Potencier
f7679f74ae feature #21244 [DI] Remove synthetic services from methodMap + generated methods (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Remove synthetic services from methodMap + generated methods

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

For synthetic services, the generated methods are just dead code to fill opcache ;)
And having them in "methodMap" prevents using the property for checking if a service comes from a (non-synthetic) definition or not.
This prepares some changes that we'd like to do in 4.0, see #19668.

Commits
-------

c1e1e999f3 [DI] Remove synthetic services from methodMap + generated methods
2017-01-15 08:42:11 -08:00
Fabien Potencier
1e10227ac1 feature #21238 [VarDumper] Add search keyboard shortcuts (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[VarDumper] Add search keyboard shortcuts

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21174
| License       | MIT
| Doc PR        | Worth to mention?

So, this PR simply adds the following shortcuts to navigate between matches, based on main browsers conventions:

- <kbd>CTRL/CMD</kbd> + (<kbd>shift</kbd>* +) <kbd>G</kbd>
- (<kbd>shift</kbd>* +) <kbd>ENTER</kbd>
- (<kbd>shift</kbd>* +) <kbd>F3</kbd>

_* <kbd>shift</kbd> allows to go backwards_

At first, I wanted to add a help box somewhere, but:
- I don't know where to place it. As the var dumper is now used everywhere in the profiler, it should not be importune and should work in narrowed places.
- We use those shortcuts in order to replicate the main softwares/browsers behavior. So we may not need it at all.

This PR also fixes a minor issue where pressing a key not changing the input would have restarted the search query.

Commits
-------

58fe4315ae [VarDumper] Add search keyboard shortcuts
2017-01-15 08:39:59 -08:00
Fabien Potencier
da1b082044 feature #21290 [FrameworkBundle] Fix debug:container --show-arguments missing cases (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix debug:container --show-arguments missing cases

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20861#issuecomment-272628063
| License       | MIT
| Doc PR        | n/a

Fixes the new `--show-arguments` option for per-service describing
(i.e. `debug:container foo_service --show-arguments`, doesn't work at all right now).

Commits
-------

57b17f4844 [FrameworkBundle] Fix debug:container --show-arguments missing cases
2017-01-15 08:13:53 -08:00
Guilhem N
c2ff111986
[Debug] Trigger deprecation on @final annotation in DebugClassLoader 2017-01-15 17:05:29 +01:00
Fabien Potencier
ce7a3c47c1 feature #21263 [DI] Mark generated containers as final (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Mark generated containers as final

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

So that we don't have to care anymore about BC for protected methods in generated containers.
Will leverage deprecations triggered in #20493

Commits
-------

ce0ee1e484 [DI] Mark generated containers as final
2017-01-15 07:59:50 -08:00
Nicolas Grekas
5200055452 minor #21298 [WebServerBundle] add missing use (mykiwi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[WebServerBundle] add missing use

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

```
$ bin/console server:run 0.0.0.0:80 -vvv

 [OK] Server listening on http://0.0.0.0:80

 // Quit the server with CONTROL-C.

[2017-01-15 14:41:59] php.DEBUG: Warning: proc_open(/dev/tty): failed to open stream: No such device or address {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\SilencedErrorContext: {\"severity\":2,\"file\":\"/srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php\",\"line\":1000})"}

  [Symfony\Component\Debug\Exception\ClassNotFoundException]
  Attempted to load class "Process" from namespace "Symfony\Bundle\WebServerB
  undle\Command".
  Did you forget a "use" statement for "Symfony\Component\Process\Process"?

Exception trace:
 () at /srv/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php:121
 Symfony\Bundle\WebServerBundle\Command\ServerRunCommand->Symfony\Bundle\WebServerBundle\Command\{closure}() at n/a:n/a
 call_user_func() at /srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:1345
 Symfony\Component\Process\Process->Symfony\Component\Process\{closure}() at /srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:1450
 Symfony\Component\Process\Process->readPipes() at /srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:388
 Symfony\Component\Process\Process->wait() at /srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:210
 Symfony\Component\Process\Process->run() at /srv/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServer.php:47
 Symfony\Bundle\WebServerBundle\WebServer->run() at /srv/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php:135
 Symfony\Bundle\WebServerBundle\Command\ServerRunCommand->execute() at /srv/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:262
 Symfony\Component\Console\Command\Command->run() at /srv/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:860
 Symfony\Component\Console\Application->doRunCommand() at /srv/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:190
 Symfony\Component\Console\Application->doRun() at /srv/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:80
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /srv/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121
 Symfony\Component\Console\Application->run() at /srv/bin/console:27

server:run [-d|--docroot DOCROOT] [-r|--router ROUTER] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<addressport>]

```
<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

2ae5834 add missing use
2017-01-15 16:11:53 +01:00
Nicolas Grekas
c1e1e999f3 [DI] Remove synthetic services from methodMap + generated methods 2017-01-15 16:01:29 +01:00
Romain Gautier
2ae5834944 add missing use 2017-01-15 15:28:19 +01:00
Nicolas Grekas
372f4096c4 minor #21294 [VarDumper] Fixed typo in new search input (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[VarDumper] Fixed typo in new search input

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I guess both work out.. but using `of` notation is way more common.

Btw chrome search doesnt show `0 of 0` (at least not initially).. maybe worth it?

/cc @ogizanagi

Commits
-------

f8d63a6 [VarDumper] Fixed typo in new search input
2017-01-15 14:07:02 +01:00
Nicolas Grekas
2324b935bc minor #21295 [DependencyInjection] add missing expectedDeprecation on testLegacyGet (Simperfit)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] add missing expectedDeprecation on testLegacyGet

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

Missing expectedDeprecation on testLegacyGet

Commits
-------

bd3f770 [DependencyInjection] add missing expectedDeprecation on testLegacyGet
2017-01-15 14:04:43 +01:00
Amrouche Hamza
bd3f770510
[DependencyInjection] add missing expectedDeprecation on testLegacyGet 2017-01-15 11:39:17 +01:00
Roland Franssen
f8d63a6345 [VarDumper] Fixed typo in new search input 2017-01-15 10:34:13 +01:00
Nicolas Grekas
42c3d4fe02 minor #21268 [Cache] Relax binary-constraint on Memcached connections (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Cache] Relax binary-constraint on Memcached connections

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

If it's green then it's PSR-6 compliant.

Commits
-------

284d363 [Cache] Relax binary-constraint on Memcached connections
2017-01-14 18:10:21 +01:00
Robin Chalas
57b17f4844
[FrameworkBundle] Fix debug:container --show-arguments missing cases 2017-01-14 15:39:08 +01:00
Kevin
2d8eeb200f [LDAP] implemented LDAP entry rename for ExtLdap adapter 2017-01-13 14:07:40 +01:00
Nicolas Grekas
cc398dbf7a Merge branch '3.2'
* 3.2:
  [Cache] Using strpbrk() instead of strcspn() is faster
  bumped Symfony version to 3.2.3
  updated VERSION for 3.2.2
  updated CHANGELOG for 3.2.2
  bumped Symfony version to 3.1.10
  updated VERSION for 3.1.9
  updated CHANGELOG for 3.1.9
2017-01-13 11:13:02 +01:00
Nicolas Grekas
e7fcd28d78 Merge branch '3.1' into 3.2
* 3.1:
  [Cache] Using strpbrk() instead of strcspn() is faster
  bumped Symfony version to 3.1.10
  updated VERSION for 3.1.9
  updated CHANGELOG for 3.1.9
2017-01-13 11:11:31 +01:00
Nicolas Grekas
cbb5332b56 bug #21269 [Cache] Using strpbrk() instead of strcspn() is faster (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Using strpbrk() instead of strcspn() is faster

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

Keys validation using strpbrk is faster.
Eg on some micro bench:
- `isset($a[strcspn($a, '{}()/\@:')])`: 278ms
- `false !== strpbrk($a, '{}()/\@:')`: 183ms

Commits
-------

d68c451 [Cache] Using strpbrk() instead of strcspn() is faster
2017-01-13 11:08:47 +01:00
Nicolas Grekas
d68c451711 [Cache] Using strpbrk() instead of strcspn() is faster 2017-01-13 10:53:08 +01:00
Nicolas Grekas
fda8832c4e minor #21255 [Profiler] Fix inline dump rendering (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Profiler] Fix inline dump rendering

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

I introduced a minor rendering issue in #21109 when adding a clearfix behavior to the `pre.sf-dump` element:

|Before|After|
|-------|-----|
|
<img width="890" alt="screenshot 2017-01-12 a 19 57 34" src="https://cloud.githubusercontent.com/assets/2211145/21903782/6989eb36-d901-11e6-8f02-99c4a8356725.PNG">|<img width="892" alt="screenshot 2017-01-12 a 19 52 56" src="https://cloud.githubusercontent.com/assets/2211145/21903721/407d3bbc-d901-11e6-901b-3f5b65bee650.PNG">|

This will fix the issue by removing it, as we don't need this behavior for inline dumps.

Commits
-------

81e2641 [Profiler] Fix inline dump rendering
2017-01-13 09:45:33 +01:00
Nicolas Grekas
284d363fb1 [Cache] Relax binary-constraint on Memcached connections 2017-01-13 08:45:08 +01:00
Nicolas Grekas
ce0ee1e484 [DI] Mark generated containers as final 2017-01-13 08:23:38 +01:00
Fabien Potencier
364ad971c2 bumped Symfony version to 3.2.3 2017-01-12 13:51:00 -08:00
Fabien Potencier
358c59fd21 Merge pull request #21261 from fabpot/release-3.2.2
released v3.2.2
2017-01-12 13:36:55 -08:00
Fabien Potencier
2c795ba970 updated VERSION for 3.2.2 2017-01-12 13:36:33 -08:00
Fabien Potencier
a95d15b05a updated CHANGELOG for 3.2.2 2017-01-12 13:36:24 -08:00
Fabien Potencier
d63160957d bumped Symfony version to 3.1.10 2017-01-12 13:34:53 -08:00
Fabien Potencier
8d80e330ac Merge pull request #21260 from fabpot/release-3.1.9
released v3.1.9
2017-01-12 12:44:00 -08:00
Fabien Potencier
bb172ebfc5 updated VERSION for 3.1.9 2017-01-12 12:43:39 -08:00
Fabien Potencier
7e12e0ad30 updated CHANGELOG for 3.1.9 2017-01-12 12:43:31 -08:00
Nicolas Grekas
136a5ffc55 Merge branch '3.2'
* 3.2:
  Fix test
2017-01-12 21:17:32 +01:00
Nicolas Grekas
3d0a69e50f Fix test 2017-01-12 21:17:20 +01:00
Nicolas Grekas
c527f10b08 Merge branch '3.2'
* 3.2:
  [Profiler][Form] Fix form profiler errors profiler_dump
2017-01-12 20:46:56 +01:00
Nicolas Grekas
6ba798151e bug #21257 [Profiler][Form] Fix form profiler errors profiler_dump (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[Profiler][Form] Fix form profiler errors profiler_dump

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

|Before|After|
|-|-|
|
<img width="807" alt="screenshot 2017-01-12 a 20 12 59" src="https://cloud.githubusercontent.com/assets/2211145/21904499/323d1a38-d904-11e6-85ef-0957ef226278.PNG">|<img width="806" alt="screenshot 2017-01-12 a 20 13 38" src="https://cloud.githubusercontent.com/assets/2211145/21904500/32429710-d904-11e6-9bed-0d8e37262cd5.PNG">|

Commits
-------

207fab6 [Profiler][Form] Fix form profiler errors profiler_dump
2017-01-12 20:46:27 +01:00
Nicolas Grekas
641bb1a890 Merge branch '3.2'
* 3.2:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:30:26 +01:00
Nicolas Grekas
ec858cea91 Merge branch '3.1' into 3.2
* 3.1:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:27:47 +01:00
Nicolas Grekas
473fd3b026 Merge branch '2.8' into 3.1
* 2.8:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:26:57 +01:00
Nicolas Grekas
658a8a076c Merge branch '2.7' into 2.8
* 2.7:
  Fix getMock usage
2017-01-12 20:24:25 +01:00
Nicolas Grekas
52eeddc24e Fix getMock usage 2017-01-12 20:23:39 +01:00
Nicolas Grekas
9746314ecb Merge branch '2.7' into 2.8
* 2.7:
  Remove dead code
2017-01-12 20:21:19 +01:00
Nicolas Grekas
49fb0c033c Remove dead code 2017-01-12 20:18:32 +01:00