Skip to content

Same change for mapping files #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from
Closed

Same change for mapping files #4

wants to merge 0 commits into from

Conversation

jwage
Copy link
Contributor

@jwage jwage commented Sep 3, 2010

No description provided.

fabpot added a commit that referenced this pull request Nov 9, 2011
Commits
-------

d974a4a Merge pull request #4 from stealth35/test_mo_loader
cf05646 delete useless tests
19f9de9 [Translation] fix gettext tests
965f2bf Merge pull request #3 from stealth35/test_mo_loader
9c2a26d [Translation] add Mo loader tests
9af2342 [Translation] Added the gettext loaders

Discussion
----------

[Translation] Added the gettext loaders

This is the squashed version of the work done by @xaav in #634.

@stealth35 you said you will work on the dumpers. do you have some stuff on it ?

---------------------------------------------------------------------------

by drak at 2011/10/24 19:28:43 -0700

Is there any more progress with this?

---------------------------------------------------------------------------

by stealth35 at 2011/10/25 00:57:19 -0700

I work on the dumpers, but the Po loader is wrong, caus' the Po ressource can be multiline,

     msgid ""
     "Here is an example of how one might continue a very long string\n"
     "for the common case the string represents multi-line output.\n"

http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files

Anyway the Po format is an intermediate format to Mo file, (like .txt to .res file for ICU), IMO we can just support the real gettext format : Mo

---------------------------------------------------------------------------

by stealth35 at 2011/11/03 02:00:24 -0700

@stof The MO Dumper is ready (stealth35/symfony@f2d1d5b), should we keep the PO format ?

---------------------------------------------------------------------------

by fabpot at 2011/11/07 08:50:59 -0800

@stealth35: The PO is what people will use for their translations. They will then dump it to MO. So, we need both PO and MO loaders and dumpers.

---------------------------------------------------------------------------

by stealth35 at 2011/11/08 01:25:39 -0800

@fabpot, I'm ready for both dumpers, you can merge this, and I'll open a PR for the dumpers

---------------------------------------------------------------------------

by fabpot at 2011/11/08 22:37:47 -0800

I've just had a look at this PR code again and I see that the unit tests are pretty slim. Is it possible to add some tests for the mo loader?

---------------------------------------------------------------------------

by stealth35 at 2011/11/09 01:15:25 -0800

@fabpot test send to @stof ✌️

---------------------------------------------------------------------------

by stof at 2011/11/09 02:22:55 -0800

and merged in this branch

---------------------------------------------------------------------------

by fabpot at 2011/11/09 02:39:09 -0800

The tests do not pass for me:

    There was 1 error:

    1) Symfony\Tests\Component\Translation\Loader\MoFileLoaderTest::testLoadDoesNothingIfEmpty
    InvalidArgumentException: MO stream content has an invalid format.

    /Users/fabien/work/symfony/git/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php:79
    /Users/fabien/work/symfony/git/symfony/src/Symfony/Component/Translation/Loader/MoFileLoader.php:46
    /Users/fabien/work/symfony/git/symfony/tests/Symfony/Tests/Component/Translation/Loader/MoFileLoaderTest.php:34

    --

    There was 1 failure:

    1) Symfony\Tests\Component\Translation\Loader\PoFileLoaderTest::testLoad
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
     Array (
    -    'foo' => 'bar'
     )

    /Users/fabien/work/symfony/git/symfony/tests/Symfony/Tests/Component/Translation/Loader/PoFileLoaderTest.php:25
homer6 pushed a commit to homer6/symfony that referenced this pull request Nov 9, 2011
dawehner pushed a commit to dawehner/symfony that referenced this pull request Jul 1, 2013
Implement content_id for url generation
fabpot added a commit that referenced this pull request Dec 12, 2014
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #12453).

Discussion
----------

[Debug] Show only unique class candidates

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

```
PHPUnit 4.3.5 by Sebastian Bergmann.

Configuration read from .../symfony/phpunit.xml.dist

S....S.............................FFFS.......

Time: 2.29 seconds, Memory: 8.50Mb

There were 3 failures:

1) Symfony\Component\Debug\Tests\FatalErrorHandler\ClassNotFoundFatalErrorHandlerTest::testClassNotFound with data set #2 (array(1, 12, 'foo.php', 'Class \'UndefinedFunctionException\' not found'), 'Attempted to load class "UndefinedFunctionException" from the global namespace.
Did you forget a "use" statement for "Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException"?')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
 Attempted to load class "UndefinedFunctionException" from the global namespace.
-Did you forget a "use" statement for "Symfony\Component\Debug\Exception\UndefinedFunctionException"?
+Did you forget a "use" statement for e.g. "Symfony\Component\Debug\Exception\UndefinedFunctionException" or "Symfony\Component\Debug\Exception\UndefinedFunctionException"?

.../symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php:28

2) Symfony\Component\Debug\Tests\FatalErrorHandler\ClassNotFoundFatalErrorHandlerTest::testClassNotFound with data set #3 (array(1, 12, 'foo.php', 'Class \'PEARClass\' not found'), 'Attempted to load class "PEARClass" from the global namespace.
Did you forget a "use" statement for "Symfony_Component_Debug_Tests_Fixtures_PEARClass"?')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
 Attempted to load class "PEARClass" from the global namespace.
-Did you forget a "use" statement for "Symfony_Component_Debug_Tests_Fixtures_PEARClass"?
+Did you forget a "use" statement for e.g. "Symfony_Component_Debug_Tests_Fixtures_PEARClass" or "Symfony_Component_Debug_Tests_Fixtures_PEARClass"?

.../symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php:28

3) Symfony\Component\Debug\Tests\FatalErrorHandler\ClassNotFoundFatalErrorHandlerTest::testClassNotFound with data set #4 (array(1, 12, 'foo.php', 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\\Bar".
Did you forget a "use" statement for "Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException"?')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
 Attempted to load class "UndefinedFunctionException" from namespace "Foo\Bar".
-Did you forget a "use" statement for "Symfony\Component\Debug\Exception\UndefinedFunctionException"?
+Did you forget a "use" statement for e.g. "Symfony\Component\Debug\Exception\UndefinedFunctionException" or "Symfony\Component\Debug\Exception\UndefinedFunctionException"?

.../symfony/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php:28
```

