Commit Graph

29039 Commits

Author SHA1 Message Date
Nicolas Grekas
d7928eac87 minor #21171 Added missing headers in fixture files (iltar)
This PR was merged into the 3.1 branch.

Discussion
----------

Added missing headers in fixture files

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

The headers were missing in a few files as mentioned in https://github.com/symfony/symfony/pull/21164#discussion_r94669787

Commits
-------

c9c2474 Added missing headers in fixture files
2017-01-06 10:30:29 +01:00
Nicolas Grekas
ecdf857b61 [DI][EventDispatcher] Add & wire closure-proxy argument type 2017-01-06 08:57:26 +01:00
Iltar van der Berg
c9c2474a2c Added missing headers in fixture files 2017-01-06 08:41:29 +01:00
Fabien Potencier
924469c47e feature #21109 [Profiler][VarDumper] Add a search feature to the HtmlDumper (ogizanagi)
This PR was squashed before being merged into the 3.3-dev branch (closes #21109).

Discussion
----------

[Profiler][VarDumper] Add a search feature to the HtmlDumper

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

I finally took some time to continue this. Here is the result so far:

| Raw        | Profiler           | Profiler Bar |
|:-------------:|:-------------:|:-----:|
| ![sfdump](https://cloud.githubusercontent.com/assets/2211145/21567183/4edfcd98-ceaa-11e6-9c51-873663551f32.gif) | ![sfdump profiler](https://cloud.githubusercontent.com/assets/2211145/21567181/4eb8013c-ceaa-11e6-8ed9-f9cb40090d55.gif) | ![sfdump profilerbar](https://cloud.githubusercontent.com/assets/2211145/21567180/4eb71740-ceaa-11e6-92dd-cc61d68a8def.gif) |

New outputs:

| Raw        | Profiler Bar |
|:-------------:|:-----:|
| ![capture d ecran 2017-01-03 a 16 20 54](https://cloud.githubusercontent.com/assets/2211145/21612323/f6b275c4-d1d0-11e6-9f78-059940fe1c2f.png) | <img width="245" alt="capture d ecran 2017-01-03 a 16 21 34" src="https://cloud.githubusercontent.com/assets/2211145/21612337/0641ad34-d1d1-11e6-92ac-a0fff2721241.png"> |

| Profiler Dump Panel | Profiler - Request Panel |
|:-------------:|:-----:|
| ![capture d ecran 2017-01-03 a 16 21 57](https://cloud.githubusercontent.com/assets/2211145/21612329/00a0ead4-d1d1-11e6-958e-e11bc87c0a7d.png) | ![capture d ecran 2017-01-03 a 16 22 22](https://cloud.githubusercontent.com/assets/2211145/21612330/00a2135a-d1d1-11e6-867d-18c55b86897e.png) ![capture d ecran 2017-01-03 a 16 22 33](https://cloud.githubusercontent.com/assets/2211145/21612331/00a2e000-d1d1-11e6-8f2a-2965a837fa60.png) |

Usage:

1. Click on the dump
1. <kbd>CTRL</kbd>/<kbd>CMD</kbd> + <kbd>F</kbd>.
1. <kbd>ESC</kbd> to quit.

Code, styles and rendering might not be perfect, but I think it's enough polished to be considered.
Anyway, I'll accept any PR on my own branch if anyone wishes to contribute to it 😃

~~I moved javascript and css into dedicated files, as I find it easier to maintain (but will complicate diff with other branches). I know PHPStorm is already able to do partial language injection in PHP files, so it might not be needed... But still looks more elegant to me ^^'~~

Commits
-------

1fe82fa49b [Profiler][VarDumper] Add a search feature to the HtmlDumper
2017-01-05 20:44:38 -08:00
Maxime Steinhausser
1fe82fa49b [Profiler][VarDumper] Add a search feature to the HtmlDumper 2017-01-05 20:44:37 -08:00
Fabien Potencier
be85fcc2b8 feature #21039 Web server bundle (fabpot)
This PR was squashed before being merged into the 3.3-dev branch (closes #21039).

Discussion
----------

Web server bundle

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

Moved the `server:*` commands to a new bundle. It makes them more easily discoverable and more decoupled. Discoverability is important when not using symfony/symfony. In that case, the commands are not available unless you have the symfony/process component installed. With a dedicated bundle, installing the bundle also installs the dependency, making the whole process easier.

Usage is the same as the current commands for basic usage:

To start a web server in the foreground:

```
bin/console server:run
```

To manage a background server:

```
bin/console server:start
bin/console server:stop
bin/console server:status
```

The big difference is that port is auto-determined if something is already listening on port 8000.

Usage is **different** if you pass options:

```
bin/console server:start 127.0.0.1:8888
bin/console server:stop # no need to pass the address again
bin/console server:status # no need to pass the address again
```

That's possible as the web server now stores its address in a pid file stored in the current directory.

Commits
-------

f39b32735b [WebServerBundle] switched auto-run of server:start to off by default
961d1cea55 [WebServerBundle] fixed server:start when already running
126f4d9ec4 [WebServerBundle] added support for port auto-detection
6f689d6597 [WebServerBundle] changed the way we keep track of the web server
585d4451c8 [WebServerBundle] tweaked command docs
fa7ebc57de [WebServerBundle] moved most of the logic in a new class
951a1a227d [WebServerBundle] changed wording
ac1ba7700e made the router configurable via env vars
48dd2b0dbe removed obsolete check
132902c621 moved server:* command to a new bundle
2017-01-05 19:09:35 -08:00
Fabien Potencier
0f50b4de80 feature #20907 [DependencyInjection] Implement lazy collection type using generators (tgalopin, nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] Implement lazy collection type using generators

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

Following the RFC https://github.com/symfony/symfony/issues/20875, this PR aims to implement lazy services collections using generators internally.

For now, I suggest to support only XML and PHP definitions. Supporting YAML means adding another convention to the language and this is not the aim of this PR.

- [x] value object holding the semantic (IteratorArgument)
- [x] iterator dumping
- [x] lazyness awareness in CheckCircularReferencesPass & GraphvizDumper
- [x] rewindable iterators
- [x] `*_ON_INVALID_REFERENCE` behavior
- [x] ContainerBuilder::createService
- [x] ArgumentInterface handling in compiler passes

Commits
-------

1dbf52ad03 [DI] Add "=iterator" arguments to Yaml loader
5313943692 [DependencyInjection] Implement lazy collection type using generators
2017-01-05 19:07:12 -08:00
Nicolas Grekas
1dbf52ad03 [DI] Add "=iterator" arguments to Yaml loader 2017-01-05 21:40:35 +01:00
Fabien Potencier
f39b32735b [WebServerBundle] switched auto-run of server:start to off by default 2017-01-05 12:36:51 -08:00
Titouan Galopin
5313943692 [DependencyInjection] Implement lazy collection type using generators 2017-01-05 21:34:37 +01:00
Fabien Potencier
961d1cea55 [WebServerBundle] fixed server:start when already running 2017-01-05 11:49:47 -08:00
Fabien Potencier
126f4d9ec4 [WebServerBundle] added support for port auto-detection 2017-01-05 11:48:52 -08:00
Fabien Potencier
6f689d6597 [WebServerBundle] changed the way we keep track of the web server 2017-01-05 11:33:44 -08:00
Nicolas Grekas
65d73f58e7 Merge branch '3.2'
* 3.2:
  [TwigBundle] Help composer resolve its deps
2017-01-05 19:14:24 +01:00
Nicolas Grekas
56987dda9f [TwigBundle] Help composer resolve its deps 2017-01-05 19:14:11 +01:00
Nicolas Grekas
aa2a1ebe4c Merge branch '3.2'
* 3.2:
  [Cache] Remove silenced warning tiggered by PhpArrayAdapter
  [Cache] Fix order of writes in ChainAdapter
  [Console] Fix return type in Terminal docblocks
2017-01-05 18:48:24 +01:00
Nicolas Grekas
bfda99f2eb bug #21167 [Cache] Remove silenced warning tiggered by PhpArrayAdapter (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Remove silenced warning tiggered by PhpArrayAdapter

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

Because many reported this silenced warning, which happens all the time unless `cache:warmup` has been run.

Commits
-------

a9dfcd8 [Cache] Remove silenced warning tiggered by PhpArrayAdapter
2017-01-05 18:48:01 +01:00
Nicolas Grekas
c74220fd4c Merge branch '3.1' into 3.2
* 3.1:
  [Cache] Fix order of writes in ChainAdapter
2017-01-05 18:42:49 +01:00
Nicolas Grekas
e2b11b4207 bug #21166 [Cache] Fix order of writes in ChainAdapter (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Fix order of writes in ChainAdapter

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

This is of importance in race situations: writes should happen on less volatile backend first so that.

Commits
-------

df552af [Cache] Fix order of writes in ChainAdapter
2017-01-05 18:42:20 +01:00
Nicolas Grekas
a9dfcd8819 [Cache] Remove silenced warning tiggered by PhpArrayAdapter 2017-01-05 18:36:34 +01:00
Nicolas Grekas
df552af2f2 [Cache] Fix order of writes in ChainAdapter 2017-01-05 08:56:56 +01:00
Fabien Potencier
f50e91419f minor #21162 [Console] Fix return type in Terminal docblocks (pjcdawkins)
This PR was merged into the 3.2 branch.

Discussion
----------

[Console] Fix return type in Terminal docblocks

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

This PR updates the docblock to reflect what's already in the code.

Commits
-------

6afb0afa24 [Console] Fix return type in Terminal docblocks
2017-01-04 19:57:48 -08:00
Fabien Potencier
f74d7fa299 Merge branch '3.2'
* 3.2:
  tweaked php cs fixer configuration
  [TwigBundle] fixed typo in composer.json
2017-01-04 14:01:34 -08:00
Fabien Potencier
8dedf9d999 Merge branch '3.1' into 3.2
* 3.1:
  tweaked php cs fixer configuration
  [TwigBundle] fixed typo in composer.json
2017-01-04 14:01:24 -08:00
Fabien Potencier
2904201ec6 Merge branch '2.8' into 3.1
* 2.8:
  tweaked php cs fixer configuration
2017-01-04 14:01:15 -08:00
Fabien Potencier
a9ed1841dc Merge branch '2.7' into 2.8
* 2.7:
  tweaked php cs fixer configuration
2017-01-04 14:01:04 -08:00
Fabien Potencier
4864e9dd51 tweaked php cs fixer configuration 2017-01-04 14:00:53 -08:00
Fabien Potencier
c3a50b0931 Merge branch '2.8' into 3.1
* 2.8:
  [TwigBundle] fixed typo in composer.json
2017-01-04 12:00:51 -08:00
Fabien Potencier
fccb98c551 [TwigBundle] fixed typo in composer.json 2017-01-04 12:00:29 -08:00
Fabien Potencier
0d1f53f48b Merge branch '3.2'
* 3.2:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
  Fix the priority order of compiler pass trait
2017-01-04 11:58:57 -08:00
Fabien Potencier
be882c4663 Merge branch '3.1' into 3.2
* 3.1:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:58:34 -08:00
Fabien Potencier
8f82bf7076 Merge branch '2.8' into 3.1
* 2.8:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:57:42 -08:00
Fabien Potencier
829b6bd475 Merge branch '2.7' into 2.8
* 2.7:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:55:18 -08:00
Fabien Potencier
da88e6b1d7 bug #21113 [FrameworkBundle][HttpKernel] Fix resources loading for bundles with custom structure (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][HttpKernel] Fix resources loading for bundles with custom structure

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/18563
| License       | MIT
| Doc PR        |  n/a

This fixes twig/translator/validator/serializer resource loading for bundles overriding `Bundle::getPath()`, adding a kernel parameter containing the bundle metadata (i.e. `path`, `namespace` and `parent`).

Fixes #18563 and unlocks https://github.com/symfony/symfony/pull/19586

Commits
-------

fef3146b3b Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:50:28 -08:00
Robin Chalas
fef3146b3b
Fix serializer/translations/validator resources loading for bundles overriding getPath() 2017-01-04 20:27:15 +01:00
Patrick Dawkins
6afb0afa24 [Console] Fix return type in Terminal docblocks 2017-01-04 17:48:15 +00:00
Fabien Potencier
df38318303 feature #21075 [Console] Show hidden commands in json & xml descriptors (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console] Show hidden commands in json & xml descriptors

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no (may be considered, but as hidden commands did not exist before 3.2, looks more like a behavior change, hence a feature)
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20866#issuecomment-266678895
| License       | MIT
| Doc PR        | N/A

Commits
-------

b6cf240ab5 [Console] Show hidden commands in json & xml descriptors
2017-01-04 06:29:21 -08:00
Fabien Potencier
ed5eb6df7d feature #21129 [FrameworkBundle] Display original definition for aliases in debug:container (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Display original definition for aliases in debug:container

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

Before
![before-txt](http://image.prntscr.com/image/b0cb59f23ddb43669ba0aba093f454af.png)

After
![after-txt](http://image.prntscr.com/image/adf234957acf444292e45bded8efb9d8.png)

<details>
<summary>XML output</summary>

Before
![before-xml](http://image.prntscr.com/image/66212d92db654f88b8196b211046bcf2.png)

After
![after-xml](http://image.prntscr.com/image/3f6b5f9f1ea54a31aea36de5928b6ae9.png)
</details>

<details>
<summary>JSON output</summary>

Before
![before-json](http://image.prntscr.com/image/a7ffc4bcda61486f90af85c90e3d6caa.png)

After
![after-json](http://image.prntscr.com/image/15d0f37e78354dcf8e3015b94fcbdaed.png)

</details>

<details>
<summary>Markdown output</summary>

Before
![before-md](http://image.prntscr.com/image/be5289840ac64a5e80f11748f481686c.png)

After
![after-md](http://image.prntscr.com/image/cba4217863f647e9974e1715812eda01.png)
</details>

Commits
-------

cd4b15e605 [FrameworkBundle] Display original definition for aliases in debug:container
2017-01-04 05:25:52 -08:00
Robin Chalas
cd4b15e605 [FrameworkBundle] Display original definition for aliases in debug:container 2017-01-04 14:20:26 +01:00
Iltar van der Berg
ba005438f9 No fallback to REQUEST_TIME in TimeDataCollector 2017-01-04 11:32:26 +01:00
Nicolas Grekas
601648e0e8 feature #21108 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter (nicolas-grekas, robfrawley)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Cache] Add DSN, createClient & better error reporting to MemcachedAdapter

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

Replaces #20863
ping @robfrawley: would you mind opening a doc PR for this?

Commits
-------

87030b4 [cache] Add tests for MemcachedAdapter::createClient()
e109438 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter
2017-01-04 07:51:37 +01:00
Maxime Steinhausser
b282076d8a [Profiler][VarDumper] Fix minor color issue & duplicated selector 2017-01-03 20:31:24 +01:00
Nicolas Grekas
142afa359e bug #20995 [DependencyInjection] Fix the priority order of compiler pass trait (francoispluchino)
This PR was merged into the 3.2 branch.

Discussion
----------

[DependencyInjection] Fix the priority order of compiler pass trait

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20332, #20993
| License       | MIT
| Doc PR        | ~

A regression has appeared between the version `3.1` and `3.2` on the compilation passes using a priority option (see #20332).

Indeed, the order is no longer preserved for service definitions with the same priority. This is caused by the `SplPriorityQueue` class that does not have a FIFO implementation (see this [comment](https://github.com/symfony/symfony/issues/20332#issuecomment-268096527)).

The PR #20993 fixes the problem but only for Forms, not for all compiler passes using the `PriorityTaggedServiceTrait` trait since `3.2`.

Commits
-------

aac9a7e Fix the priority order of compiler pass trait
2017-01-03 18:12:19 +01:00
Nicolas Grekas
b655e6009b Merge branch '3.2'
* 3.2:
  Fix hhvm & tty tests
2017-01-03 17:40:32 +01:00
Nicolas Grekas
1e39b99c7f Merge branch '3.1' into 3.2
* 3.1:
  Fix hhvm & tty tests
2017-01-03 17:40:20 +01:00
Nicolas Grekas
1563b4242b Merge branch '2.8' into 3.1
* 2.8:
  Fix hhvm & tty tests
2017-01-03 17:39:53 +01:00
Nicolas Grekas
1fc445a5e9 Merge branch '2.7' into 2.8
* 2.7:
  Fix hhvm & tty tests
2017-01-03 17:39:35 +01:00
Nicolas Grekas
d294051fe8 Fix hhvm & tty tests 2017-01-03 17:38:07 +01:00
Rob Frawley 2nd
87030b43ca [cache] Add tests for MemcachedAdapter::createClient() 2017-01-03 17:10:30 +01:00
Nicolas Grekas
1a1d6a5abe Merge branch '3.2'
* 3.2:
  Minor fixes found while ugrading the CI
2017-01-03 16:52:54 +01:00