This week, the stable version of Symfony 8.2.0 was finally released with hundreds of new features. We also released the maintenance versions 5.4.57, 5.4.58, 6.4.51, 6.4.52, 7.4.24, 7.4.25, 8.1.12, and 8.1.13, along with Twig 3.31.0, Twig 4.0.0-beta1, and Symfony UX 3.8. Meanwhile, we kept publishing articles about Symfony 8.2 features, such as Console improvements, DependencyInjection improvements, Security improvements, Messenger improvements, and testing improvements.

Symfony development highlights

This week, 237 pull requests were merged (169 in code, 19 in docs, 39 in UX and 10 in AI) and 26 issues were closed (24 in code, 0 in docs, 1 in UX and 1 in AI). Excluding merges, 63 authors made additions and deletions. See details for code, docs, UX and AI.

6.4 changelog:

  • c7043ac: [Serializer] don't ask PropertyInfo about each case variant of an attribute name
  • 2ba9eb6: [Serializer] limit the caches that grow with each nesting path
  • e898ce5: [PropertyInfo] limit the caches that grow with the input
  • e5bc764: [Mime] fix AddressTest with egulias/email-validator 4.0.5
  • b459d27: [Scheduler] fix the "nth weekday" cron syntax being treated as a hashed expression
  • 438b8f7: [HttpKernel] fix transient failure of InlineFragmentRendererTest
  • 945daf0: [Cache] add support for relay 0.62
  • 770ff6e: [PsrHttpMessageBridge] don't read the stream of an uploaded file that has an upload error
  • 69b3f46: [HttpClient] set redirect_url on mocked redirect responses
  • 91d75ce: [Serializer] read the current value with deep_object_to_populate when there is no property type extractor
  • e6364c2: [Cache] fix ChainAdapter failing on an uninitialized lazy ghost
  • 3fe9efa: [HtmlSanitizer] reject relative URLs with a colon in the first path segment when parsing
  • 6480679: [Mailer, Mailgun] fix rewriting cid references of inline parts with a Content-ID for Mailgun