Commits
-------

db8a3ae [Debug] Show only unique class candidates
dunglas referenced this pull request in dunglas/symfony Sep 21, 2015
Configure and apply cs-fixer
SofHad pushed a commit to SofHad/symfony that referenced this pull request Oct 12, 2015
This PR was merged into the master branch.

Discussion
----------

Renamed Default to Static

A little while ago, @weaverryan, @xabbuh and me decided Static was a much better name for this than Default.

Default doesn't really explain anything. Does it mean that every request will go to this controller *by default*? Nope...

Btw, this makes me wonder if we shouldn't use http://symfony.com/doc/current/cookbook/templating/render_without_controller.html instead of this controller?

Commits
-------

fb9d419 Use Symfony's template controller
nicolas-grekas added a commit that referenced this pull request Nov 27, 2015
…ion on-demand (nicolas-grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge\PhpUnit] Display the stack trace of a deprecation on-demand

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

This PR has been essential into making #16708, and I think everyone working on a 3.0 migration will need this.

Example:

```
$ SYMFONY_DEPRECATIONS_HELPER=/FormExtensionBootstrap3LayoutTest/ ./phpunit src/Symfony/Bridge/Twig/
PHPUnit 4.8.18 by Sebastian Bergmann and contributors.

Testing src/Symfony/Bridge/Twig/
................................................
Remaining deprecation triggered by Symfony\Bridge\Twig\Tests\Extension\FormExtensionBootstrap3LayoutTest::testSingleChoiceGrouped:
The value "false" for the "choices_as_values" option is deprecated since version 2.8 and will not be supported anymore in 3.0. Set this option to "true" and flip the contents of the "choices" option instead.
Stack trace:
#0 src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php(286): trigger_error()
#1 src/Symfony/Component/OptionsResolver/OptionsResolver.php(962): Symfony\Component\Form\Extension\Core\Type\ChoiceType->Symfony\Component\Form\Extension\Core\Type\{closure}()
#2 src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php(277): Symfony\Component\OptionsResolver\OptionsResolver->offsetGet()
#3 src/Symfony/Component/OptionsResolver/OptionsResolver.php(962): Symfony\Component\Form\Extension\Core\Type\ChoiceType->Symfony\Component\Form\Extension\Core\Type\{closure}()
#4 src/Symfony/Component/OptionsResolver/OptionsResolver.php(791): Symfony\Component\OptionsResolver\OptionsResolver->offsetGet()
#5 src/Symfony/Component/Form/ResolvedFormType.php(156): Symfony\Component\OptionsResolver\OptionsResolver->resolve()
#6 src/Symfony/Component/Form/FormFactory.php(119): Symfony\Component\Form\ResolvedFormType->createBuilder()
#7 src/Symfony/Component/Form/FormFactory.php(48): Symfony\Component\Form\FormFactory->createNamedBuilder()
#8 src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php(540): Symfony\Component\Form\FormFactory->createNamed()
#9 [internal function]: Symfony\Component\Form\Tests\AbstractBootstrap3LayoutTest->testSingleChoiceGrouped()
#10 {main}
KO src/Symfony/Bridge/Twig/
```

Commits
-------

5a88fb6 [Bridge\PhpUnit] Display the stack trace of a deprecation on-demand
fabpot added a commit that referenced this pull request Jun 23, 2016
… lyrixx)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[Workflow] Introducing the workflow component

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

TODO:

* [x] Add tests
* [x] Add PHP doc
* [x] Add Symfony fullstack integration (Config, DIC, command to dump the state-machine into graphiz format)

So why another component?

