- Marked
Responsefinal. - Deprecated
Response::buildHeader() - Deprecated
Response::getStatus(), useResponse::getStatusCode()instead
- The
psr/simple-cachedependency has been removed - runcomposer require psr/simple-cacheif you need it. - Deprecated all PSR-16 adapters, use
Psr16CacheorSymfony\Contracts\Cache\CacheInterfaceimplementations instead. - Deprecated
SimpleCacheAdapter, use `Psr16Adapter instead.
- Deprecated using environment variables with
cannotBeEmpty()if the value is validated withvalidate()
- Using the
date_format,date_widget, andtime_widgetoptions of theDateTimeTypewhen thewidgetoption is set tosingle_textis deprecated.
- Not passing the project directory to the constructor of the
AssetsInstallCommandis 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.
- The
MimeTypeGuesserInterfaceandExtensionGuesserInterfaceinterfaces have been deprecated, useSymfony\Component\Mime\MimeTypesInterfaceinstead. - The
MimeTypeandMimeTypeExtensionGuesserclasses have been deprecated, useSymfony\Component\Mime\MimeTypesinstead. - The
FileBinaryMimeTypeGuesserclass has been deprecated, useSymfony\Component\Mime\FileBinaryMimeTypeGuesserinstead. - The
FileinfoMimeTypeGuesserclass has been deprecated, useSymfony\Component\Mime\FileinfoMimeTypeGuesserinstead.
-
The
AbstractToken::serialize(),AbstractToken::unserialize(),AuthenticationException::serialize()andAuthenticationException::unserialize()methods are now final, usegetState()andsetState()instead.Before:
public function serialize() { return [$this->myLocalVar, parent::serialize()]; } public function unserialize($serialized) { [$this->myLocalVar, $parentSerialized] = unserialize($serialized); parent::unserialize($parentSerialized); }
After:
protected function getState(): array { return [$this->myLocalVar, parent::getState()]; } protected function setState(array $data) { [$this->myLocalVar, $parentData] = $data; parent::setState($parentData); }
- Using a mapping inside a multi-line string is deprecated and will throw a
ParseExceptionin 5.0.