7.4 changelog:

  • c69aaaf: [Process] never generate an all-digit env var name on Windows
  • 15c600b: [FrameworkBundle] fix debug:config when booting the kernel copy rebuilds the container
  • 6d413da: [HttpClient] skip CurlHttpClientTest::testTimeoutOnDestruct on Windows
  • cc3c1c9: [HttpClient] mark the pause-during-body test of AmpHttpClient as transient on Windows
  • 6643c53: [Notifier, Bluesky] fix mentions and links at the start of the text not being detected
  • 6267b10: [Notifier, Bluesky] fix overlapping facets and mentions detected inside email addresses
  • 264335d: [Lock] wrap store exceptions thrown by exists() in Lock::release()
  • daec910: [DoctrineBridge] filter invalid GUID values only on platforms with a native GUID type
  • d6c2769: [JsonStreamer] fix encoding numeric string keys in dict collections
  • c33905f: [JsonStreamer] do not use json_encode() for non-array iterables
  • 1422966: [ObjectMapper] fix mapping write-only virtual properties and nested targets that extend internal classes
  • 1a46ee7: [Console] fix the tty group of TerminalInputHelperTest
  • 76b1fc9: [Console] fix "Class not found" when a signal handler needs a class being autoloaded
  • d9c4fde: [JsonStreamer] write dicts of scalars as JSON objects
  • 575e597: [PropertyAccess, PropertyInfo] handle write-only virtual hooked properties
  • 8814a5d: [Serializer] respect COLLECT_DENORMALIZATION_ERRORS => false in Serializer::denormalize()
  • 990700d: [Validator] skip write-only virtual properties in Cascade and PropertyInfoLoader
  • 72e7ebc: [Serializer] fix PropertyNormalizer with virtual hooked properties and inherited private(set)
  • cc27395: [Serializer] handle mixed/template array keys and DNF/template types in denormalization
  • 3be69b0: [JsonStreamer, PropertyAccess] fix reading and writing virtual hooked properties
  • 9b1f875: [PropertyInfo] fix PhpDocExtractor reading iterable<K, V> and pseudo types as class names
  • 79a386f: [HttpClient] treat incomplete cached responses as cache misses
  • 2c5e007: [HttpClient] fix CachingHttpClient letting cached chunks expire before their metadata
  • 6eed879: [HttpFoundation] fix Request::getRequestUri() for an absolute URL without a path
  • 506ad95: [HttpFoundation] fix AcceptHeaderItem parsing of empty input
  • 6d25759: [Filesystem] fix Path::changeExtension() for zero extensions
  • 15cec6e: [String] fix negative offsets when searching for multiple needles
  • 3d1eeb6: [Console] retry alarms that interrupt an autoload instead of wrapping the autoloader
  • 2114af6: [Console] restore formatter decoration state on exceptions
  • dcdf422: [Validator] fix incorrect validation error for zero maximum length
  • f97046b: [Stopwatch] fix incorrect start time for nested event periods
  • 720bc10: [DependencyInjection] preserve trailing newlines when resolving parameters
  • dd65494: [DependencyInjection] reset non-empty parameter metadata when clearing ParameterBag
  • 81ff0ad: [Console] fix handling of zero option shortcuts
  • c003f5a: [Routing] preserve explicit ports for case-insensitive URI schemes
  • 7b75b25: [Mime] preserve zero-valued stream bodies in TextPart
  • 8bf469e: [Finder] fix case-insensitive date comparison operators
  • dc07975: [Validator] fix the error of Count when its max is zero
  • e026787: [Translation] fix handling of zero catalogue metadata keys and domains
  • 13a20cd: [HttpFoundation] reset cache-control directives when replacing headers
  • 1db22af: [Translation] handle invalid JSON translation resource types
  • 1ac86a3: [Serializer] fix empty CSV line endings
  • 0270697: [DependencyInjection] preserve falsy query strings in env processor
  • e2c51d6: [Filesystem] handle scheme-only paths in Path::getRoot()
  • 2439302: [String] fix source encoding detection in toByteString()
  • 8352248: [Serializer] handle invalid input types in DateTimeZoneNormalizer
  • 57ffa40: [Messenger] preserve millisecond precision in DelayStamp::delayFor() and delayUntil()
  • 2237e64: [Routing] compare alias names strictly when detecting circular references
  • b858c9d: [Translation] handle malformed INI translation resources
  • 88fa433: [Console] allow zero as table padding character
  • af56fc3: [DependencyInjection] handle invalid integer-backed enum env values
  • d192e40: [Translation] keep "0" message IDs and translations in gettext loaders
  • 158abfe: [Asset] preserve zero-valued paths in asset URLs
  • 95206c5: [Mime] preserve zero-valued names when building MIME messages
  • 0103275: [Form] reject zero-valued date fields in DateTimeToArrayTransformer
  • 9512690: [Form] preserve four-digit years when transforming ISO weeks
  • bc7a16e: [HttpFoundation] clear cookies when replacing headers in ResponseHeaderBag
  • 5f6a2e3: [ExpressionLanguage] preserve numeric strings when dumping constants
  • bbcda15: [DependencyInjection] compare service IDs strictly when resolving circular references
  • 446428a: [HttpFoundation] handle zero filter flags in InputBag and ParameterBag
  • b948bd8: [Serializer] validate target type before data in NumberNormalizer::denormalize()
  • 62bc94e: [Serializer] fix denormalizing inherited private properties
  • 93f4f5e: [Notifier, Bluesky] remove duplicated keywords in the composer.json file
  • 2f6e52b: [Notifier, Mercure] add support for Mercure 0.10
  • 842a2f1: [Yaml] dump floats without losing precision
  • 03125d3: [Serializer] keep JSON integers as int when the union also accepts int
  • f34a6ae: [HttpFoundation] reject non-integer CIDR netmasks in IpUtils
  • f82620c: [ExpressionLanguage] preserve hash keys when dumping array nodes
  • bf98ad8: [Stopwatch] preserve explicit zero section origin
  • 98e36e1: [Filesystem] match complete extensions in Path::getFilenameWithoutExtension()
  • 4308238: [String] fix quadratic running time in snake() on long uppercase runs
  • fa2da63: [BrowserKit] make CookieJar match cookie domains case-insensitively
  • 0f96e69: [BrowserKit] strip tabs and newlines from meta refresh URLs
  • 702d1fd: [PropertyAccess] preserve escaped elements when resolving parent paths
  • fd2b7af: [HttpClient] don't cache responses canceled before their body was received
  • 0283a67: [Mailer] fix inline images referenced by Content-ID in the MailPace, Infobip and Mailomat transports
  • 1daaafe: [Finder] recognize missing PCRE pattern modifiers
  • 2356d92: [Serializer] fix denormalizing XML and CSV numbers into int|float and int properties
  • 1500ae9: [Cache] use attributes to skip ChainAdapterLazyGhostTest before PHP 8.4
  • 752f840: [HttpFoundation] match query parameter names regardless of order
  • b012797: [ExpressionLanguage] fix dumping nodes that don't parse back to the same expression
  • c202a8d: [Cache] fix NullAdapter and commit() failing on an uninitialized lazy ghost
  • c18a415: [BrowserKit] fix meta refresh parsing to follow the HTML spec
  • 527efb0: [ExpressionLanguage] fix compiling an unknown name followed by ?? inside an operation
  • 5444631: [HttpKernel] move the cache and log dirs of KernelTest kernels out of the source tree
  • 9cc6da6: [HttpKernel] fix transient failure of FragmentHandlerTest::testRender
  • b0eeb7a: [HttpClient] fix CPU usage of AmpHttpClient with many concurrent streams
  • 2fd834b: [Validator] fix PropertyInfoLoader auto-mapping of unions mixing scalar and non-scalar types
  • d978d80: [TypeInfo] fix CollectionType::accepts() consuming iterators
  • ab3a31b: [Messenger] throw a clear exception for handlers whose message argument has an intersection type
  • d0553ba: [Messenger] report the right method when the message argument of a handler is a union of builtin types
  • 7b9c36d: [JsonStreamer] fix writing subtypes in a union with their supertype
  • 880f712: [JsonStreamer] fix max depth checks of self-referencing objects in writer
  • e5fd2d5: [JsonStreamer] fix writing empty or numeric-keyed dicts of collections or mixed values
  • 5e6c3fe: [HttpClient] use a slower endpoint in the timeout-on-initialize/destruct tests
  • 009ae18: [Cache] fix the timing-sensitive Couchbase expiration tests

