8000 Merge branch '6.4' into 7.0 · symfony/symfony@6ba114b · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ba114b

Browse files
Merge branch '6.4' into 7.0
* 6.4: (33 commits) [Console][FrameworkBundle][HttpKernel][WebProfilerBundle] Enable profiling commands [AssetMapper] Disable profiler when the "dev server" respond Adds translations for Portuguese (pt) [AssetMapper] Link needs as="style" Allow Symfony 7.0 on Phrase translation provider [Mime] Throw InvalidArgumentException on invalid form field type inside array [Mailer][Bridges] Allow Symfony 7 [Tests] Use `JsonMockResponse` where applicable [FrameworkBundle][HttpKernel] Introduce `$buildDir` argument to `WarmableInterface::warmup` to warm read-only artefacts in `build_dir` [ErrorHandler] Fix expected missing return types [Form] Fix merging params & files when "multiple" is enabled [HttpFoundation] Do not swallow trailing `=` in cookie value Fix markdown in README files Handle Sendinblue error responses without a message key Handle Brevo error responses without a message key [Scheduler] Add failureEvent [Notifier][Bridges] Allow Symfony 7 [Mailer][Brevo][Sendinblue] Fix typo [Serializer] Fix collecting only first missing constructor argument [ErrorHandler] Fix file link format call in trace view ...
2 parents 5bc27f4 + 814bcac commit 6ba114b<
8000
/span>

File tree

189 files changed