This component take another approach that what you can find on [Packagist](https://packagist.org/search/?q=state%20machine).

Here, the workflow component is not tied to a specific object like with [Finite](https://github.com/yohang/Finite). It means that the component workflow is stateless and can be a symfony service.

Some code:

```php
#!/usr/bin/env php
<?php

require __DIR__.'/vendor/autoload.php';

use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\Workflow\Definition;
use Symfony\Component\Workflow\Dumper\GraphvizDumper;
use Symfony\Component\Workflow\Marking;
use Symfony\Component\Workflow\MarkingStore\PropertyAccessorMarkingStore;
use Symfony\Component\Workflow\MarkingStore\ScalarMarkingStore;
use Symfony\Component\Workflow\Transition;
use Symfony\Component\Workflow\Workflow;

class Foo
{
    public $marking;

    public function __construct($init = 'a')
    {
        $this->marking = $init;
        $this->marking = [$init => true];
    }
}

$fooDefinition = new Definition(Foo::class);
$fooDefinition->addPlaces([
    'a', 'b', 'c', 'd', 'e', 'f', 'g',
]);

//                                           name  from        to
$fooDefinition->addTransition(new Transition('t1', 'a',        ['b', 'c']));
$fooDefinition->addTransition(new Transition('t2', ['b', 'c'],  'd'));
$fooDefinition->addTransition(new Transition('t3', 'd',         'e'));
$fooDefinition->addTransition(new Transition('t4', 'd',         'f'));
$fooDefinition->addTransition(new Transition('t5', 'e',         'g'));
$fooDefinition->addTransition(new Transition('t6', 'f',         'g'));

$graph = (new GraphvizDumper())->dump($fooDefinition);

$ed = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch(), new \Monolog\Logger('app'));

// $workflow = new Workflow($fooDefinition, new ScalarMarkingStore(), $ed);
$workflow = new Workflow($fooDefinition, new PropertyAccessorMarkingStore(), $ed);

$foo = new Foo(isset($argv[1]) ? $argv[1] : 'a');

$graph = (new GraphvizDumper())->dump($fooDefinition, $workflow->getMarking($foo));

dump([
    'AvailableTransitions' => $workflow->getAvailableTransitions($foo),
    'CurrentMarking' => clone $workflow->getMarking($foo),
    'can validate t1' => $workflow->can($foo, 't1'),
    'can validate t3' => $workflow->can($foo, 't3'),
    'can validate t6' => $workflow->can($foo, 't6'),
    'apply t1' => clone $workflow->apply($foo, 't1'),
    'can validate t2' => $workflow->can($foo, 't2'),
    'apply t2' => clone $workflow->apply($foo, 't2'),
    'can validate t1 bis' => $workflow->can($foo, 't1'),
    'can validate t3 bis' => $workflow->can($foo, 't3'),
    'can validate t6 bis' => $workflow->can($foo, 't6'),
]);

```

The workflown:

![workflow](https://cloud.githubusercontent.com/assets/408368/14183999/4a43483c-f773-11e5-9c8b-7f157e0cb75f.png)

The output:

```
array:10 [
  "AvailableTransitions" => array:1 [
    0 => Symfony\Component\Workflow\Transition {#4
      -name: "t1"
      -froms: array:1 [
        0 => "a"
      ]
      -tos: array:2 [
        0 => "b"
        1 => "c"
      ]
    }
  ]
  "CurrentMarking" => Symfony\Component\Workflow\Marking {#19
    -places: array:1 [
      "a" => true
    ]
  }
  "can validate t1" => true
  "can validate t3" => false
  "can validate t6" => false
  "apply t1" => Symfony\Component\Workflow\Marking {#22
    -places: array:2 [
      "b" => true
      "c" => true
    ]
  }
  "apply t2" => Symfony\Component\Workflow\Marking {#47
    -places: array:1 [
      "d" => true
    ]
  }
  "can validate t1 bis" => false
  "can validate t3 bis" => true
  "can validate t6 bis" => false
]
```

Commits
-------

078e27f [Workflow] Added initial set of files
17d59a7 added the first more-or-less working version of the Workflow component
fabpot added a commit that referenced this pull request Jan 22, 2017
…utowired classes (brainexe)

This PR was squashed before being merged into the 3.1 branch (closes #21372).

Discussion
----------

[DependencyInjection] Fixed variadic method parameter in autowired classes

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

Autowiring classes containing methods with variadic method parameter throws a ReflectionException in compile process:

```
PHP Fatal error:  Uncaught ReflectionException: Internal error: Failed to retrieve the default value in /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php:437
Stack trace:
#0 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(437): ReflectionParameter->getDefaultValue()
#1 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(80): Symfony\Component\DependencyInjection\Compiler\AutowirePass::getResourceMetadataForMethod(Object(ReflectionMethod))
#2 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(105): Symfony\Component\DependencyInjection\Compiler\AutowirePass::createResourceForClass(Object(ReflectionClass))
#3 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(48): Symfony\Component\DependencyInjection\Compiler\AutowirePass->completeDefinition('__controller.Sw...', Object(Symfony\Component\DependencyInjection\Definition), Array)
#4 /.../vendor/symfony/dependency-injection/Compiler/Compiler in /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php on line 437
```

**Example:**
```
<?php
class FooVariadic
{
    public function bar(...$arguments)
    {
    }
}

$method = new ReflectionMethod(FooVariadic::class, 'bar');
$parameter = $method->getParameters()[0];
$parameter->getDefaultValue(); // -> ReflectionException: Internal error: Failed to retrieve the default value in ...
```

Commits
-------

a7f63de [DependencyInjection] Fixed variadic method parameter in autowired classes
fabpot added a commit that referenced this pull request Jun 6, 2017
…nel (yceruto)

This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Show unique Inherited roles in profile panel

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

When more than one assigned role reaches the same inherited role then it's duplicated in the "Inherited roles" list.

The changes in the test case show the unexpected result before fix it:

```console
There was 1 failure:

1) Symfony\Bundle\SecurityBundle\Tests\DataCollector\SecurityDataCollectorTest::testCollectAuthenticationTokenAndRoles with data set #4 (array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'))
Failed asserting that Array &0 (
    0 => 'ROLE_USER'
    1 => 'ROLE_ALLOWED_TO_SWITCH'
    2 => 'ROLE_USER'
) is identical to Array &0 (
    0 => 'ROLE_USER'
    1 => 'ROLE_ALLOWED_TO_SWITCH'
)
```

Commits
-------

7061bfb show unique inherited roles
fabpot added a commit that referenced this pull request Jan 24, 2018
This PR was merged into the 3.3 branch.

Discussion
----------

Restore RoleInterface import

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| License       | MIT

The import is use on PHPDoc but was accidentally removed. Maybe because PHPStorm does not match with the import when you use parenthesis.

Not really a bug as it is concerning only PHPDoc, but it make some analysis tools like PHPStan yelling:

```
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   src/AppBundle/Security/Authentication/ApiKeyAuthenticator.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  64     Parameter #4 $roles of class Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken constructor expects array<string|Symfony\Component\Security\Core\Authentication\Token\RoleInterface>, array<string|Symfony\Component\Security\Core\Role\Role>
         given.
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   tests/AppBundle/Controller/WebTestCase.php
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  59     Parameter #4 $roles of class Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken constructor expects array<string|Symfony\Component\Security\Core\Authentication\Token\RoleInterface>, array<string|Symfony\Component\Security\Core\Role\Role>
         given.
 ------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```

Commits
-------

8ecfeb1 Restore RoleInterface import
xabbuh added a commit that referenced this pull request Sep 30, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] conflict with VarDumper < 4.4

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

While trying FrameworkBundle 4.4.x-dev I noticed that I was still using VarDumper 4.3 which leads to this error:

```
> app/console cache:clear

Fatal error: Uncaught Symfony\Component\ErrorHandler\Exception\ClassNotFoundException: Attempted to load class "ContextualizedDumper" from namespace "Symfony\Component\VarDumper\Dumper".
Did you forget a "use" statement for another namespace? in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php:13
Stack trace:
#0 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(1357): require()
#1 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(2282): ContainerB7mbdCh\appAppKernelDevDebugContainer->load('getDebug_DumpLi...')
#2 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(275): ContainerB7mbdCh\appAppKernelDevDebugContainer->ContainerB7mbdCh\{closure}()
#3 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(90): Symfony\Component\EventDispatcher\EventDispatcher->sortListeners('console.command')
#4 /var/www/x in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php on line 13
PHP Fatal error:  Uncaught Symfony\Component\ErrorHandler\Exception\ClassNotFoundException: Attempted to load class "ContextualizedDumper" from namespace "Symfony\Component\VarDumper\Dumper".
Did you forget a "use" statement for another namespace? in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php:13
Stack trace:
#0 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(1357): require()
#1 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(2282): ContainerB7mbdCh\appAppKernelDevDebugContainer->load('getDebug_DumpLi...')
#2 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(275): ContainerB7mbdCh\appAppKernelDevDebugContainer->ContainerB7mbdCh\{closure}()
#3 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(90): Symfony\Component\EventDispatcher\EventDispatcher->sortListeners('console.command')
#4 /var/www/x in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php on line 13
Script app/console cache:clear handling the post-update-cmd event returned with error code 255
```
So we need to use `symfony/var-dumper >= 4.4`

Commits
-------

9b512c6 [FrameworkBundle] conflict with VarDumper < 4.4
jderusse pushed a commit to jderusse/symfony that referenced this pull request Mar 30, 2020
This PR was merged into the master branch.

Discussion
----------

SabreDAV vulnerability (CVE-2013-1939)

Commits
-------

ebd8157 Added sabre/dav security advisory (CVE-2013-1939)
chalasr pushed a commit to chalasr/symfony that referenced this pull request Sep 24, 2020
* Add Travis CI

* Enable Chrome's headless mode

* Try with --no-sandbox

* Refactor the ChromeManager, add a script to download bin

* Throw error when process is terminated.

* debug again

* debug...

* ps ax

* add exec

* Update README.md
OskarStark pushed a commit to PGLongo/symfony that referenced this pull request Dec 22, 2020
# Das ist die erste Commit-Beschreibung:

[Notifier] add support for gatewayapi-notifier

# Die Commit-Beschreibung symfony#2 wird ausgelassen:

# Make GatewayAPITransportFactory final

# Die Commit-Beschreibung symfony#3 wird ausgelassen:

# Fix typo in gatewaypi

# Die Commit-Beschreibung symfony#4 wird ausgelassen:

# Fix typo

# Die Commit-Beschreibung symfony#5 wird ausgelassen:

# Update README.md

# Die Commit-Beschreibung symfony#6 wird ausgelassen:

# Rename GatewayAPI -> GatewayApi

# Die Commit-Beschreibung symfony#7 wird ausgelassen:

# Add GatewayApiTransportFactory tests

# Die Commit-Beschreibung symfony#8 wird ausgelassen:

# Add GatewayApiTransportTest testSend

# Die Commit-Beschreibung symfony#9 wird ausgelassen:

# Add GatewayApiTransportTest testSupportsSmsMessage

# Die Commit-Beschreibung symfony#10 wird ausgelassen:

# Add GatewayApiTransportTest testNotSupportsChatMessage

# Die Commit-Beschreibung symfony#11 wird ausgelassen:

# Lint code

# Die Commit-Beschreibung symfony#12 wird ausgelassen:

# Fix name and email in composer.json
#
# Co-authored-by: Tobias Nyholm <tobias.nyholm@gmail.com>

# Die Commit-Beschreibung symfony#13 wird ausgelassen:

# Remove extra from composer.json

# Die Commit-Beschreibung symfony#14 wird ausgelassen:

# Update version tag in GatewayApiTransport

# Die Commit-Beschreibung symfony#15 wird ausgelassen:

# Add /.gitattributes export-ignore in .gitattributes

# Die Commit-Beschreibung symfony#16 wird ausgelassen:

# Update UnsupportedSchemeException

# Die Commit-Beschreibung symfony#17 wird ausgelassen:

# Add required space in phpdoc

# Die Commit-Beschreibung symfony#18 wird ausgelassen:

# Update GatewayApiTransportFactory.php
#
# Update version tag in GatewayApiTransportFactory

# Die Commit-Beschreibung symfony#19 wird ausgelassen:

# [Notifier] add support for gatewayapi-notifier

# Die Commit-Beschreibung symfony#20 wird ausgelassen:

# Make GatewayAPITransportFactory final

# Die Commit-Beschreibung symfony#21 wird ausgelassen:

# Make GatewayAPITransportFactory final

# Die Commit-Beschreibung symfony#22 wird ausgelassen:

# Fix typo in gatewaypi

# Die Commit-Beschreibung symfony#23 wird ausgelassen:

# Fix typo

# Die Commit-Beschreibung symfony#24 wird ausgelassen:

# Update README.md
wouterj added a commit that referenced this pull request Feb 19, 2021
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security] Added debug:firewall command

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #39321
| License       | MIT
| Doc PR        | symfony/symfony-docs#14982
| Tags | #SymfonyHackday

### Subtasks
- [x] Add list view (for use without arguments)
- [x] Add more information to list view
- [x] Add detail view (for use with `firewall` argument)
- [x] Add more information to detail view table
- [x] Add authenticators list
- [x] Add event listeners & events (copy from `debug:event-listener`)
- [x] Add `--include-listeners` option (default: false)
- [x] Add helptext
- [x] Add documentation

### Moved outside of current scope
- Add allowed badges

### Usage (and example output) for a list
`bin/console debug:firewall`

```
Firewalls
=========

 The following firewalls are defined:
 --------
  Name
 --------
  dev
  public
  main
 --------

 // To view details of a specific firewall, re-run this command with a firewall name. (e.g. debug:firewall
 // main)
```

### Usage (and example output) for details
`bin/console debug:firewall main`

```
Firewall "main"
===============

 ----------------------- ---------------------------------------------------
  Option                  Value
 ----------------------- ---------------------------------------------------
  Name                    main
  Context                 main
  Lazy                    Yes
  Stateless               No
  User Checker            security.user_checker
  Provider                security.user.provider.concrete.app_user_provider
  Entry Point             App\Security\LoginFormAuthenticator
  Access Denied URL
  Access Denied Handler
 ----------------------- ---------------------------------------------------

User switching
--------------

 ----------- ---------------------------------------------------
  Option      Value
 ----------- ---------------------------------------------------
  Parameter   test
  Provider    security.user.provider.concrete.app_user_provider
  User Role   ROLE_SWITCH_POSSIBLE
 ----------- ---------------------------------------------------

Event listeners for firewall "main"
===================================

"Symfony\Component\Security\Http\Event\LoginSuccessEvent" event
---------------------------------------------------------------

 ------- -------------------------------------------------------------------------------------------- ----------
  Order   Callable                                                                                     Priority
 ------- -------------------------------------------------------------------------------------------- ----------
  #1      Symfony\Component\Security\Http\EventListener\UserCheckerListener::postCheckCredentials()    256
  #2      Symfony\Component\Security\Http\EventListener\SessionStrategyListener::onSuccessfulLogin()   0
  #3      Symfony\Component\Security\Http\EventListener\RememberMeListener::onSuccessfulLogin()        0
  #4      App\Security\UpdateLastLogin::__invoke()                                                     0
  #5      Symfony\Component\Security\Http\EventListener\PasswordMigratingListener::onLoginSuccess()    0
 ------- -------------------------------------------------------------------------------------------- ----------

"Symfony\Component\Security\Http\Event\LogoutEvent" event
---------------------------------------------------------

 ------- ------------------------------------------------------------------------------------------- ----------
  Order   Callable                                                                                    Priority
 ------- ------------------------------------------------------------------------------------------- ----------
  #1      Symfony\Component\Security\Http\EventListener\DefaultLogoutListener::onLogout()             64
  #2      Symfony\Component\Security\Http\EventListener\SessionLogoutListener::onLogout()             0
  #3      Symfony\Component\Security\Http\EventListener\RememberMeLogoutListener::onLogout()          0
  #4      Symfony\Component\Security\Http\EventListener\CsrfTokenClearingLogoutListener::onLogout()   0
 ------- ------------------------------------------------------------------------------------------- ----------

"Symfony\Component\Security\Http\Event\CheckPassportEvent" event
----------------------------------------------------------------

 ------- ------------------------------------------------------------------------------------------ ----------
  Order   Callable                                                                                   Priority
 ------- ------------------------------------------------------------------------------------------ ----------
  #1      Symfony\Component\Security\Http\EventListener\LoginThrottlingListener::checkPassport()     2080
  #2      Symfony\Component\Security\Http\EventListener\UserProviderListener::checkPassport()        2048
  #3      Symfony\Component\Security\Http\EventListener\UserProviderListener::checkPassport()        1024
  #4      Symfony\Component\Security\Http\EventListener\CsrfProtectionListener::checkPassport()      512
  #5      Symfony\Component\Security\Http\EventListener\UserCheckerListener::preCheckCredentials()   256
  #6      App\Security\DisallowBannedUsers::__invoke()                                               0
  #7      Symfony\Component\Security\Http\EventListener\CheckCredentialsListener::checkPassport()    0
 ------- ------------------------------------------------------------------------------------------ ----------

"Symfony\Component\Security\Http\Event\LoginFailureEvent" event
---------------------------------------------------------------

 ------- ----------------------------------------------------------------------------------- ----------
  Order   Callable                                                                            Priority
 ------- ----------------------------------------------------------------------------------- ----------
  #1      Symfony\Component\Security\Http\EventListener\RememberMeListener::onFailedLogin()   0
 ------- ----------------------------------------------------------------------------------- ----------

Authenticators for firewall "main"
==================================

 // @todo: List authenticator information

```

Commits
-------

a9dea1d [Security] Added debug:firewall command
@remco-pc remco-pc mentioned this pull request Jun 16, 2023
fabpot added a commit that referenced this pull request Dec 9, 2023
… in PHPUnit (cafferata)

This PR was merged into the 5.4 branch.

Discussion
----------

[Mailer] Stop using the (local) AWS shared configuration in PHPUnit

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Replaces #52958

Found an (other) way to stop using the (local) [AWS shared configuration](https://async-aws.com/authentication/credentials-file.html) in the Composer package [async-aws/core](https://github.com/async-aws/core) in the PHPUnit tests. 🥳

_This was an great Symfony hackday pair session with `@TmEuMail`-2020._

Also big shout out to `@xabbuh` and `@OskarStark` for the heads up in the right direction! 👍

```shell
./phpunit src/Symfony/Component/Mailer
```

**Before**

<details>
    <summary>PHPUnit output</summary>

```shell
PHPUnit 9.6.15 by Sebastian Bergmann and contributors.

Testing /symfony/symfony/src/Symfony/Component/Mailer
F...F...F.F...F...F............................................  63 / 495 ( 12%)
............................................................... 126 / 495 ( 25%)
............................................................... 189 / 495 ( 38%)
............................................................... 252 / 495 ( 50%)
............................................................... 315 / 495 ( 63%)
............................................................... 378 / 495 ( 76%)
.......................................SSS...SS.............S.. 441 / 495 ( 89%)
..................SS..................................          495 / 495 (100%)

Time: 00:02.082, Memory: 24.00 MB

There were 6 failures:

1) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesApiAsyncAwsTransportTest::testToString with data set #0 (Symfony\Component\Mailer\Bridge\Amazon\Transport\SesApiAsyncAwsTransport Object (...), 'ses+api://ACCESS_KEY@us-east-1')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'ses+api://ACCESS_KEY@us-east-1'
+'ses+api://ACCESS_KEY@eu-west-1'

/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php:34

2) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesApiAsyncAwsTransportTest::testToString with data set #4 (Symfony\Component\Mailer\Bridge\Amazon\Transport\SesApiAsyncAwsTransport Object (...), 'ses+api://ACCESS_KEY@us-east-1')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'ses+api://ACCESS_KEY@us-east-1'
+'ses+api://ACCESS_KEY@eu-west-1'

/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php:34

3) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesApiAsyncAwsTransportTest::testSend
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'https://email.us-east-1.amazonaws.com/v2/email/outbound-emails'
+'https://email.eu-west-1.amazonaws.com/v2/email/outbound-emails'

/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php:79
/symfony/symfony/src/Symfony/Component/HttpClient/MockHttpClient.php:70
/symfony/symfony/vendor/async-aws/core/src/AbstractApi.php:161
/symfony/symfony/vendor/async-aws/ses/src/SesClient.php:67
/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpAsyncAwsTransport.php:55
/symfony/symfony/src/Symfony/Component/Mailer/Transport/AbstractTransport.php:69
/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php:119

4) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesHttpAsyncAwsTransportTest::testToString with data set #0 (Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpAsyncAwsTransport Object (...), 'ses+https://ACCESS_KEY@us-east-1')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'ses+https://ACCESS_KEY@us-east-1'
+'ses+https://ACCESS_KEY@eu-west-1'

/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php:34

5) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesHttpAsyncAwsTransportTest::testToString with data set #4 (Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpAsyncAwsTransport Object (...), 'ses+https://ACCESS_KEY@us-east-1')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'ses+https://ACCESS_KEY@us-east-1'
+'ses+https://ACCESS_KEY@eu-west-1'

/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php:34

6) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesHttpAsyncAwsTransportTest::testSend
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'https://email.us-east-1.amazonaws.com/v2/email/outbound-emails'
+'https://email.eu-west-1.amazonaws.com/v2/email/outbound-emails'

/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php:79
/symfony/symfony/src/Symfony/Component/HttpClient/MockHttpClient.php:70
/symfony/symfony/vendor/async-aws/core/src/AbstractApi.php:161
/symfony/symfony/vendor/async-aws/ses/src/SesClient.php:67
/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpAsyncAwsTransport.php:55
/symfony/symfony/src/Symfony/Component/Mailer/Transport/AbstractTransport.php:69
/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php:112

FAILURES!
Tests: 495, Assertions: 923, Failures: 6, Skipped: 8.
```

</details>

**After**

<details>
    <summary>PHPUnit output</summary>

```shell
PHPUnit 9.6.15 by Sebastian Bergmann and contributors.

Testing /symfony/symfony/src/Symfony/Component/Mailer
...............................................................  63 / 495 ( 12%)
............................................................... 126 / 495 ( 25%)
............................................................... 189 / 495 ( 38%)
............................................................... 252 / 495 ( 50%)
............................................................... 315 / 495 ( 63%)
............................................................... 378 / 495 ( 76%)
.......................................SSS...SS.............S.. 441 / 495 ( 89%)
..................SS..................................          495 / 495 (100%)

Time: 00:02.387, Memory: 24.00 MB

OK, but incomplete, skipped, or risky tests!
Tests: 495, Assertions: 943, Skipped: 8.
```

</details>

Commits
-------

b156c33 [Mailer] Stop using the (local) AWS shared configuration in the PHPUnit tests.
nicolas-grekas added a commit that referenced this pull request Jan 29, 2024
…om socket (xdanik)

This PR was merged into the 5.4 branch.

Discussion
----------

[Mailer] Throw `TransportException` when unable to read from socket

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? |no
| Issues        | None
| License       | MIT

We are seeing error `fgets(): SSL: Connection reset by peer` multiple times a day from connection to Office 365 SMTP server (smtp.office365.com:587).
It's certainly related to some kind of timeout as we are sending emails from long running queue dispatcher and error shows up only occasionally and never with the first message. We are not seeing this issue with any other SMTP server, but we have not tested much past smtp.mandrillapp.com and local MailHog.

We have tried adjusting the `$pingThreshold` and `$restartThreshold` options, but without much success (well `$restartThreshold = 1` resolves the issue, but it also forces the transport to close connection after each message).

Stack trace:
```
#0 /var/www/vendor/symfony/mailer/Transport/Smtp/Stream/AbstractStream.php(77): fgets(Resource(stream))
#1 /var/www/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(315): Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream->readLine()
#2 /var/www/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(181): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->getFullResponse()
#3 /var/www/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(140): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->executeCommand("RSET
", Array(1))
#4 /var/www/vendor/symfony/mailer/Mailer.php(45): Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->send(Object(Symfony\Component\Mime\Email), Null)
#5 (our queue dispatcher): Symfony\Component\Mailer\Mailer->send(Object(Symfony\Component\Mime\Email))
```

App is running on PHP 8.0.28 on Debian Linux x64, Mailer v5.4.22.

I would gladly written some tests for this, but I don't know how to simulate calls to low-level stream functions like fgets.

Commits
-------

44d5b57 [Mailer] Throw TransportException when unable to read from socket
chalasr added a commit that referenced this pull request Mar 5, 2024
…lishing a message. (jwage)

This PR was squashed before being merged into the 6.4 branch.

Discussion
----------

[Messenger] [Amqp] Handle AMQPConnectionException when publishing a message.

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #36538 Fix #48241
| License       | MIT

If you have a message handler that dispatches messages to another queue, you can encounter `AMQPConnectionException` with the message "Library error: a SSL error occurred" or "a socket error occurred"  depending on if you are using tls or not or if you are running behind a load balancer or not.

You can manually reproduce this issue by dispatching a message where the handler then dispatches another message to a different queue, then go to rabbitmq admin and close the connection manually, then dispatch another message and when the message handler goes to dispatch the other message, you will get this exception:

```
a socket error occurred
#0 /vagrant/vendor/symfony/amqp-messenger/Transport/AmqpTransport.php(60): Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpSender->send()
#1 /vagrant/vendor/symfony/messenger/Middleware/SendMessageMiddleware.php(62): Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransport->send()
#2 /vagrant/vendor/symfony/messenger/Middleware/FailedMessageProcessingMiddleware.php(34): Symfony\Component\Messenger\Middleware\SendMessageMiddleware->handle()
#3 /vagrant/vendor/symfony/messenger/Middleware/DispatchAfterCurrentBusMiddleware.php(61): Symfony\Component\Messenger\Middleware\FailedMessageProcessingMiddleware->handle()
#4 /vagrant/vendor/symfony/messenger/Middleware/RejectRedeliveredMessageMiddleware.php(41): Symfony\Component\Messenger\Middleware\DispatchAfterCurrentBusMiddleware->handle()
#5 /vagrant/vendor/symfony/messenger/Middleware/AddBusNameStampMiddleware.php(37): Symfony\Component\Messenger\Middleware\RejectRedeliveredMessageMiddleware->handle()
#6 /vagrant/vendor/symfony/messenger/Middleware/TraceableMiddleware.php(40): Symfony\Component\Messenger\Middleware\AddBusNameStampMiddleware->handle()
#7 /vagrant/vendor/symfony/messenger/MessageBus.php(70): Symfony\Component\Messenger\Middleware\TraceableMiddleware->handle()
#8 /vagrant/vendor/symfony/messenger/TraceableMessageBus.php(38): Symfony\Component\Messenger\MessageBus->dispatch()
#9 /vagrant/src/Messenger/MessageBus.php(37): Symfony\Component\Messenger\TraceableMessageBus->dispatch()
#10 /vagrant/vendor/symfony/mailer/Mailer.php(66): App\Messenger\MessageBus->dispatch()
#11 /vagrant/src/Mailer/Mailer.php(83): Symfony\Component\Mailer\Mailer->send()
#12 /vagrant/src/Mailer/Mailer.php(96): App\Mailer\Mailer->send()
#13 /vagrant/src/MessageHandler/Trading/StrategySubscriptionMessageHandler.php(118): App\Mailer\Mailer->sendEmail()
#14 /vagrant/src/MessageHandler/Trading/StrategySubscriptionMessageHandler.php(72): App\MessageHandler\Trading\StrategySubscriptionMessageHandler->handle()
#15 /vagrant/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php(152): App\MessageHandler\Trading\StrategySubscriptionMessageHandler->__invoke()
#16 /vagrant/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php(91): Symfony\Component\Messenger\Middleware\HandleMessageMiddleware->callHandler()
#17 /vagrant/vendor/symfony/messenger/Middleware/SendMessageMiddleware.php(71): Symfony\Component\Messenger\Middleware\HandleMessageMiddleware->handle()
#18 /vagrant/vendor/symfony/messenger/Middleware/FailedMessageProcessingMiddleware.php(34): Symfony\Component\Messenger\Middleware\SendMessageMiddleware->handle()
#19 /vagrant/vendor/symfony/messenger/Middleware/DispatchAfterCurrentBusMiddleware.php(68): Symfony\Component\Messenger\Middleware\FailedMessageProcessingMiddleware->handle()
#20 /vagrant/vendor/symfony/messenger/Middleware/RejectRedeliveredMessageMiddleware.php(41): Symfony\Component\Messenger\Middleware\DispatchAfterCurrentBusMiddleware->handle()
#21 /vagrant/vendor/symfony/messenger/Middleware/AddBusNameStampMiddleware.php(37): Symfony\Component\Messenger\Middleware\RejectRedeliveredMessageMiddleware->handle()
#22 /vagrant/vendor/symfony/messenger/Middleware/TraceableMiddleware.php(40): Symfony\Component\Messenger\Middleware\AddBusNameStampMiddleware->handle()
#23 /vagrant/vendor/symfony/messenger/MessageBus.php(70): Symfony\Component\Messenger\Middleware\TraceableMiddleware->handle()
#24 /vagrant/vendor/symfony/messenger/TraceableMessageBus.php(38): Symfony\Component\Messenger\MessageBus->dispatch()
#25 /vagrant/vendor/symfony/messenger/RoutableMessageBus.php(54): Symfony\Component\Messenger\TraceableMessageBus->dispatch()
#26 /vagrant/vendor/symfony/messenger/Worker.php(162): Symfony\Component\Messenger\RoutableMessageBus->dispatch()
#27 /vagrant/vendor/symfony/messenger/Worker.php(109): Symfony\Component\Messenger\Worker->handleMessage()
#28 /vagrant/vendor/symfony/messenger/Command/ConsumeMessagesCommand.php(238): Symfony\Component\Messenger\Worker->run()
#29 /vagrant/vendor/symfony/console/Command/Command.php(326): Symfony\Component\Messenger\Command\ConsumeMessagesCommand->execute()
#30 /vagrant/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()
#31 /vagrant/vendor/symfony/framework-bundle/Console/Application.php(126): Symfony\Component\Console\Application->doRunCommand()
#32 /vagrant/vendor/symfony/console/Application.php(324): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand()
#33 /vagrant/vendor/symfony/framework-bundle/Console/Application.php(80): Symfony\Component\Console\Application->doRun()
#34 /vagrant/vendor/symfony/console/Application.php(175): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()
#35 /vagrant/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php(49): Symfony\Component\Console\Application->run()
#36 /vagrant/vendor/autoload_runtime.php(29): Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run()
#37 /vagrant/bin/console(11): require_once('...')
#38 {main}
```

TODO:

- [x] Add test for retry logic when publishing messages

Commits
-------

f123370 [Messenger] [Amqp] Handle AMQPConnectionException when publishing a message.
xabbuh added a commit that referenced this pull request Aug 12, 2024
This PR was merged into the 5.4 branch.

Discussion
----------

[Yaml] 🐛 throw ParseException on invalid date

| Q             | A
| ------------- | ---
| Branch?       | 5.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Issues        | None <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT

(found in symfony-tools/docs-builder#179)

When parsing the following yaml:
```
date: 6418-75-51
```

`symfony/yaml` will throw an exception:
```
$ php main.php
PHP Fatal error:  Uncaught Exception: Failed to parse time string (6418-75-51) at position 6 (5): Unexpected character in /tmp/symfony-yaml/vendor/symfony/yaml/Inline.php:714
Stack trace:
#0 /tmp/symfony-yaml/vendor/symfony/yaml/Inline.php(714): DateTimeImmutable->__construct()
#1 /tmp/symfony-yaml/vendor/symfony/yaml/Inline.php(312): Symfony\Component\Yaml\Inline::evaluateScalar()
#2 /tmp/symfony-yaml/vendor/symfony/yaml/Inline.php(80): Symfony\Component\Yaml\Inline::parseScalar()
#3 /tmp/symfony-yaml/vendor/symfony/yaml/Parser.php(790): Symfony\Component\Yaml\Inline::parse()
#4 /tmp/symfony-yaml/vendor/symfony/yaml/Parser.php(341): Symfony\Component\Yaml\Parser->parseValue()
#5 /tmp/symfony-yaml/vendor/symfony/yaml/Parser.php(86): Symfony\Component\Yaml\Parser->doParse()
#6 /tmp/symfony-yaml/vendor/symfony/yaml/Yaml.php(77): Symfony\Component\Yaml\Parser->parse()
#7 /tmp/symfony-yaml/main.php(8): Symfony\Component\Yaml\Yaml::parse()
#8 {main}
  thrown in /tmp/symfony-yaml/vendor/symfony/yaml/Inline.php on line 714
```

This is because the "month" is invalid. Fixing the "month" will trigger about the same issue because the "day" would be invalid.

With the current change it will throw a `ParseException`.

Commits
-------

6d71a7e 🐛 throw ParseException on invalid date
nicolas-grekas added a commit that referenced this pull request Nov 20, 2024
…row exception (lyrixx)

This PR was merged into the 5.4 branch.

Discussion
----------

[HttpKernel] Ensure `HttpCache::getTraceKey()` does not throw exception

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

We have such logs in our logs. It's in our raw PHP logs. They are not caught by monolog, it's too early

```
[11-Oct-2024 01:23:33 UTC] PHP Fatal error:  Uncaught Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException: Invalid method override "__CONSTRUCT". in /var/www/redirection.io/backend/blue/vendor/symfony/http-foundation/Request.php:1234
Stack trace:
#0 /var/www/redirection.io/backend/blue/vendor/symfony/http-kernel/HttpCache/HttpCache.php(728): Symfony\Component\HttpFoundation\Request->getMethod()
#1 /var/www/redirection.io/backend/blue/vendor/symfony/http-kernel/HttpCache/HttpCache.php(207): Symfony\Component\HttpKernel\HttpCache\HttpCache->getTraceKey()
#2 /var/www/redirection.io/backend/blue/vendor/symfony/http-kernel/Kernel.php(188): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
#3 /var/www/redirection.io/backend/blue/web/app.php(9): Symfony\Component\HttpKernel\Kernel->handle()
#4 {main}
  thrown in /var/www/redirection.io/backend/blue/vendor/symfony/http-foundation/Request.php on line 1234

```

I managed to reproduced locally.
* Before the patch, without the http_cache, symfony returns a 405
* After the patch, without the http_cache, symfony returns a 405
* Before the patch, with the http_cache, symfony returns a 500, without any information (too early)
* After the patch, with the http_cache, symfony returns a 405

Commits
-------

a2ebbe0 [HttpKernel] Ensure HttpCache::getTraceKey() does not throw exception
Spomky added a commit to Spomky/symfony that referenced this pull request Feb 20, 2025
…cryption

Add PgpTestingProcess for testing encryption and signing
stobrien89 pushed a commit to stobrien89/symfony that referenced this pull request Feb 27, 2025
Ensure compatibility with original 1.0.0 packages to avoid breaking installations
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant