diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index be833bfec1a14..00a24cbcfc13c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ | Q | A | ------------- | --- -| Branch? | 7.1 for features / 5.4, 6.3, 6.4, or 7.0 for bug fixes +| Branch? | 7.1 for features / 5.4, 6.4, or 7.0 for bug fixes | Bug fix? | yes/no | New feature? | yes/no | Deprecations? | yes/no diff --git a/.github/expected-missing-return-types.diff b/.github/expected-missing-return-types.diff index 63b2d15b90800..0aee6685a711f 100644 --- a/.github/expected-missing-return-types.diff +++ b/.github/expected-missing-return-types.diff @@ -107,14 +107,14 @@ diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExt + protected function registerMappingDrivers(array $objectManager, ContainerBuilder $container): void { // configure metadata driver for each bundle based on the type of mapping files found -@@ -238,5 +238,5 @@ abstract class AbstractDoctrineExtension extends Extension +@@ -240,5 +240,5 @@ abstract class AbstractDoctrineExtension extends Extension * @throws \InvalidArgumentException */ - protected function assertValidMappingConfiguration(array $mappingConfig, string $objectManagerName) + protected function assertValidMappingConfiguration(array $mappingConfig, string $objectManagerName): void { if (!$mappingConfig['type'] || !$mappingConfig['dir'] || !$mappingConfig['prefix']) { -@@ -328,5 +328,5 @@ abstract class AbstractDoctrineExtension extends Extension +@@ -330,5 +330,5 @@ abstract class AbstractDoctrineExtension extends Extension * @throws \InvalidArgumentException in case of unknown driver type */ - protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, string $cacheName) @@ -1942,8 +1942,8 @@ diff --git a/src/Symfony/Component/Config/Exception/LoaderLoadException.php b/sr diff --git a/src/Symfony/Component/Config/FileLocator.php b/src/Symfony/Component/Config/FileLocator.php --- a/src/Symfony/Component/Config/FileLocator.php +++ b/src/Symfony/Component/Config/FileLocator.php -@@ -34,5 +34,5 @@ class FileLocator implements FileLocatorInterface - * @return string|array +@@ -36,5 +36,5 @@ class FileLocator implements FileLocatorInterface + * @psalm-return ($first is true ? string : string[]) */ - public function locate(string $name, ?string $currentPath = null, bool $first = true) + public function locate(string $name, ?string $currentPath = null, bool $first = true): string|array @@ -1952,8 +1952,8 @@ diff --git a/src/Symfony/Component/Config/FileLocator.php b/src/Symfony/Componen diff --git a/src/Symfony/Component/Config/FileLocatorInterface.php b/src/Symfony/Component/Config/FileLocatorInterface.php --- a/src/Symfony/Component/Config/FileLocatorInterface.php +++ b/src/Symfony/Component/Config/FileLocatorInterface.php -@@ -31,4 +31,4 @@ interface FileLocatorInterface - * @throws FileLocatorFileNotFoundException If a file is not found +@@ -33,4 +33,4 @@ interface FileLocatorInterface + * @psalm-return ($first is true ? string : string[]) */ - public function locate(string $name, ?string $currentPath = null, bool $first = true); + public function locate(string $name, ?string $currentPath = null, bool $first = true): string|array; @@ -3776,7 +3776,7 @@ diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByAc diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php -@@ -38,5 +38,5 @@ class ResolveBindingsPass extends AbstractRecursivePass +@@ -39,5 +39,5 @@ class ResolveBindingsPass extends AbstractRecursivePass * @return void */ - public function process(ContainerBuilder $container) @@ -4088,7 +4088,7 @@ diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/ diff --git a/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php b/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php --- a/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php +++ b/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php -@@ -71,5 +71,5 @@ class AutowiringFailedException extends RuntimeException +@@ -69,5 +69,5 @@ class AutowiringFailedException extends RuntimeException * @return string */ - public function getServiceId() @@ -7449,14 +7449,14 @@ diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Sy + public function removeCookie(string $name, ?string $path = '/', ?string $domain = null): void { $path ??= '/'; -@@ -237,5 +237,5 @@ class ResponseHeaderBag extends HeaderBag +@@ -239,5 +239,5 @@ class ResponseHeaderBag extends HeaderBag * @return void */ -- public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null) -+ public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null): void +- public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null /* , bool $partitioned = false */) ++ public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null /* , bool $partitioned = false */): void { - $this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite)); -@@ -247,5 +247,5 @@ class ResponseHeaderBag extends HeaderBag + $partitioned = 6 < \func_num_args() ? \func_get_arg(6) : false; +@@ -251,5 +251,5 @@ class ResponseHeaderBag extends HeaderBag * @return string */ - public function makeDisposition(string $disposition, string $filename, string $filenameFallback = '') diff --git a/.github/sync-translations.php b/.github/sync-translations.php index eb3f8e840ab4a..13f05d1459c86 100644 --- a/.github/sync-translations.php +++ b/.github/sync-translations.php @@ -12,7 +12,7 @@ require __DIR__.'/../vendor/autoload.php'; -function dumpXliff1(string $defaultLocale, MessageCatalogue $messages, string $domain) +function dumpXliff1(string $defaultLocale, MessageCatalogue $messages, string $domain, ?\DOMElement $header = null) { $dom = new \DOMDocument('1.0', 'utf-8'); $dom->formatOutput = true; @@ -27,6 +27,10 @@ function dumpXliff1(string $defaultLocale, MessageCatalogue $messages, string $d $xliffFile->setAttribute('datatype', 'plaintext'); $xliffFile->setAttribute('original', 'file.ext'); + if (null !== $header) { + mergeDom($dom, $xliffFile, $header); + } + $xliffBody = $xliffFile->appendChild($dom->createElement('body')); foreach ($messages->all($domain) as $source => $target) { $translation = $dom->createElement('trans-unit'); @@ -62,6 +66,24 @@ function dumpXliff1(string $defaultLocale, MessageCatalogue $messages, string $d return preg_replace('/^ +/m', '$0$0', $dom->saveXML()); } +function mergeDom(\DOMDocument $dom, \DOMNode $tree, \DOMNode $input) +{ + $new = $dom->createElement($input->tagName); + foreach ($input->attributes as $key => $value) { + $new->setAttribute($key, $value); + } + $tree->appendChild($new); + foreach ($input->childNodes as $child) { + if ($child instanceof \DOMText) { + $new->appendChild($dom->createTextNode(str_replace(' ', ' ', $child->textContent))); + } elseif ($child instanceof \DOMNode) { + mergeDom($dom, $new, $child); + } else { + // We just need to update our script to handle this node types + throw new \LogicException('Unsupported node type: '.get_class($child)); + } + } +} foreach (['Security/Core' => 'security', 'Form' => 'validators', 'Validator' => 'validators'] as $component => $domain) { $dir = __DIR__.'/../src/Symfony/Component/'.$component.'/Resources/translations'; @@ -95,6 +117,13 @@ function dumpXliff1(string $defaultLocale, MessageCatalogue $messages, string $d $localeCatalogue->setMetadata($source, $metadata, $domain); } - file_put_contents($file, dumpXliff1('en', $localeCatalogue, $domain)); + $inputDom = new \DOMDocument(); + $inputDom->loadXML(file_get_contents($file->getRealPath())); + $header = null; + if (1 === $inputDom->getElementsByTagName('header')->count()) { + $header = $inputDom->getElementsByTagName('header')->item(0); + } + + file_put_contents($file, dumpXliff1('en', $localeCatalogue, $domain, $header)); } } diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b9ba20ba9926a..0df7764a3ed29 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -110,6 +110,16 @@ jobs: KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1 KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' KAFKA_ADVERTISED_PORT: 9092 + frankenphp: + image: dunglas/frankenphp:1.1.0 + ports: + - 80:80 + volumes: + - ${{ github.workspace }}:/symfony + env: + SERVER_NAME: 'http://localhost' + CADDY_SERVER_EXTRA_DIRECTIVES: | + root * /symfony/src/Symfony/Component/HttpFoundation/Tests/Fixtures/response-functional/ steps: - name: Checkout @@ -130,6 +140,14 @@ jobs: sudo service redis-server restart echo "::endgroup::" + - name: Install pgbouncer + run: | + sudo apt-get install -y pgbouncer + sudo cp src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Fixtures/pgbouncer/pgbouncer.ini /etc/pgbouncer/pgbouncer.ini + sudo cp src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Fixtures/pgbouncer/userlist.txt /etc/pgbouncer/userlist.txt + sudo service pgbouncer restart + sudo su - postgres -c "PGPASSWORD=password psql -Atq -h localhost -p 5432 -U postgres -d postgres -c \"SELECT usename, passwd FROM pg_shadow\"" + - name: Configure Couchbase run: | curl -s -u 'username=Administrator&password=111111' -X POST http://localhost:8091/node/controller/setupServices -d 'services=kv%2Cn1ql%2Cindex%2Cfts' @@ -186,6 +204,7 @@ jobs: MESSENGER_SQS_FIFO_QUEUE_DSN: "sqs://localhost:4566/messages.fifo?sslmode=disable&poll_timeout=0.01" KAFKA_BROKER: 127.0.0.1:9092 POSTGRES_HOST: localhost + PGBOUNCER_HOST: localhost:6432 #- name: Run HTTP push tests # if: matrix.php == '8.1' diff --git a/CHANGELOG-6.3.md b/CHANGELOG-6.3.md index 61442471824f1..91840e5e6ecd5 100644 --- a/CHANGELOG-6.3.md +++ b/CHANGELOG-6.3.md @@ -7,6 +7,50 @@ in 6.3 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.3.0...v6.3.1 +* 6.3.12 (2024-01-30) + + * bug #52913 [Routing] Fixed priority getting lost when setting localized prefix (pritasil) + * bug #53183 [Messenger] PhpSerializer: TypeError should throw `MessageDecodingFailedException` (B-Galati) + * bug #52131 [HttpKernel] Fix `RequestPayloadValueResolver` handling error with no ExpectedTypes (Jeroeny) + * bug #51559 [DependencyInjection] `#[Autowire]` attribute should have precedence over bindings (HypeMC) + * bug #53678 [Mime] Fix serializing uninitialized `RawMessage::$message` to null (nicolas-grekas) + * bug #53634 [Notifer][Smsapi] Set messageId of SentMessage (tomasz-kusy) + * bug #53501 [DependencyInjection] support lazy evaluated exception messages with Xdebug 3 (xabbuh) + * bug #52994 [MonologBridge] Fix context data and display extra data (louismariegaborit) + * bug #53671 [HttpClient] Fix pausing responses before they start when using curl (nicolas-grekas) + * bug #53663 [TwigBridge] separate child and parent context in NotificationEmail on writes (xabbuh) + * bug #53667 [Mailer] [Mailgun] Fix sender header encoding (spajxo) + * bug #53157 [Mailer] Throw `TransportException` when unable to read from socket (xdanik) + * bug #53361 [Serializer] Take unnamed variadic parameters into account when denormalizing (thijsBreker) + * bug #53530 [Serializer] Rewrite `AbstractObjectNormalizer::createChildContext()` to use the provided `cache_key` from original context when creating child contexts (amne) + * bug #53506 [HttpClient] Fix error chunk creation in passthru (rmikalkenas) + * bug #53260 [AssetMapper] Handle assets with non-ascii characters in dev server (fbourigault) + * bug #53357 [Translation] Fix `TranslationNodeVisitor` with constant domain (VincentLanglet) + * bug #53525 [Messenger] [AMQP] Throw exception on `nack` callback (kvrushifa) + * bug #53432 [HttpFoundation] Request without content-type or content-length header should result in null values, not empty strings (priyadi) + * bug #53593 [Cache] Fix possible infinite loop in `CachePoolPass` (HypeMC) + * bug #53588 [Translation] fix multi-byte code area to convert (xabbuh) + * bug #53572 [FrameworkBundle] grab a service from the container only if it exists (xabbuh) + * bug #53565 [Mime] Fix undefined array key 0 when empty sender (0x346e3730) + * bug #53516 [Console] Allow '0' as a $shortcut in InputOption.php (lawsonjl-ornl) + * bug #53576 [Console] Only execute additional checks for color support if the output (theofidry) + * bug #53582 [TwigBundle] Fix configuration when "paths" is null (smnandre) + * bug #53575 [Mailer] register the MailPaceTransportFactory (xabbuh) + * bug #53581 [String] fix aircraft inflection (renanbr) + * bug #53509 [Security] Fix `AuthenticationUtils::getLastUsername()` returning null (alexandre-daubois) + * bug #53567 [String] Correct inflection of axis (Vladislav Iurciuc) + * bug #53537 [VarDumper] Fix missing colors initialization in `CliDumper` (nicolas-grekas) + * bug #53481 [Process] Fix executable finder when the command starts with a dash (kayw-geek) + * bug #53006 [ErrorHandler] Don't format binary strings (aleho) + * bug #53453 [Translation] add support for nikic/php-parser 5.0 (xabbuh) + * bug #53441 [Messenger] Amazon SQS Delay has a max of 15 minutes (alamirault) + * bug #53383 [Validator] re-allow an empty list of fields (xabbuh) + * bug #53418 [FrameworkBundle][Notifier] Fix service registration (MessageBird + TurboSms) (smnandre) + * bug #53350 [Validator] fix the exception being thrown (xabbuh) + * bug #53341 [FrameworkBundle] append instead of replacing potentially non-existent named-arguments (xabbuh) + * bug #53320 [Cache][DependencyInjection][Lock][Mailer][Messenger][Notifier][Translation] Url decode username and passwords from `parse_url()` results (alexandre-daubois) + * bug #53108 [Serializer] Fix using deserialization path 5.4 (HypeMC) + * 6.3.11 (2023-12-30) * bug #53054 [Cache] Fix expiration time for CouchbaseCollection (alexandre-daubois) diff --git a/CHANGELOG-6.4.md b/CHANGELOG-6.4.md index ce7d6922fb352..4c7c13f44ec90 100644 --- a/CHANGELOG-6.4.md +++ b/CHANGELOG-6.4.md @@ -7,6 +7,66 @@ in 6.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.4.0...v6.4.1 +* 6.4.4 (2024-02-27) + + * bug #53985 [HttpKernel] Allow tagged controllers in ControllerResolver (marein) + * bug #54054 [VarExporter] Bugfix/workaround jit issue (verfriemelt-dot-org) + * bug #54050 [Messenger] Revert "Resend failed retries back to failure transport " (ro0NL) + * bug #54045 [Config][Messenger][Security] Don't turn deprecations into exceptions when unserializing (nicolas-grekas) + * bug #54035 [DependencyInjection] Fix computing error messages involving service locators (nicolas-grekas) + * bug #53959 [Serializer] Fix unknown types normalization type when know type (Myks92) + * bug #53960 [Messenger] the 'use_notify' option is on the factory, not on the postgres connection (dbu) + * bug #54031 [ErrorHandler] Fix parsing messages that contain anonymous classes on PHP >= 8.3.3 (nicolas-grekas) + * bug #54014 [AssetMapper] Fix enquoted string pattern (smnandre) + * bug #54010 [Translation] Fix extracting qualified `t()` function calls (rvanvelzen) + * bug #53967 [ErrorHandler] return the unchanged text if preg_replace_callback() fails (xabbuh) + * bug #54009 [Console] Fix display of vertical Table on Windows OS (VincentLanglet) + * bug #54001 [Console] Fix display of Table on Windows OS (VincentLanglet) + * bug #53989 [FrameworkBundle] Fix config builder with extensions extended in `build()` (HypeMC) + * bug #54004 [WebProfilerBundle] disable turbo in web profiler toolbar to avoid link prefetching (davidgorges) + * bug #54006 [Process] Fix the `command -v` exception (kayw-geek) + * bug #53975 [Cache] explicitly cast boolean SSL stream options (xabbuh) + * bug #53926 [TwigBridge] foundation 5 layout: use form_label_content block for checkbox and radio labels (wetternest) + * bug #53913 [TwigBridge] Fix compat with Twig v3.9 (nicolas-grekas) + * bug #53819 [Doctrine Messenger] Fix support for pgsql + pgbouncer. (jwage) + * bug #53944 [Messenger] Gracefully fallback to empty queue config (Wirone) + * bug #53935 [Mailer] [Mailgun] Fix expecting payload without tags or user variables (norkunas) + * bug #53934 [Mailer] Fix signed emails breaking the profiler (HypeMC) + * bug #53924 [FrameworkBundle] Check if the _route attribute exists on the request (xvilo) + * bug #53910 [Messenger] Fix SQS visibility_timeout type (valtzu) + * bug #53891 [PropertyAccess] Fixes getValue() on an unitialized object property on a lazy ghost (priyadi) + * bug #53889 [HttpClient] Make retry strategy work again (Nyholm) + * bug #53906 [VarDumper] Fix serialization of stubs with null or uninitialized values (derrabus) + * bug #53890 [VarExporter] Uniform unitialized property error message under ghost and non-ghost objects (priyadi) + * bug #53893 [AssetMapper] Ignore comment lines in JavaScriptImportPathCompiler (smnandre) + * bug #53826 [DomCrawler][Form] Fix the exclusion of