+3859
-1657
lines changed
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    189 files changed

    +3859
    -1657
    lines changed

    UPGRADE-7.0.md

    Lines changed: 3 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -285,12 +285,15 @@ HttpKernel
    285285
    ----------
    286286

    287287
    * Add parameter `\ReflectionFunctionAbstract $reflector = null` to `ArgumentResolverInterface::getArguments()` and `ArgumentMetadataFactoryInterface::createArgumentMetadata()`
    288+
    * Add argument `$buildDir` to `WarmableInterface`
    288289
    * Remove `ArgumentValueResolverInterface`, use `ValueResolverInterface` instead
    289290
    * Remove `StreamedResponseListener`
    290291
    * Remove `AbstractSurrogate::$phpEscapeMap`
    291292
    * Rename `HttpKernelInterface::MASTER_REQUEST` to `HttpKernelInterface::MAIN_REQUEST`
    292293
    * Remove `terminate_on_cache_hit` option from `HttpCache`, it will now always act as `false`
    293294
    * Require explicit argument when calling `ConfigDataCollector::setKernel()`, `RouterListener::setCurrentRequest()`
    295+
    * Remove `FileLinkFormatter`, use `FileLinkFormatter` from the ErrorHandler component instead
    296+
    * Remove `UriSigner`, use `UriSigner` from the HttpFoundation component instead
    294297
    * Remove `Kernel::stripComments()`
    295298

    296299
    Lock

    src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php

    Lines changed: 1 addition & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -37,10 +37,7 @@ public function isOptional(): bool
    3737
    return false;
    3838
    }
    3939

    40-
    /**
    41-
    * @return string[] A list of files to preload on PHP 7.4+
    42-
    */
    43-
    public function warmUp(string $cacheDir): array
    40+
    public function warmUp(string $cacheDir, string $buildDir = null): array
    4441
    {
    4542
    $files = [];
    4643
    foreach ($this->registry->getManagers() as $em) {

    src/Symfony/Bridge/Doctrine/Messenger/DoctrineOpenTransactionLoggerMiddleware.php

    Lines changed: 9 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -24,6 +24,8 @@
    2424
    */
    2525
    class DoctrineOpenTransactionLoggerMiddleware extends AbstractDoctrineMiddleware
    2626
    {
    27+
    private bool $isHandling = false;
    28+
    2729
    public function __construct(
    2830
    ManagerRegistry $managerRegistry,
    2931
    string $entityManagerName = null,
    @@ -34,6 +36,12 @@ public function __construct(
    3436

    3537
    protected function handleForManager(EntityManagerInterface $entityManager, Envelope $envelope, StackInterface $stack): Envelope
    3638
    {
    39+
    if ($this->isHandling) {
    40+
    return $stack->next()->handle($envelope, $stack);
    41+
    }
    42+
    43+
    $this->isHandling = true;
    44+
    3745
    try {
    3846
    return $stack->next()->handle($envelope, $stack);
    3947
    } finally {
    @@ -42,6 +50,7 @@ protected function handleForManager(EntityManagerInterface $entityManager, Envel
    4250
    'message' => $envelope->getMessage(),
    4351
    ]);
    4452
    }
    53+
    $this->isHandling = false;
    4554
    }
    4655
    }
    4756
    }

    src/Symfony/Bridge/Twig/Command/DebugCommand.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -22,8 +22,8 @@
    2222
    use Symfony\Component\Console\Input\InputOption;
    2323
    use Symfony\Component\Console\Output\OutputInterface;
    2424
    use Symfony\Component\Console\Style\SymfonyStyle;
    25+
    use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
    2526
    use Symfony\Component\Finder\Finder;
    26 CD8D -
    use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
    2727
    use Twig\Environment;
    2828
    use Twig\Loader\ChainLoader;
    2929
    use Twig\Loader\FilesystemLoader;

    src/Symfony/Bridge/Twig/Extension/CodeExtension.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -11,7 +11,7 @@
    1111

    1212
    namespace Symfony\Bridge\Twig\Extension;
    1313

    14-
    use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
    14+
    use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
    1515
    use Twig\Extension\AbstractExtension;
    1616
    use Twig\TwigFilter;
    1717

    src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -13,7 +13,7 @@
    1313

    1414
    use PHPUnit\Framework\TestCase;
    1515
    use Symfony\Bridge\Twig\Extension\CodeExtension;
    16-
    use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
    16+
    use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
    1717

    1818
    class CodeExtensionTest extends TestCase
    1919
    {

    src/Symfony/Bundle/DebugBundle/Resources/config/services.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -50,7 +50,7 @@
    5050
    service('debug.stopwatch')->ignoreOnInvalid(),
    5151
    service('debug.file_link_formatter')->ignoreOnInvalid(),
    5252
    param('kernel.charset'),
    53-
    service('request_stack'),
    53+
    service('.virtual_request_stack'),
    5454
    null, // var_dumper.cli_dumper or var_dumper.server_connection when debug.dump_destination is set
    5555
    ])
    5656
    ->tag('data_collector', [

    src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

    Lines changed: 3 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -55,6 +55,9 @@ CHANGELOG
    5555
    * Deprecate the `framework.asset_mapper.provider` config option
    5656
    * Add `--exclude` option to the `cache:pool:clear` command
    5757
    * Add parameters deprecations to the output of `debug:container` command
    58+
    * Change `framework.asset_mapper.importmap_polyfill` from a URL to the name of an item in the importmap
    59+
    * Provide `$buildDir` when running `CacheWarmer` to build read-only resources
    60+
    * Add the global `--profile` option to the console to enable profiling commands
    5861

    5962
    6.3
    6063
    ---

    src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php

    Lines changed: 3 additions & 6 deletions
    Original file line numberDiff line numberDiff line change
    @@ -34,16 +34,13 @@ public function isOptional(): bool
    3434
    return true;
    3535
    }
    3636

    37-
    /**
    38-
    * @return string[] A list of classes to preload on PHP 7.4+
    39-
    */
    40-
    public function warmUp(string $cacheDir): array
    37+
    public function warmUp(string $cacheDir, string $buildDir = null): array
    4138
    {
    4239
    $arrayAdapter = new ArrayAdapter();
    4340

    4441
    spl_autoload_register([ClassExistenceResource::class, 'throwOnRequiredClass']);
    4542
    try {
    46-
    if (!$this->doWarmUp($cacheDir, $arrayAdapter)) {
    43+
    if (!$this->doWarmUp($cacheDir, $arrayAdapter, $buildDir)) {
    4744
    return [];
    4845
    }
    4946
    } finally {
    @@ -80,5 +77,5 @@ final protected function ignoreAutoloadException(string $class, \Exception $exce
    8077
    /**
    8178
    * @return bool false if there is nothing to warm-up
    8279
    */
    83-
    abstract protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter): bool;
    80+
    abstract protected function doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter, string $buildDir = null): bool;
    8481
    }

    src/Symfony/Bundle/FrameworkBundle/CacheWarmer/CachePoolClearerCacheWarmer.php

    Lines changed: 1 addition & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -37,10 +37,7 @@ public function __construct(Psr6CacheClearer $poolClearer, array $pools = [])
    3737
    $this->pools = $pools;
    3838
    }
    3939

    40-
    /**
    41-
    * @return string[]
    42-
    */
    43-
    public function warmUp(string $cacheDirectory): array
    40+
    public function warmUp(string $cacheDir, string $buildDir = null): array
    4441
    {
    4542
    foreach ($this->pools as $pool) {
    4643
    if ($this->poolClearer->hasPool($pool)) {

    0 commit comments

    Comments
     (0)
    0