8.1 changelog:

  • 6da9a25: [Console] fix how date arguments and options are resolved
  • 0e30c64: [Serializer] remove unreachable code in AbstractObjectNormalizer and ArrayDenormalizer

8.2 changelog:

  • 2e462e4: [Config] reject empty lists for nonempty maps in generated schemas
  • c5aabeb: [KeyManagement] reuse factories supplied by a generator
  • 53df381: [SecurityBundle] show shared roles under each parent in the debug tree
  • 636c8a7: [Config] fix ResourceCheckerConfigCacheTest::testAnUnchangedGeneratedFileNeedsOnlyOneCorrectiveBuild on slow runners
  • 37f89e1: [Messenger] skip transient AmpSql transport tests on Windows
  • b2bd147: [JsonSchema] do not allow null for NotBlank and NotNull
  • ba297c6: [Messenger] fix --concurrency pausing consumption while probing a message key
  • c44abe0: [JsonSchema] handle Valid and nested composites inside Sequentially and Compound constraints
  • 0b1686f: [JsonSchema] emit length bounds only for code point counts
  • 19c17de: [JsonSchema] align the keywords of Length, Regex, NotBlank and repeated constraints with the validator
  • 3fe11ad: [KeyManagement] return string from EncryptedType::convertToDatabaseValue()
  • 9b0130d: [ObjectMapper] fix reading virtual hooked properties and properties of ArrayObject subclasses
  • b34653a: [DebugBundle] register the VAR_DUMPER_SERVER default before resolving dump_destination
  • beaf280: [Notifier, SmsProxima] fix the "default" host in DSN
  • b116ffb: [Form] skip write-only virtual promoted properties in ConstructorMapper
  • 5d5580a: [Serializer] fix XmlEncoder::FORCE_COLLECTION and match repeated element names
  • 86003d6: [SecurityBundle] fix the Token tab of the profiler being disabled after a deauthentication
  • 8b90731: [Messenger, Scheduler] register MessengerPass at default priority
  • b7f85c5: [HttpClient] register HttpClientPass at default priority
  • 9222647: [JsonSchema] ignore normalized Email, Url, Ip and Uuid constraints
  • 2c8cc8c: [JsonSchema] use the uri-reference format for protocol-relative URLs
  • 13a254d: TYPO3 is backing Symfony 8.2, thanks to them!
  • 4b5f68a: mailtrap is backing Symfony 8.2 and the Mailer component, thanks to them!
  • d51261b: shopware is backing Symfony 8.2, thanks to them!
  • f868df5: [DependencyInjection] resolve class aliases when matching attribute autoconfigurators
  • 413a706: [Messenger] don't send flushes to a parallel worker that is inside a handler
  • 726d278: [Security] keep SymfonyCasts as backers of the Security components v8.2, thanks to them!
  • 3751458: [HttpClient, RateLimiter] don't run RemoveMissingDependenciesPass twice in the bundle tests
  • 148fbd4: [FrameworkBundle] fix static analysis of the deprecated AsRoutingConditionService attribute
  • 57e3916: [HttpClient, KeyManagement, Mailer, Messenger, Notifier, Serializer, Translation, Validator, Workflow] load profiler collectors regardless of kernel.debug
  • 80c4105: [Messenger] fix --concurrency stalls with batch handlers
  • 0106358: [JsonSchema] fix JsonSchemaBundleTest when installed outside the monorepo
  • 26ee544: [Mailer, Mime] encrypt each PGP recipient to the key from its own file
  • 24eb049: [ErrorHandler, WebProfilerBundle] don't collapse a toggle when clicking a button or a field inside it
  • 049b8a3: [WebProfilerBundle] recognize button.toggle-button as toggleControl without open/close icons
  • 7987612: [Security, SecurityBundle] check the binding and the size of a DPoP proof key before verifying its signature

