Commit Graph

29686 Commits

Author SHA1 Message Date
Fabien Potencier
4bb25dc938 updated CHANGELOG for 3.2.8 2017-05-01 10:46:41 -07:00
Fabien Potencier
c7a7170e0e fixed tests 2017-05-01 07:58:48 -07:00
Fabien Potencier
9c610ee1a2 fixed merge 2017-05-01 07:56:26 -07:00
Fabien Potencier
824dc8ba5f Merge branch '2.8' into 3.2
* 2.8:
  Fix minor phpdoc mismatches with the code(detected by phan)
  [Asset] Starting slash should indicate no basePath wanted
  [Security] Fix phpdoc logout listener
  Add iconv extension to suggested dependencies
  Fix minor typo in the main README.md
  Allow Upper Case property names in ObjectNormalizer
  [EventDispatcher] fix: unwrap listeners for correct info
2017-05-01 07:55:58 -07:00
Fabien Potencier
6000fafa27 Merge branch '2.7' into 2.8
* 2.7:
  Fix minor phpdoc mismatches with the code(detected by phan)
  [Asset] Starting slash should indicate no basePath wanted
  [Security] Fix phpdoc logout listener
  Fix minor typo in the main README.md
2017-05-01 07:31:55 -07:00
Fabien Potencier
c84ee65b99 minor #22453 Fix minor phpdoc mismatches with the code(detected by phan) (TysonAndre)
This PR was squashed before being merged into the 2.7 branch (closes #22453).

Discussion
----------

Fix minor phpdoc mismatches with the code(detected by phan)

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

Fix minor mismatches between phpdoc and the type of the code itself, detected by etsy/phan (Prevent confusion in the future)
The actual return types of a few functions have changed from int to bool where preg_match or `&` was used.
Fix optional param before required param in src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php

The config used and the rest of the output is at https://gist.github.com/TysonAndre/91bed0e16583301f1e6e5cc2a4807081 (Uses some patches to etsy/phan that weren't merged to master yet)

Commits
-------

12f1239565 Fix minor phpdoc mismatches with the code(detected by phan)
2017-04-29 08:58:47 -07:00
Tyson Andre
12f1239565 Fix minor phpdoc mismatches with the code(detected by phan) 2017-04-29 08:58:46 -07:00
Fabien Potencier
07fc0602e1 bug #22550 Allow Upper Case property names in ObjectNormalizer (insekticid)
This PR was merged into the 2.8 branch.

Discussion
----------

Allow Upper Case property names in ObjectNormalizer

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

Same problem that has been fixed here https://github.com/symfony/symfony/pull/22265
and here https://github.com/api-platform/core/pull/1037

ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible

```php
class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}
```

Commits
-------

b2b4faa3c0 Allow Upper Case property names in ObjectNormalizer
2017-04-29 08:44:59 -07:00
Fabien Potencier
04e48bd120 minor #22557 [VarDumper] Add iconv dependency (julienfalque)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Add iconv dependency

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

Alternative to #20927.

I still think adding `@requires extension iconv` to the related tests would be nice though: on some PHP setups the iconv extension is not available by default, those tests will fail and result in red errors when running the test suite, even when working on something unrelated. The test would still run on CI so it's fine IMO.

Should I add `ext-iconv` and/or `symfony/polyfill` to `require-dev`?

/cc @nicolas-grekas

Commits
-------

13f17079ef Add iconv extension to suggested dependencies
2017-04-29 08:42:18 -07:00
Fabien Potencier
c669b88403 bug #22528 [Asset] Starting slash should indicate no basePath wanted (weaverryan)
This PR was squashed before being merged into the 2.7 branch (closes #22528).

Discussion
----------

[Asset] Starting slash should indicate no basePath wanted

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

**Important** View the second commit for an accurate diff. The first commit just renames some strings in a test for clarity.

When we moved `PathPackage` from `Templating` to `Asset`, we actually changed its behavior. Assume that we're deployed under a `/subdir` subdirectory:

**Before** `{{ asset('/main.css') }}` would *not* have the base path prefixed -> `/main.css`

**After** `{{ asset('/main.css') }}` *does* have the base path prefixed -> `/subdir/main.css`

3adff11d72/src/Symfony/Component/Templating/Asset/PathPackage.php (L61-L63)

This PR simply reverses that, to the *previous* behavior. This *is* a BC break... and also arguably a bug fix :). Interestingly, when we changed the behavior the first time (i.e. broke BC), I don't think that anyone noticed. It should only affect users deployed under a subdirectory.

Why do I care? I'm using the new `JsonManifestVersionStrategy` with a library that is outputting paths that *already* include my subdirectory:

```json
{
    "build/main.css": "/subdir/build/main.abc123.css"
}
```

So, I do not want Symfony to detect the `/subdir` and apply it a second time.

Commits
-------

3cc096b540 [Asset] Starting slash should indicate no basePath wanted
2017-04-28 16:08:26 -07:00
Ryan Weaver
3cc096b540 [Asset] Starting slash should indicate no basePath wanted 2017-04-28 16:08:24 -07:00
Fabien Potencier
af15ead255 minor #22574 [Security] Fix phpdoc logout listener (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #22574).

Discussion
----------

[Security] Fix phpdoc logout listener

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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-->

Separated from #22572

Commits
-------

e843924c03 [Security] Fix phpdoc logout listener
2017-04-28 10:36:26 -07:00
Roland Franssen
e843924c03 [Security] Fix phpdoc logout listener 2017-04-28 10:36:25 -07:00
Nicolas Grekas
c590e85c1b bug #22568 [EventDispatcher] fix getting priorities of listeners during dispatch (dmaicher)
This PR was merged into the 3.2 branch.

Discussion
----------

[EventDispatcher] fix getting priorities of listeners during dispatch

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

The WebProfiler collects listener info during dispatching the `kernel.terminate` event which caused issues while retrieving priorities as the wrappers are registered instead of the real listeners.

Commits
-------

79b71c0 [EventDispatcher] fix getting priorities of listeners during dispatch
2017-04-28 14:55:39 +02:00
David Maicher
79b71c069d [EventDispatcher] fix getting priorities of listeners during dispatch 2017-04-28 13:59:53 +02:00
Julien Falque
13f17079ef
Add iconv extension to suggested dependencies 2017-04-28 08:26:40 +02:00
Nicolas Grekas
e0ff6e06c9 minor #22559 Fix minor typo in the main README.md (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix minor typo in the main README.md

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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
-------

8ea38b5 Fix minor typo in the main README.md
2017-04-27 15:30:40 -04:00
Maxime Steinhausser
8ea38b56e0 Fix minor typo in the main README.md 2017-04-27 20:23:38 +02:00
insekticid
b2b4faa3c0 Allow Upper Case property names in ObjectNormalizer
| Q                | A
| ---------------- | -----
| Bug report?      | yes
| Feature request? | no
| BC Break report? | yes
| RFC?             | no
| Symfony version  | 2.8.19

Same problem that has been fixed here https://github.com/symfony/symfony/pull/22265
and here https://github.com/api-platform/core/pull/1037

ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible

```php
class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}
```
2017-04-27 14:34:21 +02:00
Fabien Potencier
e9e4c79894 bug #22541 [EventDispatcher] fix: unwrap listeners for correct info (dmaicher)
This PR was merged into the 2.8 branch.

Discussion
----------

[EventDispatcher] fix: unwrap listeners for correct info

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | related to https://github.com/symfony/symfony/issues/22520
| License       | MIT
| Doc PR        | -

Fixes problem where listeners were displayed as `Symfony\Component\EventDispatcher\Debug\WrappedListener::__invoke() ` in the profiler. It now shows the correct callable.

Commits
-------

d8c5869b7c [EventDispatcher] fix: unwrap listeners for correct info
2017-04-26 13:16:31 -04:00
David Maicher
d8c5869b7c [EventDispatcher] fix: unwrap listeners for correct info 2017-04-26 18:56:54 +02:00
Nicolas Grekas
eb1e27737e Merge branch '2.8' into 3.2
* 2.8:
  [Asset] Fix invalid assets.xml
  Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 10:23:18 -04:00
Nicolas Grekas
1bee0adef1 Merge branch '2.7' into 2.8
* 2.7:
  Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 10:23:06 -04:00
Fabien Potencier
345b8c287a minor #22529 [Asset] Fix invalid assets.xml (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Asset] Fix invalid assets.xml

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

Fixes invalid xml definitions.

Commits
-------

de1b20ac58 [Asset] Fix invalid assets.xml
2017-04-26 08:53:26 -04:00
Fabien Potencier
fc1fe8decf bug #22526 [Asset] Preventing the base path or absolute URL from being prefixed incorrectly (weaverryan)
This PR was merged into the 2.7 branch.

Discussion
----------

[Asset] Preventing the base path or absolute URL from being prefixed incorrectly

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

Fixes an edge case (which I need) where the version strategy returns an absolute URL. Currently, if this happens, the baseUrl or basePath is prefixed - giving `https://baseurl.com/https://pathreturnedfromversioning.com` or `/basePath/https://pathreturnedfromversioning.com`.

I don't see any reason to prevent an absolute URL from being returned by the version strategy. And it's not a BC break, because the previous paths that were returned were nonsense.

Cheers!

Commits
-------

746c91eea4 Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 08:47:35 -04:00
Nicolas Grekas
de1b20ac58 [Asset] Fix invalid assets.xml 2017-04-25 21:58:43 -04:00
Nicolas Grekas
8a8d92d793 Merge branch '2.8' into 3.2
* 2.8:
  Fixed the flickering when loading complex profiler panels
  [DI] Add missing check in PhpDumper
  [Serializer] XmlEncoder: fix negative int and large numbers handling
  [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 21:39:17 -04:00
Nicolas Grekas
3adff11d72 Merge branch '2.7' into 2.8
* 2.7:
  [DI] Add missing check in PhpDumper
  [Serializer] XmlEncoder: fix negative int and large numbers handling
  [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 21:38:53 -04:00
Ryan Weaver
746c91eea4 Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
If the version strategy returns an absolute URL, that should be the final URL.
2017-04-25 21:08:25 -04:00
Fabien Potencier
76dd7b0ed6 bug #22523 [WebProfilerBundle] Fixed the flickering when loading complex profiler panels (javiereguiluz)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Fixed the flickering when loading complex profiler panels

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

When profiler panels are complex (usually, when they contain a lot of VarDumper calls) they take some time to load and this results in a ugly flickering of the sidebar. This PR fixes this problem adding some minor CSS changes and reordering some HTML elements in the layout.

These changes shouldn't affect the design in any way but please, test it in your own browsers. Thanks!

| Before | After
| --- | ---
| ![profiler-before](https://cloud.githubusercontent.com/assets/73419/25390425/c7ebb16e-29d3-11e7-9d3f-722d5b24b95a.gif) | ![profiler-after](https://cloud.githubusercontent.com/assets/73419/25390426/c80994ea-29d3-11e7-910c-7a2564b17ffa.gif)

Commits
-------

e9132b3445 Fixed the flickering when loading complex profiler panels
2017-04-25 13:47:11 -04:00
Nicolas Grekas
97747808b2 minor #22498 [DI] Add missing check in PhpDumper (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Add missing check in PhpDumper

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

Commits
-------

5cabf88 [DI] Add missing check in PhpDumper
2017-04-25 11:08:04 -04:00
Javier Eguiluz
e9132b3445 Fixed the flickering when loading complex profiler panels 2017-04-25 16:22:01 +02:00
Fabien Potencier
2145f56920 bug #21958 [Console] Fix bar width with multilines ProgressBar's format (maidmaid)
This PR was squashed before being merged into the 3.2 branch (closes #21958).

Discussion
----------

[Console] Fix bar width with multilines ProgressBar's format

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

The bar width is badly recalculated when we use multilines (``\n``) and bar placeholer (``%bar%``) in ProgressBar's format. The bar width is reduced because multilines is considered as a big oneline. This PR fixes this.

Commits
-------

3d58ab5bad [Console] Fix bar width with multilines ProgressBar's format
2017-04-25 10:15:10 -04:00
Dany Maillard
3d58ab5bad [Console] Fix bar width with multilines ProgressBar's format 2017-04-25 10:15:09 -04:00
Fabien Potencier
81f48b80f3 bug #22435 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix dispatching throwables from ConsoleEvents::COMMAND

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

Exceptions thrown by `ConsoleEvents::COMMAND` listeners should be trigger `ConsoleEvents::EXCEPTION` events.
(best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/22435/files?w=1))

Commits
-------

6d6b04ae97 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 10:03:21 -04:00
Fabien Potencier
93b7530f20 bug #22478 [Serializer] XmlEncoder: fix negative int and large numbers handling (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] XmlEncoder: fix negative int and large numbers handling

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22329, #22333 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Alternative to #22333.

* Negative integers are now handled
* Float are now handled
* Large numbers are converted to float (as the `JsonEncoder` and native PHP functions like `ceil` do)

@vlastv, I've adapted your test. Can you check if it fixes your problem?

Commits
-------

1eeadb0c98 [Serializer] XmlEncoder: fix negative int and large numbers handling
2017-04-23 15:32:35 -07:00
Nicolas Grekas
5cabf880d6 [DI] Add missing check in PhpDumper 2017-04-21 13:48:46 +02:00
Kévin Dunglas
1eeadb0c98
[Serializer] XmlEncoder: fix negative int and large numbers handling 2017-04-19 22:42:09 +02:00
Nicolas Grekas
8fcc9e6638 fix merge 2017-04-19 22:29:12 +02:00
Nicolas Grekas
fc195dc4f9 Merge branch '2.8' into 3.2
* 2.8:
  Make .travis.yml more readable
  Fold Travis CI output by component
  Add trhows PHPDoc in Application::run
  [Debug] Set exit status to 255 on error
  [HttpFoundation] Store IANA's RNG files in the repository
  [PropertyInfo] Remove a useless call to count() in SerializerExtractor
  [PropertyInfo] Prevent returning int values in some cases.
  [HttpFoundation] Fix getClientIp @return docblock
  Add @throws phpdoc
  unify PHPUnit config files
2017-04-19 22:17:50 +02:00
Nicolas Grekas
9af7354e13 Merge branch '2.7' into 2.8
* 2.7:
  Make .travis.yml more readable
  Fold Travis CI output by component
  Add trhows PHPDoc in Application::run
  [Debug] Set exit status to 255 on error
  [HttpFoundation] Store IANA's RNG files in the repository
  [HttpFoundation] Fix getClientIp @return docblock
  Add @throws phpdoc
  unify PHPUnit config files
2017-04-19 21:56:30 +02:00
Fabien Potencier
bc6128b486 minor #22461 Fold Travis CI output by component (maidmaid, nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Fold Travis CI output by component

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

Trying some tweaks on top of #22252

Commits
-------

cf87678a2e Make .travis.yml more readable
7a9b086d56 Fold Travis CI output by component
2017-04-19 10:46:17 -06:00
Nicolas Grekas
cf87678a2e Make .travis.yml more readable 2017-04-19 14:51:17 +02:00
Nicolas Grekas
c9a614eb5e minor #22455 [VarDumper] Minor tweaks to html/css dumps (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[VarDumper] Minor tweaks to html/css dumps

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

Commits
-------

3b83fe1 [VarDumper] Minor tweaks to html/css dumps
2017-04-18 18:11:15 +02:00
Dany Maillard
7a9b086d56 Fold Travis CI output by component 2017-04-18 17:01:18 +02:00
Nicolas Grekas
3b83fe115b [VarDumper] Minor tweaks to html/css dumps 2017-04-18 12:10:25 +02:00
Nicolas Grekas
6d6b04ae97 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND 2017-04-14 21:35:59 +02:00
Fabien Potencier
301bfa4bc4 minor #22430 [Console] Add throws PHPDoc in Application::run() (maidmaid)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Add throws PHPDoc in Application::run()

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

Same idea than merged #22411.

Commits
-------

28332afb38 Add trhows PHPDoc in Application::run
2017-04-14 07:55:35 -07:00
Fabien Potencier
5d83502ab5 bug #22424 [Debug] Set exit status to 255 on error (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Set exit status to 255 on error

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (no easily testable in fact)
| Fixed tickets | #20775
| License       | MIT
| Doc PR        | -

Commits
-------

67e249dc81 [Debug] Set exit status to 255 on error
2017-04-13 15:15:37 -07:00
Dany Maillard
28332afb38 Add trhows PHPDoc in Application::run 2017-04-13 23:07:15 +02:00