Commit Graph

39768 Commits

Author SHA1 Message Date
Daniel Wehner
8caab72f5e Don't use he in docs when its not needed 2018-12-13 17:47:06 +01:00
Nicolas Grekas
718d01932f minor #29594 EventSubscriberInterface isn't a man (dawehner)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #29594).

Discussion
----------

EventSubscriberInterface isn't a man

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

The documentation talks about a man, an event subscriber clearly isn't one

Commits
-------

f58338e251 EventSubscriberInterface isn't a man
2018-12-13 17:46:17 +01:00
Daniel Wehner
f58338e251 EventSubscriberInterface isn't a man 2018-12-13 17:46:10 +01:00
Nicolas Grekas
f2590d196f feature #29286 [WebProfilerBundle] Enable translation filters (ro0NL)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[WebProfilerBundle] Enable translation filters

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Enable filters in the translation panel:

![image](https://user-images.githubusercontent.com/1047696/48918835-724a3500-ee8f-11e8-9d1b-6d464314fe2a.png)

![image](https://user-images.githubusercontent.com/1047696/48918876-b806fd80-ee8f-11e8-8d4d-1f3fa81dd9ce.png)

Commits
-------

9ae2bb45b2 [WebProfilerBundle] Enable translation filters
2018-12-13 15:06:49 +01:00
Nicolas Grekas
0d2fb4b977 bug #29591 [Cache] Fix undefined variable in ArrayTrait (eXtreme)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] Fix undefined variable in ArrayTrait

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

After upgrading my project to 4.2 my tests failed with a message that `$key` variable is missing here: e81285249b/src/Symfony/Component/Cache/Traits/ArrayTrait.php (L131) which seems to be introduced with PR https://github.com/symfony/symfony/pull/27563.

So I added that variable to the trait and method calls (are there any other?). This is internal class so I guess noone is using it anywhere.

Anyway, my tests pass with this fix.

Commits
-------

b0b5937d1d Fix undefined variable in cache ArrayTrait
2018-12-13 14:38:51 +01:00
Jacek Jędrzejewski
b0b5937d1d Fix undefined variable in cache ArrayTrait 2018-12-13 14:24:29 +01:00
Nicolas Grekas
1e0165ba94 Fix deps=low 2018-12-13 14:01:35 +01:00
Nicolas Grekas
df4ad4e7d4 Merge branch '4.2'
* 4.2: (27 commits)
  [VarExporter] dont call userland code with uninitialized objects
  Fix typos in doc blocks
  [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
  [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
  [FrameworkBundle] fix describing routes with no controllers
  [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
  Update ValidationListener.php
  [Yaml] ensures that the mb_internal_encoding is reset to its initial value
  [Messenger] Restore message handlers laziness
  [WebLink] Fixed documentation link
  [Security] getTargetPath of TargetPathTrait must return string or null
  [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
  Optimize perf by replacing call_user_func with dynamic vars
  [Cache] Fix dsn parsing
  [Routing] fix dumping same-path routes with placeholders
  [WebProfilerBundle][TwigBundle] CSS fixes
  Add a docblock for FormFactoryInterface
  [Security] defer log message in guard authenticator
  [Validator] Added IBAN format for Vatican City State
  merge conflicts
  ...
2018-12-13 13:43:21 +01:00
Nicolas Grekas
b88728a13a Merge branch '4.1' into 4.2
* 4.1:
  Fix typos in doc blocks
  [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
  [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
  [FrameworkBundle] fix describing routes with no controllers
  [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
  Update ValidationListener.php
  [Yaml] ensures that the mb_internal_encoding is reset to its initial value
  [WebLink] Fixed documentation link
  [Security] getTargetPath of TargetPathTrait must return string or null
  [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
  Optimize perf by replacing call_user_func with dynamic vars
  [Routing] fix dumping same-path routes with placeholders
  [Security] defer log message in guard authenticator
  [Validator] Added IBAN format for Vatican City State
  merge conflicts
  filter out invalid Intl values
  filter out invalid language values
  [Validator] Fixed grouped composite constraints
  [Form] Filter arrays out of scalar form types
  Fix HeaderBag::get phpdoc
2018-12-13 13:39:50 +01:00
Nicolas Grekas
547bf26eee Merge branch '3.4' into 4.1
* 3.4:
  [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
  [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
  [FrameworkBundle] fix describing routes with no controllers
  [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
  Update ValidationListener.php
  [Yaml] ensures that the mb_internal_encoding is reset to its initial value
  [WebLink] Fixed documentation link
  [Security] getTargetPath of TargetPathTrait must return string or null
  [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
  [Security] defer log message in guard authenticator
  merge conflicts
  Fix HeaderBag::get phpdoc
2018-12-13 13:30:33 +01:00
Nicolas Grekas
95cda62bc9 feature #29517 [Hackday][Messenger] Add an alias for transport.symfony_serializer so SerializerInterface can be autowired (karser)
This PR was submitted for the 4.2 branch but it was squashed and merged into the 4.3-dev branch instead (closes #29517).

Discussion
----------

[Hackday][Messenger] Add an alias for transport.symfony_serializer so SerializerInterface can be autowired

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| License       | MIT

cc @thePanz

Use case:
Before:
```
    Pnz\Messenger\FilesystemTransport\FilesystemTransportFactory:
        arguments:
            - '@messenger.transport.symfony_serializer'
        tags: ['messenger.transport_factory']
```

After:
```
    Pnz\Messenger\FilesystemTransport\FilesystemTransportFactory:
        tags: ['messenger.transport_factory']
```

Commits
-------

2f0e948bf0 [Hackday][Messenger] Add an alias for transport.symfony_serializer so SerializerInterface can be autowired
2018-12-13 11:40:47 +01:00
karser
2f0e948bf0 [Hackday][Messenger] Add an alias for transport.symfony_serializer so SerializerInterface can be autowired 2018-12-13 11:40:41 +01:00
Chris Wilkinson
9bf313660d Increase priority of AddRequestFormatsListener 2018-12-13 10:20:24 +00:00
Chris Wilkinson
02c9f352d9 Set the default locale early 2018-12-13 10:16:14 +00:00
Nicolas Grekas
0b99a8e28c bug #29558 [Messenger] Restore message handlers laziness (chalasr)
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Restore message handlers laziness

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

The `HandlersLocator` introduced in 4.2 currently needs to instantiate all message handlers of the bus in order to be wired, while they were lazily loaded in 4.1 via ContainerHandlerLocator (removed).

Example:
```yaml
framework:
    messenger:
        buses:
            messenger.bus.command: ~
services:
    App\Messenger\:
        resource: '../src/Messenger/*Handler.php'
        tags:
            - { name: messenger.message_handler, bus: messenger.bus.command }
```

```php
namespace App\Messenger;

class BarCommand {}
class BarCommandHandler { public function __invoke(BarCommand $command): void {} }

class FooCommand {}
class FooCommandHandler { public function __invoke(FooCommand $command): void {} }
```
(Dumped `HandleMessageMiddleware` factory) Before:

```php
return $this->privates['messenger.bus.command.middleware.handle_message'] = new \Symfony\Component\Messenger\Middleware\HandleMessageMiddleware(new \Symfony\Component\Messenger\Handler\HandlersLocator(array(
    'App\\Messenger\\BarCommand' => \current(array(0 => array(0 => new \App\Messenger\BarCommandHandler()))),
    'App\\Messenger\\FooCommand' => \current(array(0 => array(0 => new \App\Messenger\FooCommandHandler())))
)));
```

After:
```php
return $this->privates['messenger.bus.command.middleware.handle_message'] = new \Symfony\Component\Messenger\Middleware\HandleMessageMiddleware(new \Symfony\Component\Messenger\Handler\HandlersLocator(array(
    'App\\Messenger\\BarCommand' => new RewindableGenerator(function () {
        yield 0 => ($this->privates['App\Messenger\BarCommandHandler'] ?? ($this->privates['App\Messenger\BarCommandHandler'] = new \App\Messenger\BarCommandHandler()));
    }, 1),
    'App\\Messenger\\FooCommand' => new RewindableGenerator(function () {
        yield 0 => ($this->privates['App\Messenger\FooCommandHandler'] ?? ($this->privates['App\Messenger\FooCommandHandler'] = new \App\Messenger\FooCommandHandler()));
    }, 1)
)));
```

Commits
-------

c608e731a9 [Messenger] Restore message handlers laziness
2018-12-13 09:58:21 +01:00
Nicolas Grekas
e3123f8068 bug #29589 [VarExporter] dont call userland code with uninitialized objects (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[VarExporter] dont call userland code with uninitialized objects

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

Commits
-------

f0cd2b2838 [VarExporter] dont call userland code with uninitialized objects
2018-12-13 09:44:25 +01:00
Nicolas Grekas
d12a6d0330 feature #29108 [DI] compute autowiring error messages lazily (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] compute autowiring error messages lazily

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

As suggested in the linked issue:

> the error message may ultimately be "hidden" because the definition in question is removed... and so we're doing work unnecessarily.

Commits
-------

3b3a1bd3cc [DI] compute autowiring error messages lazily
2018-12-13 09:09:52 +01:00
Nicolas Grekas
58c7ad46c4 feature #29235 [VarDumper] add support for links in CliDumper (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] add support for links in CliDumper

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

Same as #29168 for VarDumper:

![capture d ecran de 2018-11-15 20-10-08](https://user-images.githubusercontent.com/243674/48576196-24c04c00-e914-11e8-8a61-c1304c876243.png)

Thanks @ostrolucky for this nice discovery!

Commits
-------

e7cd44f5b2 [VarDumper] add support for links in CliDumper
2018-12-13 09:09:04 +01:00
Nicolas Grekas
0960dfd658 bug #29542 [Routing] fix dumping same-path routes with placeholders (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] fix dumping same-path routes with placeholders

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

Only 4.1 is affected.

Commits
-------

94a143011a [Routing] fix dumping same-path routes with placeholders
2018-12-13 09:08:31 +01:00
Nicolas Grekas
3fff3068db bug #29587 [Debug] ignore underscore vs backslash namespaces in DebugClassLoader (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] ignore underscore vs backslash namespaces in DebugClassLoader

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

Commits
-------

d858dad065 [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
2018-12-13 09:06:10 +01:00
Nicolas Grekas
f0cd2b2838 [VarExporter] dont call userland code with uninitialized objects 2018-12-13 08:48:06 +01:00
Robin Chalas
5328bf5883 minor #29586 Fix typos in doc blocks (MusikAnimal)
This PR was submitted for the master branch but it was merged into the 4.1 branch instead (closes #29586).

Discussion
----------

Fix typos in doc blocks

Change "wheter" to "whether" in doc blocks for redirectAction() and urlRedirectAction()

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

Fixes two typos in the doc blocks for RedirectController:redirectAction() and RedirectController::urlRedirectAction()

One of the builds has a failing test, but surely that's not related to this PR? https://travis-ci.org/symfony/symfony/jobs/467149897

Commits
-------

ea37c7a Fix typos in doc blocks
2018-12-13 08:40:36 +01:00
MusikAnimal
ea37c7af74 Fix typos in doc blocks
Change "wheter" to "whether" in doc blocks for redirectAction() and urlRedirectAction()
2018-12-13 08:40:30 +01:00
Nicolas Grekas
d858dad065 [Debug] ignore underscore vs backslash namespaces in DebugClassLoader 2018-12-12 21:57:22 +01:00
Alexander Schranz
c45062b71a
fixed public directory of web server and assets install when configured in composer.json 2018-12-12 18:56:32 +01:00
Nicolas Grekas
7a34a78be6 bug #29584 [FrameworkBundle] fix describing routes with no controllers (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] fix describing routes with no controllers

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

Spotted by @jpauli during a training.

Commits
-------

a1c612aedf [FrameworkBundle] fix describing routes with no controllers
2018-12-12 18:36:44 +01:00
Nicolas Grekas
7028f842b0 bug #29582 [DI] move RegisterServiceSubscribersPass before DecoratorServicePass (kbond)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] move RegisterServiceSubscribersPass before DecoratorServicePass

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29550
| License       | MIT
| Doc PR        | n/a

From https://github.com/symfony/symfony/issues/29550#issuecomment-446351365: The fact that `RegisterServiceSubscribersPass` runs after `DecoratorServicePass` makes it impossible to decorate a service implementing `ServiceSubscriberInterface` if the decorator does not implement it.

Commits
-------

c3271d9385 [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
2018-12-12 18:36:18 +01:00
Nicolas Grekas
153220a932 bug #29527 [TwigBridge][Form] Prevent multiple rendering of form collection prototypes (Shoplifter)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge][Form] Prevent multiple rendering of form collection prototypes

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29489   <!-- #-prefixed issue number(s), if any -->
| License       | MIT

prevents attemt to render of prototype in CollectionType when it has been rendered already.
(see [Deprecated calling FormRenderer::searchAndRenderBlock for fields which were already rendered.](https://github.com/symfony/symfony/blob/master/UPGRADE-4.2.md#form))

Commits
-------

ffd272243b [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
2018-12-12 18:34:38 +01:00
Thomas Baumgartner
ffd272243b [TwigBridge][Form] Prevent multiple rendering of form collection prototypes 2018-12-12 18:31:24 +01:00
Nicolas Grekas
a1c612aedf [FrameworkBundle] fix describing routes with no controllers 2018-12-12 18:02:13 +01:00
Kevin Bond
c3271d9385
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass 2018-12-12 10:27:19 -05:00
Fabien Potencier
3096665d64 minor #29043 Update ValidationListener.php (DonCallisto)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29043).

Discussion
----------

Update ValidationListener.php

This comment was misleading.
It's true that no groups (ie.: `Default`) are setted into validation process but it's not clear from the comment.
I suppose that is better to be more explicit about this process.
BTW I'm still not sure if `FormValidator` reference is necessary as we can change it and we should remember to update this comment and this does not seems to fit.
WDYT, is better to leave `FormValidator` out of this comment?

For reference: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L46-L92

| Q             | A
| ------------- | ---
| Branch?       | 3.4 (careful when merging)
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

3b9d8efc95 Update ValidationListener.php
2018-12-12 07:47:35 +01:00
Samuele Lilli
3b9d8efc95 Update ValidationListener.php
This comment was misleading.
It's true that no groups (ie.: `Default`) are setted into validation process but it's not clear from the comment.
I suppose that is better to be more explicit about this process.
BTW I'm still not sure if `FormValidator` reference is necessary as we can change it and we should remember to update this comment and this does not seems to fit.
WDYT, is better to leave `FormValidator` out of this comment?

For reference: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L46-L92
2018-12-12 07:47:27 +01:00
Christian Flothmann
4c8d04c9ba bug #29571 [Yaml] ensures that the mb_internal_encoding is reset to its initial value (Jörn Lang)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] ensures that the mb_internal_encoding is reset to its initial value

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

When `Symfony\Component\Yaml\Inline::parse` sets the internal encoding to ASCII and the method does an early return or throws an exception, the internal encoding would not be reset.
This Patch ensures the reset of the encoding by moving it into a finally block.

Commits
-------

56ab129b96 [Yaml] ensures that the mb_internal_encoding is reset to its initial value
2018-12-11 16:29:12 +01:00
Jörn Lang
56ab129b96 [Yaml] ensures that the mb_internal_encoding is reset to its initial value 2018-12-11 15:13:08 +01:00
Robin Chalas
c608e731a9 [Messenger] Restore message handlers laziness 2018-12-11 14:32:32 +01:00
Fabien Potencier
da4019a4be minor #29555 [WebProfilerBundle] Improve PHP extension badges (ro0NL)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[WebProfilerBundle] Improve PHP extension badges

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29374
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

![image](https://user-images.githubusercontent.com/1047696/49753655-5c70a880-fcb4-11e8-9c87-8f7586a27e5c.png)

![image](https://user-images.githubusercontent.com/1047696/49753831-cf7a1f00-fcb4-11e8-992b-fec4ed4ef4e0.png)

![image](https://user-images.githubusercontent.com/1047696/49753849-da34b400-fcb4-11e8-851c-3bfe0fc1fbfd.png)

Commits
-------

4399dabfd4 [WebProfilerBundle] Fix php extension badges
2018-12-11 08:56:28 +01:00
Fabien Potencier
9b7b8621e1 minor #29549 [WebLink] Fixed documentation link (samnela)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebLink] Fixed documentation link

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a. <!-- required for new features -->

Commits
-------

362339f26c [WebLink] Fixed documentation link
2018-12-11 08:54:31 +01:00
Roland Franssen
4399dabfd4 [WebProfilerBundle] Fix php extension badges 2018-12-10 19:50:46 +01:00
Samuel NELA
362339f26c [WebLink] Fixed documentation link 2018-12-10 14:11:36 +01:00
Nicolas Grekas
af17da9f82 [DI] map snake-case ids of service subscribers to camel-case autowiring aliases 2018-12-10 07:37:31 +00:00
Fabien Potencier
d069c264b3 feature #29541 [FrameworkBundle] Stop calling Kernel::boot() twice in cli (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Stop calling Kernel::boot() twice in cli

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

Allows custom `Kernel::boot()` implementations to not be aware of the protected `Kernel::$booted` prop.

Commits
-------

97e15fe1b5 [FrameworkBundle] Stop calling Kernel::boot() twice in cli
2018-12-10 05:26:30 +01:00
Fabien Potencier
b2cc270377 minor #29245 [EventDispatcher][VarDumper] optimize perf by leveraging Closure::fromCallable() (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[EventDispatcher][VarDumper] optimize perf by leveraging Closure::fromCallable()

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

Callables are notably slower than closures. Let's turn then to closures thanks to `Closure::fromCallable()`.

This doesn't affect performance for run-once listeners.
And improves performance for events that are dispatched several times.

Same for VarDumper's casters.

Commits
-------

d6a594bf42 [EventDispatcher][VarDumper] optimize perf by leveraging Closure::fromCallable()
2018-12-10 05:22:43 +01:00
Fabien Potencier
a9694f7022 feature #28931 [PhpUnitBridge] Added ClassExistsMock (ro0NL)
This PR was squashed before being merged into the 4.3-dev branch (closes #28931).

Discussion
----------

[PhpUnitBridge] Added ClassExistsMock

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/issues/10528

I've thought about this before, and bumped into it again when trying to test #28898

This PR allows to mock `class|interface|trait_exists` to enable specific code path testing

Commits
-------

62caec1a79 [PhpUnitBridge] Added ClassExistsMock
2018-12-10 05:16:00 +01:00
Roland Franssen
62caec1a79 [PhpUnitBridge] Added ClassExistsMock 2018-12-10 05:15:53 +01:00
Fabien Potencier
4c08b07cb2 minor #29309 Optimize perf by replacing call_user_func with dynamic variables (ostrolucky)
This PR was merged into the 4.1 branch.

Discussion
----------

Optimize perf by replacing call_user_func with dynamic variables

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

This provides similar boost as in https://github.com/symfony/symfony/pull/29245, but on more places and without complexity increase. Check eg. https://github.com/fab2s/call_user_func for proof

Fabpot failure unrelated

Commits
-------

0c6ef01713 Optimize perf by replacing call_user_func with dynamic vars
2018-12-10 05:13:43 +01:00
Fabien Potencier
68b823f243 minor #29408 [Security] getTargetPath of TargetPathTrait must return string or null (gmponos)
This PR was squashed before being merged into the 3.4 branch (closes #29408).

Discussion
----------

[Security] getTargetPath of TargetPathTrait must return string or null

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes (possible bug)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Since the return type is string the default return value must be also string.

Commits
-------

8d4b787dd9 [Security] getTargetPath of TargetPathTrait must return string or null
2018-12-10 05:09:26 +01:00
Mponos George
8d4b787dd9 [Security] getTargetPath of TargetPathTrait must return string or null 2018-12-10 05:09:19 +01:00
Fabien Potencier
7dc1521fe6 feature #29504 [Validator] Add support for UATP card validation (raulfraile)
This PR was squashed before being merged into the 4.3-dev branch (closes #29504).

Discussion
----------

[Validator] Add support for UATP card validation

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

[UATP](https://en.wikipedia.org/wiki/Universal_Air_Travel_Plan) (Universal Air Travel Plan) is the airline owned payment network accepted by thousands of merchants for rail, air, hotel and travel agency payments. This PR adds support for UATP cards so they can be validated using the Symfony Validator component.

According to https://en.wikipedia.org/wiki/Payment_card_number, all UATP cards start with `1`, have a length of 15 digits and follow the [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm). Test card numbers can be generated from https://www.myfakeinfo.com/creditcard/uatp-debit-card.php

Commits
-------

2446a1763d [Validator] Add support for UATP card validation
2018-12-10 05:08:00 +01:00
Raul Fraile
2446a1763d [Validator] Add support for UATP card validation 2018-12-10 05:07:54 +01:00