Symfony UX development highlights

2.x changelog:

  • d7daca9: [LiveComponent] reject the class name of a component in its URL
  • 4ee411b: [LiveComponent] don't render a component on a 422 thrown before its action
  • 7ac5d6e: [LiveComponent] don't send X-Live-Url with a redirect
  • 6979047: [Turbo] fix the functional tests of BroadcastTest on CI
  • e49ef5a: [Autocomplete] require doctrine-bundle 2.12 in dev to fix the lowest CI job
  • 1404315: [TwigComponent] do not look for anonymous components outside the components directory
  • 6ab3be3: [Toolkit] reject glob characters in recipe copy-files sources
  • 6f00fec: [Turbo] reject invalid attribute names in TurboStream::action()
  • fdf1326: [Autocomplete] escape optgroup labels in the option position selector
  • 3ca30aa: [Toolkit] validate recipe dependency versions and Importmap package names
  • 71e6944: [Autocomplete] compare the extra options checksum with hash_equals()
  • 635f140: [LiveComponent] reject overflown dates when hydrating a date LiveProp
  • 597da91: [Icons] reject icon names and ids that end with a newline
  • 4b28c30: [Cropperjs] validate the crop options sent by the form
  • 5ac37b8: [LiveComponent] return a 400 instead of a 500 for malformed request data
  • 6584c40: [Autocomplete] return 400 instead of 500 for malformed page and extra_options parameters
  • 16f5304: [LiveComponent] keep the previous live URL when the router cannot rebuild it

