45 KiB
45 KiB
CHANGELOG
7.1
- Add
CheckAliasValidityPass
tolint:container
command - Add
private_ranges
as a shortcut for private IP address ranges to thetrusted_proxies
option - Mark classes
ConfigBuilderCacheWarmer
,Router
,SerializerCacheWarmer
,TranslationsCacheWarmer
,Translator
andValidatorCacheWarmer
asfinal
- Move the Router
cache_dir
tokernel.build_dir
- Deprecate the
router.cache_dir
config option - Add
rate_limiter
tags to rate limiter services - Add
secrets:reveal
command - Add
rate_limiter
option tohttp_client.default_options
andhttp_client.scoped_clients
- Attach the workflow's configuration to the
workflow
tag - Add the
allowed_recipients
option for mailer to allow some users to receive emails even ifrecipients
is defined. - Reset env vars when resetting the container
7.0
- Remove command
translation:update
, usetranslation:extract
instead - Make the
http_method_override
config option default tofalse
- Remove
AbstractController::renderForm()
, userender()
instead - Remove the
Symfony\Component\Serializer\Normalizer\ObjectNormalizer
andSymfony\Component\Serializer\Normalizer\PropertyNormalizer
autowiring aliases, type-hint againstSymfony\Component\Serializer\Normalizer\NormalizerInterface
or implementNormalizerAwareInterface
instead - Remove the
Http\Client\HttpClient
service, usePsr\Http\Client\ClientInterface
instead - Remove the integration of Doctrine annotations, use native attributes instead
- Remove
EnableLoggerDebugModePass
, use argument$debug
of HttpKernel'sLogger
instead - Remove
AddDebugLogProcessorPass::configureLogger()
, use HttpKernel'sDebugLoggerConfigurator
instead - Make the
framework.handle_all_throwables
config option default totrue
- Make the
framework.php_errors.log
config option default totrue
- Make the
framework.session.cookie_secure
config option default toauto
- Make the
framework.session.cookie_samesite
config option default tolax
- Make the
framework.session.handler_id
default to null ifsave_path
is not set and tosession.handler.native_file
otherwise - Make the
framework.uid.default_uuid_version
config option default to7
- Make the
framework.uid.time_based_uuid_version
config option default to7
- Make the
framework.validation.email_validation_mode
config option default tohtml5
- Remove the
framework.validation.enable_annotations
config option, useframework.validation.enable_attributes
instead - Remove the
framework.serializer.enable_annotations
config option, useframework.serializer.enable_attributes
instead - Remove the
routing.loader.annotation
service, use therouting.loader.attribute
service instead - Remove the
routing.loader.annotation.directory
service, use therouting.loader.attribute.directory
service instead - Remove the
routing.loader.annotation.file
service, use therouting.loader.attribute.file
service instead - Remove
AnnotatedRouteControllerLoader
, useAttributeRouteControllerLoader
instead - Remove
AddExpressionLanguageProvidersPass
, useSymfony\Component\Routing\DependencyInjection\AddExpressionLanguageProvidersPass
instead - Remove
DataCollectorTranslatorPass
, useSymfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass
instead - Remove
LoggingTranslatorPass
, useSymfony\Component\Translation\DependencyInjection\LoggingTranslatorPass
instead - Remove
WorkflowGuardListenerPass
, useSymfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass
instead
6.4
- Add
HttpClientAssertionsTrait
- Add
AbstractController::renderBlock()
andrenderBlockView()
- Add native return type to
Translator
and toApplication::reset()
- Deprecate the integration of Doctrine annotations, either uninstall the
doctrine/annotations
package or disable the integration by settingframework.annotations
tofalse
- Enable
json_decode_detailed_errors
context for Serializer by default ifkernel.debug
is true and theseld/jsonlint
package is installed - Add
DomCrawlerAssertionsTrait::assertAnySelectorTextContains(string $selector, string $text)
- Add
DomCrawlerAssertionsTrait::assertAnySelectorTextSame(string $selector, string $text)
- Add
DomCrawlerAssertionsTrait::assertAnySelectorTextNotContains(string $selector, string $text)
- Deprecate
EnableLoggerDebugModePass
, use argument$debug
of HttpKernel'sLogger
instead - Deprecate
AddDebugLogProcessorPass::configureLogger()
, use HttpKernel'sDebugLoggerConfigurator
instead - Deprecate not setting the
framework.handle_all_throwables
config option; it will default totrue
in 7.0 - Deprecate not setting the
framework.php_errors.log
config option; it will default totrue
in 7.0 - Deprecate not setting the
framework.session.cookie_secure
config option; it will default toauto
in 7.0 - Deprecate not setting the
framework.session.cookie_samesite
config option; it will default tolax
in 7.0 - Deprecate not setting either
framework.session.handler_id
orsave_path
config options;handler_id
will default to null in 7.0 ifsave_path
is not set and tosession.handler.native_file
otherwise - Deprecate not setting the
framework.uid.default_uuid_version
config option; it will default to7
in 7.0 - Deprecate not setting the
framework.uid.time_based_uuid_version
config option; it will default to7
in 7.0 - Deprecate not setting the
framework.validation.email_validation_mode
config option; it will default tohtml5
in 7.0 - Deprecate
framework.validation.enable_annotations
, useframework.validation.enable_attributes
instead - Deprecate
framework.serializer.enable_annotations
, useframework.serializer.enable_attributes
instead - Add
array $tokenAttributes = []
optional parameter toKernelBrowser::loginUser()
- Add support for relative URLs in BrowserKit's redirect assertion
- Change BrowserKitAssertionsTrait::getClient() to be protected
- Deprecate the
framework.asset_mapper.provider
config option - Add
--exclude
option to thecache:pool:clear
command - Add parameters deprecations to the output of
debug:container
command - Change
framework.asset_mapper.importmap_polyfill
from a URL to the name of an item in the importmap - Provide
$buildDir
when runningCacheWarmer
to build read-only resources - Add the global
--profile
option to the console to enable profiling commands - Deprecate the
routing.loader.annotation
service, use therouting.loader.attribute
service instead - Deprecate the
routing.loader.annotation.directory
service, use therouting.loader.attribute.directory
service instead - Deprecate the
routing.loader.annotation.file
service, use therouting.loader.attribute.file
service instead - Deprecate
AnnotatedRouteControllerLoader
, useAttributeRouteControllerLoader
instead - Deprecate
AddExpressionLanguageProvidersPass
, useSymfony\Component\Routing\DependencyInjection\AddExpressionLanguageProvidersPass
instead - Deprecate
DataCollectorTranslatorPass
, useSymfony\Component\Translation\DependencyInjection\DataCollectorTranslatorPass
instead - Deprecate
LoggingTranslatorPass
, useSymfony\Component\Translation\DependencyInjection\LoggingTranslatorPass
instead - Deprecate
WorkflowGuardListenerPass
, useSymfony\Component\Workflow\DependencyInjection\WorkflowGuardListenerPass
instead
6.3
- Add
extra
option forhttp_client.default_options
andhttp_client.scoped_client
- Add
DomCrawlerAssertionsTrait::assertSelectorCount(int $count, string $selector)
- Allow to avoid
limit
definition in a RateLimiter configuration when using theno_limit
policy - Add
--format
option to thedebug:config
command - Add support to pass namespace wildcard in
framework.messenger.routing
- Deprecate
framework:exceptions
tag, unwrap it and replaceframework:exception
tags'name
attribute byclass
- Deprecate the
notifier.logger_notification_listener
service, use thenotifier.notification_logger_listener
service instead - Allow setting private services with the test container
- Register alias for argument for workflow services with workflow name only
- Configure the
ErrorHandler
onFrameworkBundle::boot()
- Allow setting
debug.container.dump
tofalse
to disable dumping the container to XML - Add
framework.http_cache.skip_response_headers
option - Display warmers duration on debug verbosity for
cache:clear
command - Add
AbstractController::sendEarlyHints()
to send HTTP Early Hints - Add autowiring aliases for
Http\Client\HttpAsyncClient
- Deprecate the
Http\Client\HttpClient
service, usePsr\Http\Client\ClientInterface
instead - Add
stop_worker_on_signals
configuration option tomessenger
to define signals which would stop a worker - Add support for
--all
option to clear all cache pools withcache:pool:clear
command - Add
--show-aliases
option todebug:router
command
6.2
- Add
resolve-env
option todebug:config
command to display actual values of environment variables in dumped configuration - Add
NotificationAssertionsTrait
- Add option
framework.handle_all_throwables
to allowSymfony\Component\HttpKernel\HttpKernel
to handle all kinds ofThrowable
- Make
AbstractController::render()
able to deal with forms and deprecaterenderForm()
- Deprecate the
Symfony\Component\Serializer\Normalizer\ObjectNormalizer
andSymfony\Component\Serializer\Normalizer\PropertyNormalizer
autowiring aliases, type-hint againstSymfony\Component\Serializer\Normalizer\NormalizerInterface
or implementNormalizerAwareInterface
instead - Add service usages list to the
debug:container
command output - Add service and alias deprecation message to
debug:container [<name>]
output - Tag all workflows services with
workflow
, those with type=workflow are tagged withworkflow.workflow
, and those with type=state_machine withworkflow.state_machine
- Add
rate_limiter
configuration option tomessenger.transport
to allow rate limited transports using the RateLimiter component - Remove
@internal
tag from secret vaults to allow them to be used directly outside the framework bundle and custom vaults to be added - Deprecate
framework.form.legacy_error_messages
config node - Add a
framework.router.cache_dir
configuration option to configure the defaultRouter
cache_dir
option - Add option
framework.messenger.buses.*.default_middleware.allow_no_senders
to enable throwing when a message doesn't have a sender - Deprecate
AbstractController::renderForm()
, userender()
instead - Deprecate
FrameworkExtension::registerRateLimiter()
6.1
- Add support for configuring semaphores
- Environment variable
SYMFONY_IDE
is read by default whenframework.ide
config is not set - Load PHP configuration files by default in the
MicroKernelTrait
- Add
cache:pool:invalidate-tags
command - Add
xliff
support in addition toxlf
forXliffFileDumper
- Deprecate the
reset_on_message
config option. It can be set totrue
only and does nothing now - Add
trust_x_sendfile_type_header
option - Add support for first-class callable route controller in
MicroKernelTrait
- Add tag
routing.condition_service
to autoconfigure routing condition services - Automatically register kernel methods marked with the
Symfony\Component\Routing\Annotation\Route
attribute or annotation as controllers inMicroKernelTrait
- Deprecate not setting the
http_method_override
config option. The default value will change tofalse
in 7.0. - Add
framework.profiler.collect_serializer_data
config option, set it totrue
to enable the serializer data collector and profiler panel
6.0
- Remove the
session.storage
alias andsession.storage.*
services, use thesession.storage.factory
alias andsession.storage.factory.*
services instead - Remove
framework.session.storage_id
configuration option, use theframework.session.storage_factory_id
configuration option instead - Remove the
session
service and theSessionInterface
alias, use the\Symfony\Component\HttpFoundation\Request::getSession()
or the new\Symfony\Component\HttpFoundation\RequestStack::getSession()
methods instead - Remove the
session.attribute_bag
service andsession.flash_bag
service - Remove the
lock.RESOURCE_NAME
andlock.RESOURCE_NAME.store
services and thelock
,LockInterface
,lock.store
andPersistingStoreInterface
aliases, uselock.RESOURCE_NAME.factory
,lock.factory
orLockFactory
instead - The
form.factory
,form.type.file
,translator
,security.csrf.token_manager
,serializer
,cache_clearer
,filesystem
andvalidator
services are now private - Remove the
output-format
andxliff-version
options fromTranslationUpdateCommand
- Remove
has()
,get()
,getDoctrine()
n anddispatchMessage()
fromAbstractController
, use method/constructor injection instead - Make the "framework.router.utf8" configuration option default to
true
- Remove the
AdapterInterface
autowiring alias, useCacheItemPoolInterface
instead - Make the
profiler
service private - Remove all other values than "none", "php_array" and "file" for
framework.annotation.cache
- Register workflow services as private
- Remove support for passing a
RouteCollectionBuilder
toMicroKernelTrait::configureRoutes()
, type-hintRoutingConfigurator
instead - Remove the
cache.adapter.doctrine
service - Remove the
framework.translator.enabled_locales
config option, useframework.enabled_locales
instead - Make the
framework.messenger.reset_on_message
configuration option default totrue
5.4
- Add
set_locale_from_accept_language
config option to automatically set the request locale based on theAccept-Language
HTTP request header and theframework.enabled_locales
config option - Add
set_content_language_from_locale
config option to automatically set theContent-Language
HTTP response header based on the Request locale - Deprecate the
framework.translator.enabled_locales
, useframework.enabled_locales
instead - Add autowiring alias for
HttpCache\StoreInterface
- Add the ability to enable the profiler using a request query parameter, body parameter or attribute
- Deprecate the
AdapterInterface
autowiring alias, useCacheItemPoolInterface
instead - Deprecate the public
profiler
service to private - Deprecate
get()
,has()
,getDoctrine()
, anddispatchMessage()
inAbstractController
, use method/constructor injection instead - Deprecate the
cache.adapter.doctrine
service - Add support for resetting container services after each messenger message
- Add
configureContainer()
,configureRoutes()
,getConfigDir()
andgetBundlesPath()
toMicroKernelTrait
- Add support for configuring log level, and status code by exception class
- Bind the
default_context
parameter onto serializer's encoders and normalizers - Add support for
statusCode
default parameter when loading a template directly from route using theSymfony\Bundle\FrameworkBundle\Controller\TemplateController
controller - Deprecate
translation:update
command, usetranslation:extract
instead - Add
PhpStanExtractor
support for the PropertyInfo component - Add
cache.adapter.doctrine_dbal
service to replacecache.adapter.pdo
when a Doctrine DBAL connection is used.
5.3
- Deprecate the
session.storage
alias andsession.storage.*
services, use thesession.storage.factory
alias andsession.storage.factory.*
services instead - Deprecate the
framework.session.storage_id
configuration option, use theframework.session.storage_factory_id
configuration option instead - Deprecate the
session
service and theSessionInterface
alias, use theRequest::getSession()
or the newRequestStack::getSession()
methods instead - Add
AbstractController::renderForm()
to render a form and set the appropriate HTTP status code - Add support for configuring PHP error level to log levels
- Add the
dispatcher
option todebug:event-dispatcher
- Add the
event_dispatcher.dispatcher
tag - Add
assertResponseFormatSame()
inBrowserKitAssertionsTrait
- Add support for configuring UUID factory services
- Add tag
assets.package
to register asset packages - Add support to use a PSR-6 compatible cache for Doctrine annotations
- Deprecate all other values than "none", "php_array" and "file" for
framework.annotation.cache
- Add
KernelTestCase::getContainer()
as the best way to get a container in tests - Rename the container parameter
profiler_listener.only_master_requests
toprofiler_listener.only_main_requests
- Add service
fragment.uri_generator
to generate the URI of a fragment - Deprecate registering workflow services as public
- Deprecate option
--xliff-version
of thetranslation:update
command, use e.g.--format=xlf20
instead - Deprecate option
--output-format
of thetranslation:update
command, use e.g.--format=xlf20
instead
5.2.0
- Added
framework.http_cache
configuration tree - Added
framework.trusted_proxies
andframework.trusted_headers
configuration options - Deprecated the public
form.factory
,form.type.file
,translator
,security.csrf.token_manager
,serializer
,cache_clearer
,filesystem
andvalidator
services to private. - Added
TemplateAwareDataCollectorInterface
andAbstractDataCollector
to simplify custom data collector creation and leverage autoconfiguration - Add
cache.adapter.redis_tag_aware
tag to useRedisCacheAwareAdapter
- added
framework.http_client.retry_failing
configuration tree - added
assertCheckboxChecked()
andassertCheckboxNotChecked()
inWebTestCase
- added
assertFormValue()
andassertNoFormValue()
inWebTestCase
- Added "--as-tree=3" option to
translation:update
command to dump messages as a tree-like structure. The given value defines the level where to switch to inline YAML - Deprecated the
lock.RESOURCE_NAME
andlock.RESOURCE_NAME.store
services and thelock
,LockInterface
,lock.store
andPersistingStoreInterface
aliases, uselock.RESOURCE_NAME.factory
,lock.factory
orLockFactory
instead.
5.1.0
- Removed
--no-backup
option fromtranslation:update
command (broken since5.0.0
) - Added link to source for controllers registered as named services
- Added link to source on controller on
router:match
/debug:router
(whenframework.ide
is configured) - Added the
framework.router.default_uri
configuration option to configure the defaultRequestContext
- Made
MicroKernelTrait::configureContainer()
compatible withContainerConfigurator
- Added a new
mailer.message_bus
option to configure or disable the message bus to use to send mails. - Added flex-compatible default implementation for
MicroKernelTrait::registerBundles()
- Deprecated passing a
RouteCollectionBuilder
toMicroKernelTrait::configureRoutes()
, type-hintRoutingConfigurator
instead - The
TemplateController
now accepts context argument - Deprecated not setting the "framework.router.utf8" configuration option as it will default to
true
in Symfony 6.0 - Added tag
routing.expression_language_function
to define functions available in route conditions - Added
debug:container --deprecations
option to see compile-time deprecations. - Made
BrowserKitAssertionsTrait
report the original error message in case of a failure - Added ability for
config:dump-reference
anddebug:config
to dump and debug kernel container extension configuration. - Deprecated
session.attribute_bag
service andsession.flash_bag
service.
5.0.0
- Removed support to load translation resources from the legacy directories
src/Resources/translations/
andsrc/Resources/<BundleName>/translations/
- Removed
ControllerNameParser
. - Removed
ResolveControllerNameSubscriber
- Removed support for
bundle:controller:action
to reference controllers. UseserviceOrFqcn::method
instead - Removed support for PHP templating, use Twig instead
- Removed
Controller
, useAbstractController
instead - Removed
Client
, useKernelBrowser
instead - Removed
ContainerAwareCommand
, use dependency injection instead - Removed the
validation.strict_email
option, usevalidation.email_validation_mode
instead - Removed the
cache.app.simple
service and its corresponding PSR-16 autowiring alias - Removed cache-related compiler passes and
RequestDataCollector
- Removed the
translator.selector
andsession.save_listener
services - Removed
SecurityUserValueResolver
, useUserValueResolver
instead - Removed
routing.loader.service
. - Service route loaders must be tagged with
routing.route_loader
. - Added
slugger
service andSluggerInterface
alias - Removed the
lock.store.flock
,lock.store.semaphore
,lock.store.memcached.abstract
andlock.store.redis.abstract
services. - Removed the
router.cache_class_prefix
parameter.
4.4.0
- Added
lint:container
command to check that services wiring matches type declarations - Added
MailerAssertionsTrait
- Deprecated support for
templating
engine inTemplateController
, use Twig instead - Deprecated the
$parser
argument ofControllerResolver::__construct()
andDelegatingLoader::__construct()
- Deprecated the
controller_name_converter
andresolve_controller_name_subscriber
services - The
ControllerResolver
andDelegatingLoader
classes have been marked asfinal
- Added support for configuring chained cache pools
- Deprecated calling
WebTestCase::createClient()
while a kernel has been booted, ensure the kernel is shut down before calling the method - Deprecated
routing.loader.service
, userouting.loader.container
instead. - Not tagging service route loaders with
routing.route_loader
has been deprecated. - Overriding the methods
KernelTestCase::tearDown()
andWebTestCase::tearDown()
without thevoid
return-type is deprecated. - Added new
error_controller
configuration to handle system exceptions - Added sort option for
translation:update
command. - [BC Break] The
framework.messenger.routing.senders
config key is not deeply merged anymore. - Added
secrets:*
commands to deal with secrets seamlessly. - Made
framework.session.handler_id
accept a DSN - Marked the
RouterDataCollector
class as@final
. - [BC Break] The
framework.messenger.buses.<name>.middleware
config key is not deeply merged anymore. - Moved
MailerAssertionsTrait
inKernelTestCase
4.3.0
- Deprecated the
framework.templating
option, configure the Twig bundle instead. - Added
WebTestAssertionsTrait
(included by default inWebTestCase
) - Renamed
Client
toKernelBrowser
- Not passing the project directory to the constructor of the
AssetsInstallCommand
is deprecated. This argument will be mandatory in 5.0. - Deprecated the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead
- Added the ability to specify a custom
serializer
option for each transport underframework.messenger.transports
. - Added the
RegisterLocaleAwareServicesPass
and configured theLocaleAwareListener
- [BC Break] When using Messenger, the default transport changed from
using Symfony's serializer service to use
PhpSerializer
, which uses PHP's nativeserialize()
andunserialize()
functions. To use the original serialization method, set theframework.messenger.default_serializer
config option tomessenger.transport.symfony_serializer
. Or set theserializer
option under one specifictransport
. - [BC Break] The
framework.messenger.serializer
config key changed toframework.messenger.default_serializer
, which holds the string service id andframework.messenger.symfony_serializer
, which configures the options if you're using Symfony's serializer. - [BC Break] Removed the
framework.messenger.routing.send_and_handle
configuration. Instead of setting it to true, configure aSyncTransport
and route messages to it. - Added information about deprecated aliases in
debug:autowiring
- Added php ini session options
sid_length
andsid_bits_per_character
to thesession
section of the configuration - Added support for Translator paths, Twig paths in translation commands.
- Added support for PHP files with translations in translation commands.
- Added support for boolean container parameters within routes.
- Added the
messenger:setup-transports
command to setup messenger transports - Added a
InMemoryTransport
to Messenger. Use it with a DSN starting within-memory://
. - Added
framework.property_access.throw_exception_on_invalid_property_path
config option. - Added
cache:pool:list
command to list all available cache pools.
4.2.0
- Added a
AbstractController::addLink()
method to add Link headers to the current response - Allowed configuring taggable cache pools via a new
framework.cache.pools.tags
option (bool|service-id) - Allowed configuring PDO-based cache pools via a new
cache.adapter.pdo
abstract service - Deprecated auto-injection of the container in AbstractController instances, register them as service subscribers instead
- Deprecated processing of services tagged
security.expression_language_provider
in favor of a newAddExpressionLanguageProvidersPass
in SecurityBundle. - Deprecated the
Symfony\Bundle\FrameworkBundle\Controller\Controller
class in favor ofSymfony\Bundle\FrameworkBundle\Controller\AbstractController
. - Enabled autoconfiguration for
Psr\Log\LoggerAwareInterface
- Added new "auto" mode for
framework.session.cookie_secure
to turn it on when HTTPS is used - Removed the
framework.messenger.encoder
andframework.messenger.decoder
options. Use theframework.messenger.serializer.id
option to replace the Messenger serializer. - Deprecated the
ContainerAwareCommand
class in favor ofSymfony\Component\Console\Command\Command
- Made
debug:container
anddebug:autowiring
ignore backslashes in service ids - Deprecated the
Templating\Helper\TranslatorHelper::transChoice()
method, use thetrans()
one instead with a%count%
parameter - Deprecated
CacheCollectorPass
. UseSymfony\Component\Cache\DependencyInjection\CacheCollectorPass
instead. - Deprecated
CachePoolClearerPass
. UseSymfony\Component\Cache\DependencyInjection\CachePoolClearerPass
instead. - Deprecated
CachePoolPass
. UseSymfony\Component\Cache\DependencyInjection\CachePoolPass
instead. - Deprecated
CachePoolPrunerPass
. UseSymfony\Component\Cache\DependencyInjection\CachePoolPrunerPass
instead. - Deprecated support for legacy translations directories
src/Resources/translations/
andsrc/Resources/<BundleName>/translations/
, usetranslations/
instead. - Deprecated support for the legacy directory structure in
translation:update
anddebug:translation
commands.
4.1.0
- Allowed to pass an optional
LoggerInterface $logger
instance to theRouter
- Added a new
parameter_bag
service with related autowiring aliases to access parameters as-a-service - Allowed the
Router
to work with any PSR-11 container - Added option in workflow dump command to label graph with a custom label
- Using a
RouterInterface
that does not implement theWarmableInterface
is deprecated. - Warming up a router in
RouterCacheWarmer
that does not implement theWarmableInterface
is deprecated and will not be supported anymore in 5.0. - The
RequestDataCollector
class has been deprecated. Use theSymfony\Component\HttpKernel\DataCollector\RequestDataCollector
class instead. - The
RedirectController
class allows for 307/308 HTTP status codes - Deprecated
bundle:controller:action
syntax to reference controllers. UseserviceOrFqcn::method
instead whereserviceOrFqcn
is either the service ID or the FQCN of the controller. - Deprecated
Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser
- The
container.service_locator
tag ofServiceLocator
s is now autoconfigured. - Add the ability to search a route in
debug:router
. - Add the ability to use SameSite cookies for sessions.
4.0.0
- The default
type
option of theframework.workflows.*
configuration entries isstate_machine
- removed
AddConsoleCommandPass
,AddConstraintValidatorsPass
,AddValidatorInitializersPass
,CompilerDebugDumpPass
,ConfigCachePass
,ControllerArgumentValueResolverPass
,FormPass
,PropertyInfoPass
,RoutingResolverPass
,SerializerPass
,ValidateWorkflowsPass
- made
Translator::__construct()
$defaultLocale
argument required - removed
SessionListener
,TestSessionListener
- Removed
cache:clear
warmup part along with the--no-optional-warmers
option - Removed core form types services registration when unnecessary
- Removed
framework.serializer.cache
option andserializer.mapping.cache.apc
,serializer.mapping.cache.doctrine.apc
services - Removed
ConstraintValidatorFactory
- Removed class parameters related to routing
- Removed absolute template paths support in the template name parser
- Removed support of the
KERNEL_DIR
environment variable withKernelTestCase::getKernelClass()
. - Removed the
KernelTestCase::getPhpUnitXmlDir()
andKernelTestCase::getPhpUnitCliConfigArgument()
methods. - Removed the "framework.validation.cache" configuration option. Configure the "cache.validator" service under "framework.cache.pools" instead.
- Removed
PhpStringTokenParser
, useSymfony\Component\Translation\Extractor\PhpStringTokenParser
instead. - Removed
PhpExtractor
, useSymfony\Component\Translation\Extractor\PhpExtractor
instead. - Removed the
use_strict_mode
session option, it's is now enabled by default
3.4.0
- Added
translator.default_path
option and parameter - Session
use_strict_mode
is now enabled by default and the corresponding option has been deprecated - Made the
cache:clear
command to not clear "app" PSR-6 cache pools anymore, but to still clear "system" ones; use thecache:pool:clear
command to clear "app" pools instead - Always register a minimalist logger that writes in
stderr
- Deprecated
profiler.matcher
option - Added support for
EventSubscriberInterface
onMicroKernelTrait
- Removed
doctrine/cache
from the list of required dependencies incomposer.json
- Deprecated
validator.mapping.cache.doctrine.apc
service - The
symfony/stopwatch
dependency has been removed, require it viacomposer require symfony/stopwatch
in yourdev
environment. - Deprecated using the
KERNEL_DIR
environment variable withKernelTestCase::getKernelClass()
. - Deprecated the
KernelTestCase::getPhpUnitXmlDir()
andKernelTestCase::getPhpUnitCliConfigArgument()
methods. - Deprecated
AddCacheClearerPass
, use tagged iterator arguments instead. - Deprecated
AddCacheWarmerPass
, use tagged iterator arguments instead. - Deprecated
TranslationDumperPass
, useSymfony\Component\Translation\DependencyInjection\TranslationDumperPass
instead - Deprecated
TranslationExtractorPass
, useSymfony\Component\Translation\DependencyInjection\TranslationExtractorPass
instead - Deprecated
TranslatorPass
, useSymfony\Component\Translation\DependencyInjection\TranslatorPass
instead - Added
command
attribute to theconsole.command
tag which takes the command name as value, using it makes the command lazy - Added
cache:pool:prune
command to allow manual stale cache item pruning of supported PSR-6 and PSR-16 cache pool implementations - Deprecated
Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader
, useSymfony\Component\Translation\Reader\TranslationReader
instead - Deprecated
translation.loader
service, usetranslation.reader
instead AssetsInstallCommand::__construct()
now takes an instance ofSymfony\Component\Filesystem\Filesystem
as first argumentCacheClearCommand::__construct()
now takes an instance ofSymfony\Component\HttpKernel\CacheClearer\CacheClearerInterface
as first argumentCachePoolClearCommand::__construct()
now takes an instance ofSymfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer
as first argumentEventDispatcherDebugCommand::__construct()
now takes an instance ofSymfony\Component\EventDispatcher\EventDispatcherInterface
as first argumentRouterDebugCommand::__construct()
now takes an instance ofSymfony\Component\Routing\RouterInterface
as first argumentRouterMatchCommand::__construct()
now takes an instance ofSymfony\Component\Routing\RouterInterface
as first argumentTranslationDebugCommand::__construct()
now takes an instance ofSymfony\Component\Translation\TranslatorInterface
as first argumentTranslationUpdateCommand::__construct()
now takes an instance ofSymfony\Component\Translation\TranslatorInterface
as first argumentAssetsInstallCommand
,CacheClearCommand
,CachePoolClearCommand
,EventDispatcherDebugCommand
,RouterDebugCommand
,RouterMatchCommand
,TranslationDebugCommand
,TranslationUpdateCommand
,XliffLintCommand
andYamlLintCommand
classes have been marked as final- Added
asset.request_context.base_path
andasset.request_context.secure
parameters to provide a default request context in case the stack is empty (similar torouter.request_context.*
parameters) - Display environment variables managed by
Dotenv
inAboutCommand
3.3.0
- Not defining the
type
option of theframework.workflows.*
configuration entries is deprecated. The default value will bestate_machine
in Symfony 4.0. - Deprecated the
CompilerDebugDumpPass
class - Deprecated the "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter
- Added a new version strategy option called "json_manifest_path"
that allows you to use the
JsonManifestVersionStrategy
. - Added
Symfony\Bundle\FrameworkBundle\Controller\AbstractController
. It provides the same helpers as theController
class, but does not allow accessing the dependency injection container, in order to encourage explicit dependency declarations. - Added support for the
controller.service_arguments
tag, for injecting services into controllers' actions - Changed default configuration for
assets/forms/validation/translation/serialization/csrf from
canBeEnabled()
tocanBeDisabled()
when Flex is used - The server:* commands and their associated router files were moved to WebServerBundle
- Translation related services are not loaded anymore when the
framework.translator
option is disabled. - Added
GlobalVariables::getToken()
- Deprecated
Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass
. UseSymfony\Component\Console\DependencyInjection\AddConsoleCommandPass
instead. - Added configurable paths for validation files
- Deprecated
SerializerPass
, useSymfony\Component\Serializer\DependencyInjection\SerializerPass
instead - Deprecated
FormPass
, useSymfony\Component\Form\DependencyInjection\FormPass
instead - Deprecated
SessionListener
- Deprecated
TestSessionListener
- Deprecated
Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass
. Use tagged iterator arguments instead. - Deprecated
PropertyInfoPass
, useSymfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass
instead - Deprecated
ControllerArgumentValueResolverPass
. UseSymfony\Component\HttpKernel\DependencyInjection\ControllerArgumentValueResolverPass
instead - Deprecated
RoutingResolverPass
, useSymfony\Component\Routing\DependencyInjection\RoutingResolverPass
instead - [BC BREAK] The
server:run
,server:start
,server:stop
andserver:status
console commands have been moved to a dedicated bundle. Requiresymfony/web-server-bundle
in your composer.json and registerSymfony\Bundle\WebServerBundle\WebServerBundle
in your AppKernel to use them. - Added
$defaultLocale
as 3rd argument ofTranslator::__construct()
makingTranslator
works with any PSR-11 container - Added
framework.serializer.mapping
config option allowing to define custom serialization mapping files and directories - Deprecated
AddValidatorInitializersPass
, useSymfony\Component\Validator\DependencyInjection\AddValidatorInitializersPass
instead - Deprecated
AddConstraintValidatorsPass
, useSymfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass
instead - Deprecated
ValidateWorkflowsPass
, useSymfony\Component\Workflow\DependencyInjection\ValidateWorkflowsPass
instead - Deprecated
ConstraintValidatorFactory
, useSymfony\Component\Validator\ContainerConstraintValidatorFactory
instead. - Deprecated
PhpStringTokenParser
, useSymfony\Component\Translation\Extractor\PhpStringTokenParser
instead. - Deprecated
PhpExtractor
, useSymfony\Component\Translation\Extractor\PhpExtractor
instead.
3.2.0
- Removed
doctrine/annotations
from the list of required dependencies incomposer.json
- Removed
symfony/security-core
andsymfony/security-csrf
from the list of required dependencies incomposer.json
- Removed
symfony/templating
from the list of required dependencies incomposer.json
- Removed
symfony/translation
from the list of required dependencies incomposer.json
- Removed
symfony/asset
from the list of required dependencies incomposer.json
- The
Resources/public/images/*
files have been removed. - The
Resources/public/css/*.css
files have been removed (they are now inlined in TwigBundle). - Added possibility to prioritize form type extensions with
'priority'
attribute on tagsform.type_extension
3.1.0
- Added
Controller::json
to simplify creating JSON responses when using the Serializer component - Deprecated absolute template paths support in the template name parser
- Deprecated using core form types without dependencies as services
- Added
Symfony\Component\HttpHernel\DataCollector\RequestDataCollector::onKernelResponse()
- Added
Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector
- The
framework.serializer.cache
option and the serviceserializer.mapping.cache.apc
have been deprecated. APCu should now be automatically used when available.
3.0.0
- removed
validator.api
parameter - removed
alias
option of theform.type
tag
2.8.0
- Deprecated the
alias
option of theform.type_extension
tag in favor of theextended_type
/extended-type
option - Deprecated the
alias
option of theform.type
tag - Deprecated the Shell
2.7.0
- Added possibility to extract translation messages from a file or files besides extracting from a directory
- Added
TranslationsCacheWarmer
to create catalogues at warmup
2.6.0
- Added helper commands (
server:start
,server:stop
andserver:status
) to control the built-in web server in the background - Added
Controller::isCsrfTokenValid
helper - Added configuration for the PropertyAccess component
- Added
Controller::redirectToRoute
helper - Added
Controller::addFlash
helper - Added
Controller::isGranted
helper - Added
Controller::denyAccessUnlessGranted
helper - Deprecated
app.security
in twig asapp.user
andis_granted()
are already available
2.5.0
- Added
translation:debug
command - Added
--no-backup
option totranslation:update
command - Added
config:debug
command - Added
yaml:lint
command - Deprecated the
RouterApacheDumperCommand
which will be removed in Symfony 3.0.
2.4.0
- allowed multiple IP addresses in profiler matcher settings
- added stopwatch helper to time templates with the WebProfilerBundle
- added service definition for "security.secure_random" service
- added service definitions for the new Security CSRF sub-component
2.3.0
- [BC BREAK] added a way to disable the profiler (when disabling the profiler, it is now completely removed)
To get the same "disabled" behavior as before, set
enabled
totrue
andcollect
tofalse
- [BC BREAK] the
Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass
was moved toComponent\HttpKernel\DependencyInjection\RegisterListenersPass
- added ControllerNameParser::build() which converts a controller short notation (a🅱️c) to a class::method notation
- added possibility to run PHP built-in server in production environment
- added possibility to load the serializer component in the service container
- added route debug information when using the
router:match
command - added
TimedPhpEngine
- added
--clean
option to thetranslation:update
command - added
http_method_override
option - added support for default templates per render tag
- added FormHelper::form(), FormHelper::start() and FormHelper::end()
- deprecated FormHelper::enctype() in favor of FormHelper::start()
- RedirectController actions now receive the Request instance via the method signature.
2.2.0
- added a new
uri_signer
service to help sign URIs - deprecated
Symfony\Bundle\FrameworkBundle\HttpKernel::render()
andSymfony\Bundle\FrameworkBundle\HttpKernel::forward()
- deprecated the
Symfony\Bundle\FrameworkBundle\HttpKernel
class in favor ofSymfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel
- added support for adding new HTTP content rendering strategies (like ESI and Hinclude)
in the DIC via the
kernel.fragment_renderer
tag - [BC BREAK] restricted the
Symfony\Bundle\FrameworkBundle\HttpKernel::render()
method to only accept URIs or ControllerReference instancesSymfony\Bundle\FrameworkBundle\HttpKernel::render()
method signature changed and the first argument must now be a URI or a ControllerReference instance (thegenerateInternalUri()
method was removed)- The internal routes (
Resources/config/routing/internal.xml
) have been removed and replaced with a listener (Symfony\Component\HttpKernel\EventListener\FragmentListener
) - The
render
method of theactions
templating helper signature and arguments changed
- replaced Symfony\Bundle\FrameworkBundle\Controller\TraceableControllerResolver by Symfony\Component\HttpKernel\Controller\TraceableControllerResolver
- replaced Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher by Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher
- added Client::enableProfiler()
- a new parameter has been added to the DIC:
router.request_context.base_url
You can customize it for your functional tests or for generating URLs with the right base URL when your are in the CLI context. - added support for default templates per render tag
2.1.0
- moved the translation files to the Form and Validator components
- changed the default extension for XLIFF files from .xliff to .xlf
- moved Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher
- moved Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareTraceableEventDispatcher
- added a router:match command
- added a config:dump-reference command
- added a server:run command
- added kernel.event_subscriber tag
- added a way to create relative symlinks when running assets:install command (--relative option)
- added Controller::getUser()
- [BC BREAK] assets_base_urls and base_urls merging strategy has changed
- changed the default profiler storage to use the filesystem instead of SQLite
- added support for placeholders in route defaults and requirements (replaced by the value set in the service container)
- added Filesystem component as a dependency
- added support for hinclude (use
standalone: 'js'
in render tag) - session options: lifetime, path, domain, secure, httponly were deprecated. Prefixed versions should now be used instead: cookie_lifetime, cookie_path, cookie_domain, cookie_secure, cookie_httponly
- [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure', 'httponly' are now prefixed with cookie_ when dumped to the container
- Added
handler_id
configuration undersession
key to representsession.handler
service, defaults tosession.handler.native_file
. - Added
gc_maxlifetime
,gc_probability
, andgc_divisor
to session configuration. This means session garbage collection has agc_probability
/gc_divisor
chance of being run. Thegc_maxlifetime
defines how long a session can idle for. It is different from cookie lifetime which declares how long a cookie can be stored on the remote client. - Removed 'auto_start' configuration parameter from session config. The session will start on demand.
- [BC BREAK] TemplateNameParser::parseFromFilename() has been moved to a dedicated parser: TemplateFilenameParser::parse().
- [BC BREAK] Kernel parameters are replaced by their value wherever they appear in Route patterns, requirements and defaults. Use '%%' as the escaped value for '%'.
- [BC BREAK] Switched behavior of flash messages to expire flash messages on retrieval using Symfony\Component\HttpFoundation\Session\Flash\FlashBag as opposed to on next pageload regardless of whether they are displayed or not.