3.x changelog:

  • 29f3a3a: [LiveComponent] reject the class name of a component in its URL
  • 7129ae3: [LiveComponent] don't render a component on a 422 thrown before its action
  • edd1acd: [LiveComponent] don't send X-Live-Url with a redirect
  • 79729ac: [Native] move the demo app to Symfony 8.1
  • 733a258: [TwigComponent, Twig Component] fix mistakes in documentation
  • b9189d9: [LiveComponent] split a download response without copying it
  • 14dbb71: [Pagination] support Doctrine ORM cursor fields through single-valued associations
  • 338a8ef: [Toolkit, Shadcn] fix the popover-based content misplaced in the top layer
  • 722383d: [Toolkit, DaisyUI] add daisyUI kit with Button recipe
  • a2cb183: [Pagination] reject cursor tokens holding out-of-range floats as invalid
  • c185a1f: [Upload] return 400 when a direct upload field is malformed
  • 9162bcd: [Toolkit, Common] refuse cross-origin update URLs in Sortable
  • 2c3181d: [TwigComponent] fix the syntax error on a trailing backslash in static HTML-syntax attribute values
  • 1006800: [CI] find the pull request of the dist size comment from the workflow run
  • 2d900a6: [Router] reject "." and ".." path segments like the Symfony UrlGenerator
  • 296f8d4: [Toolkit, DaisyUI] add Badge recipe
  • 029d318: [Toolkit, DaisyUI] add Alert recipe
  • b5a8c8b: [Notify] add support for MercureBundle ^0.7
  • 35a2dca: [Router] move symfony/dependency-injection to require-dev
  • 90fab57: [Icons] move symfony/framework-bundle, symfony/twig-bundle and symfony/dependency-injection to require-dev
  • 41b2ade: [Turbo] support symfony/mercure-bundle 0.7 in Turbo

Symfony CLI

Symfony CLI is a must-have tool when developing Symfony applications on your local machine. It includes the Symfony Local Server, the best way to run local Symfony applications. This week Symfony CLI released its new 5.23.0 version with the following changes:

  • Serve several requests at once with the built-in web server of PHP (@nicolas-grekas)
  • Expose the CLI binary name to local HTTP requests (@nicolas-grekas)
  • Stop server:log at the end of the logs when --no-follow or --no-tail is passed (@fabpot)
  • Publish the bash installer to get.symfony.com on each release (@fabpot)

Symfony Jobs

These are some of the most recent Symfony job offers:

  • Backend Symfony Developer at Edflex
    Full-time - €45,000 – €55,000 / year
    France Remote + part-time onsite (Nantes, Paris, France)
    View details
  • Symfony Developer at Bas Software
    Full-time - €4,000 – €5,000 / month
    Netherlands Remote + part-time onsite (Eindhoven, Netherlands)
    View details
  • Backend Symfony Developer at UpcoMinds
    Full-time - €2,800 – €3,200 / month
    Greece Remote + part-time onsite (Athens, Greece)
    View details
  • Backend Symfony Developer at MyUnisoft
    Full-time - €45,000 – €50,000 / year
    France Remote + part-time onsite (Montigny-le-Bretonneux, France)
    View details
  • Symfony Developer at Bas Software
    Full-time - €5,500 – €6,500 / month
    Netherlands Remote + part-time onsite (Eindhoven, Netherlands)
    View details

You can publish a Symfony job offer for free on symfony.com.

SymfonyCasts Updates

SymfonyCasts is the official way to learn Symfony. Select a track for a guided path through 100+ video tutorial courses about Symfony, PHP and JavaScript.

This week, SymfonyCasts published the following updates:

Call to Action

Published in #A week of symfony