You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

288 lines
15 KiB

3 years ago
  1. CHANGELOG
  2. =========
  3. 5.3
  4. ---
  5. * Add the `SessionFactory`, `NativeSessionStorageFactory`, `PhpBridgeSessionStorageFactory` and `MockFileSessionStorageFactory` classes
  6. * Calling `Request::getSession()` when there is no available session throws a `SessionNotFoundException`
  7. * Add the `RequestStack::getSession` method
  8. * Deprecate the `NamespacedAttributeBag` class
  9. * Add `ResponseFormatSame` PHPUnit constraint
  10. * Deprecate the `RequestStack::getMasterRequest()` method and add `getMainRequest()` as replacement
  11. 5.2.0
  12. -----
  13. * added support for `X-Forwarded-Prefix` header
  14. * added `HeaderUtils::parseQuery()`: it does the same as `parse_str()` but preserves dots in variable names
  15. * added `File::getContent()`
  16. * added ability to use comma separated ip addresses for `RequestMatcher::matchIps()`
  17. * added `Request::toArray()` to parse a JSON request body to an array
  18. * added `RateLimiter\RequestRateLimiterInterface` and `RateLimiter\AbstractRequestRateLimiter`
  19. * deprecated not passing a `Closure` together with `FILTER_CALLBACK` to `ParameterBag::filter()`; wrap your filter in a closure instead.
  20. * Deprecated the `Request::HEADER_X_FORWARDED_ALL` constant, use either `HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO` or `HEADER_X_FORWARDED_AWS_ELB` or `HEADER_X_FORWARDED_TRAEFIK` constants instead.
  21. * Deprecated `BinaryFileResponse::create()`, use `__construct()` instead
  22. 5.1.0
  23. -----
  24. * added `Cookie::withValue`, `Cookie::withDomain`, `Cookie::withExpires`,
  25. `Cookie::withPath`, `Cookie::withSecure`, `Cookie::withHttpOnly`,
  26. `Cookie::withRaw`, `Cookie::withSameSite`
  27. * Deprecate `Response::create()`, `JsonResponse::create()`,
  28. `RedirectResponse::create()`, and `StreamedResponse::create()` methods (use
  29. `__construct()` instead)
  30. * added `Request::preferSafeContent()` and `Response::setContentSafe()` to handle "safe" HTTP preference
  31. according to [RFC 8674](https://tools.ietf.org/html/rfc8674)
  32. * made the Mime component an optional dependency
  33. * added `MarshallingSessionHandler`, `IdentityMarshaller`
  34. * made `Session` accept a callback to report when the session is being used
  35. * Add support for all core cache control directives
  36. * Added `Symfony\Component\HttpFoundation\InputBag`
  37. * Deprecated retrieving non-string values using `InputBag::get()`, use `InputBag::all()` if you need access to the collection of values
  38. 5.0.0
  39. -----
  40. * made `Cookie` auto-secure and lax by default
  41. * removed classes in the `MimeType` namespace, use the Symfony Mime component instead
  42. * removed method `UploadedFile::getClientSize()` and the related constructor argument
  43. * made `Request::getSession()` throw if the session has not been set before
  44. * removed `Response::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL`
  45. * passing a null url when instantiating a `RedirectResponse` is not allowed
  46. 4.4.0
  47. -----
  48. * passing arguments to `Request::isMethodSafe()` is deprecated.
  49. * `ApacheRequest` is deprecated, use the `Request` class instead.
  50. * passing a third argument to `HeaderBag::get()` is deprecated, use method `all()` instead
  51. * [BC BREAK] `PdoSessionHandler` with MySQL changed the type of the lifetime column,
  52. make sure to run `ALTER TABLE sessions MODIFY sess_lifetime INTEGER UNSIGNED NOT NULL` to
  53. update your database.
  54. * `PdoSessionHandler` now precalculates the expiry timestamp in the lifetime column,
  55. make sure to run `CREATE INDEX EXPIRY ON sessions (sess_lifetime)` to update your database
  56. to speed up garbage collection of expired sessions.
  57. * added `SessionHandlerFactory` to create session handlers with a DSN
  58. * added `IpUtils::anonymize()` to help with GDPR compliance.
  59. 4.3.0
  60. -----
  61. * added PHPUnit constraints: `RequestAttributeValueSame`, `ResponseCookieValueSame`, `ResponseHasCookie`,
  62. `ResponseHasHeader`, `ResponseHeaderSame`, `ResponseIsRedirected`, `ResponseIsSuccessful`, and `ResponseStatusCodeSame`
  63. * deprecated `MimeTypeGuesserInterface` and `ExtensionGuesserInterface` in favor of `Symfony\Component\Mime\MimeTypesInterface`.
  64. * deprecated `MimeType` and `MimeTypeExtensionGuesser` in favor of `Symfony\Component\Mime\MimeTypes`.
  65. * deprecated `FileBinaryMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileBinaryMimeTypeGuesser`.
  66. * deprecated `FileinfoMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileinfoMimeTypeGuesser`.
  67. * added `UrlHelper` that allows to get an absolute URL and a relative path for a given path
  68. 4.2.0
  69. -----
  70. * the default value of the "$secure" and "$samesite" arguments of Cookie's constructor
  71. will respectively change from "false" to "null" and from "null" to "lax" in Symfony
  72. 5.0, you should define their values explicitly or use "Cookie::create()" instead.
  73. * added `matchPort()` in RequestMatcher
  74. 4.1.3
  75. -----
  76. * [BC BREAK] Support for the IIS-only `X_ORIGINAL_URL` and `X_REWRITE_URL`
  77. HTTP headers has been dropped for security reasons.
  78. 4.1.0
  79. -----
  80. * Query string normalization uses `parse_str()` instead of custom parsing logic.
  81. * Passing the file size to the constructor of the `UploadedFile` class is deprecated.
  82. * The `getClientSize()` method of the `UploadedFile` class is deprecated. Use `getSize()` instead.
  83. * added `RedisSessionHandler` to use Redis as a session storage
  84. * The `get()` method of the `AcceptHeader` class now takes into account the
  85. `*` and `*/*` default values (if they are present in the Accept HTTP header)
  86. when looking for items.
  87. * deprecated `Request::getSession()` when no session has been set. Use `Request::hasSession()` instead.
  88. * added `CannotWriteFileException`, `ExtensionFileException`, `FormSizeFileException`,
  89. `IniSizeFileException`, `NoFileException`, `NoTmpDirFileException`, `PartialFileException` to
  90. handle failed `UploadedFile`.
  91. * added `MigratingSessionHandler` for migrating between two session handlers without losing sessions
  92. * added `HeaderUtils`.
  93. 4.0.0
  94. -----
  95. * the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()`
  96. methods have been removed
  97. * the `Request::HEADER_CLIENT_IP` constant has been removed, use
  98. `Request::HEADER_X_FORWARDED_FOR` instead
  99. * the `Request::HEADER_CLIENT_HOST` constant has been removed, use
  100. `Request::HEADER_X_FORWARDED_HOST` instead
  101. * the `Request::HEADER_CLIENT_PROTO` constant has been removed, use
  102. `Request::HEADER_X_FORWARDED_PROTO` instead
  103. * the `Request::HEADER_CLIENT_PORT` constant has been removed, use
  104. `Request::HEADER_X_FORWARDED_PORT` instead
  105. * checking for cacheable HTTP methods using the `Request::isMethodSafe()`
  106. method (by not passing `false` as its argument) is not supported anymore and
  107. throws a `\BadMethodCallException`
  108. * the `WriteCheckSessionHandler`, `NativeSessionHandler` and `NativeProxy` classes have been removed
  109. * setting session save handlers that do not implement `\SessionHandlerInterface` in
  110. `NativeSessionStorage::setSaveHandler()` is not supported anymore and throws a
  111. `\TypeError`
  112. 3.4.0
  113. -----
  114. * implemented PHP 7.0's `SessionUpdateTimestampHandlerInterface` with a new
  115. `AbstractSessionHandler` base class and a new `StrictSessionHandler` wrapper
  116. * deprecated the `WriteCheckSessionHandler`, `NativeSessionHandler` and `NativeProxy` classes
  117. * deprecated setting session save handlers that do not implement `\SessionHandlerInterface` in `NativeSessionStorage::setSaveHandler()`
  118. * deprecated using `MongoDbSessionHandler` with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb instead
  119. * deprecated `MemcacheSessionHandler`; use `MemcachedSessionHandler` instead
  120. 3.3.0
  121. -----
  122. * the `Request::setTrustedProxies()` method takes a new `$trustedHeaderSet` argument,
  123. see https://symfony.com/doc/current/deployment/proxies.html for more info,
  124. * deprecated the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` methods,
  125. * added `File\Stream`, to be passed to `BinaryFileResponse` when the size of the served file is unknown,
  126. disabling `Range` and `Content-Length` handling, switching to chunked encoding instead
  127. * added the `Cookie::fromString()` method that allows to create a cookie from a
  128. raw header string
  129. 3.1.0
  130. -----
  131. * Added support for creating `JsonResponse` with a string of JSON data
  132. 3.0.0
  133. -----
  134. * The precedence of parameters returned from `Request::get()` changed from "GET, PATH, BODY" to "PATH, GET, BODY"
  135. 2.8.0
  136. -----
  137. * Finding deep items in `ParameterBag::get()` is deprecated since version 2.8 and
  138. will be removed in 3.0.
  139. 2.6.0
  140. -----
  141. * PdoSessionHandler changes
  142. - implemented different session locking strategies to prevent loss of data by concurrent access to the same session
  143. - [BC BREAK] save session data in a binary column without base64_encode
  144. - [BC BREAK] added lifetime column to the session table which allows to have different lifetimes for each session
  145. - implemented lazy connections that are only opened when a session is used by either passing a dsn string
  146. explicitly or falling back to session.save_path ini setting
  147. - added a createTable method that initializes a correctly defined table depending on the database vendor
  148. 2.5.0
  149. -----
  150. * added `JsonResponse::setEncodingOptions()` & `JsonResponse::getEncodingOptions()` for easier manipulation
  151. of the options used while encoding data to JSON format.
  152. 2.4.0
  153. -----
  154. * added RequestStack
  155. * added Request::getEncodings()
  156. * added accessors methods to session handlers
  157. 2.3.0
  158. -----
  159. * added support for ranges of IPs in trusted proxies
  160. * `UploadedFile::isValid` now returns false if the file was not uploaded via HTTP (in a non-test mode)
  161. * Improved error-handling of `\Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler`
  162. to ensure the supplied PDO handler throws Exceptions on error (as the class expects). Added related test cases
  163. to verify that Exceptions are properly thrown when the PDO queries fail.
  164. 2.2.0
  165. -----
  166. * fixed the Request::create() precedence (URI information always take precedence now)
  167. * added Request::getTrustedProxies()
  168. * deprecated Request::isProxyTrusted()
  169. * [BC BREAK] JsonResponse does not turn a top level empty array to an object anymore, use an ArrayObject to enforce objects
  170. * added a IpUtils class to check if an IP belongs to a CIDR
  171. * added Request::getRealMethod() to get the "real" HTTP method (getMethod() returns the "intended" HTTP method)
  172. * disabled _method request parameter support by default (call Request::enableHttpMethodParameterOverride() to
  173. enable it, and Request::getHttpMethodParameterOverride() to check if it is supported)
  174. * Request::splitHttpAcceptHeader() method is deprecated and will be removed in 2.3
  175. * Deprecated Flashbag::count() and \Countable interface, will be removed in 2.3
  176. 2.1.0
  177. -----
  178. * added Request::getSchemeAndHttpHost() and Request::getUserInfo()
  179. * added a fluent interface to the Response class
  180. * added Request::isProxyTrusted()
  181. * added JsonResponse
  182. * added a getTargetUrl method to RedirectResponse
  183. * added support for streamed responses
  184. * made Response::prepare() method the place to enforce HTTP specification
  185. * [BC BREAK] moved management of the locale from the Session class to the Request class
  186. * added a generic access to the PHP built-in filter mechanism: ParameterBag::filter()
  187. * made FileBinaryMimeTypeGuesser command configurable
  188. * added Request::getUser() and Request::getPassword()
  189. * added support for the PATCH method in Request
  190. * removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3
  191. * added ResponseHeaderBag::makeDisposition() (implements RFC 6266)
  192. * made mimetype to extension conversion configurable
  193. * [BC BREAK] Moved all session related classes and interfaces into own namespace, as
  194. `Symfony\Component\HttpFoundation\Session` and renamed classes accordingly.
  195. Session handlers are located in the subnamespace `Symfony\Component\HttpFoundation\Session\Handler`.
  196. * SessionHandlers must implement `\SessionHandlerInterface` or extend from the
  197. `Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class.
  198. * Added internal storage driver proxy mechanism for forward compatibility with
  199. PHP 5.4 `\SessionHandler` class.
  200. * Added session handlers for custom Memcache, Memcached and Null session save handlers.
  201. * [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionHandler`.
  202. * [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and
  203. `remove()`. Added `getBag()`, `registerBag()`. The `NativeSessionStorage` class
  204. is a mediator for the session storage internals including the session handlers
  205. which do the real work of participating in the internal PHP session workflow.
  206. * [BC BREAK] Introduced mock implementations of `SessionStorage` to enable unit
  207. and functional testing without starting real PHP sessions. Removed
  208. `ArraySessionStorage`, and replaced with `MockArraySessionStorage` for unit
  209. tests; removed `FilesystemSessionStorage`, and replaced with`MockFileSessionStorage`
  210. for functional tests. These do not interact with global session ini
  211. configuration values, session functions or `$_SESSION` superglobal. This means
  212. they can be configured directly allowing multiple instances to work without
  213. conflicting in the same PHP process.
  214. * [BC BREAK] Removed the `close()` method from the `Session` class, as this is
  215. now redundant.
  216. * Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()`
  217. `getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead
  218. which returns a `FlashBagInterface`.
  219. * `Session->clear()` now only clears session attributes as before it cleared
  220. flash messages and attributes. `Session->getFlashBag()->all()` clears flashes now.
  221. * Session data is now managed by `SessionBagInterface` to better encapsulate
  222. session data.
  223. * Refactored session attribute and flash messages system to their own
  224. `SessionBagInterface` implementations.
  225. * Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This
  226. implementation is ESI compatible.
  227. * Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire
  228. behavior of messages auto expiring after one page page load. Messages must
  229. be retrieved by `get()` or `all()`.
  230. * Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate
  231. attributes storage behavior from 2.0.x (default).
  232. * Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for
  233. namespace session attributes.
  234. * Flash API can stores messages in an array so there may be multiple messages
  235. per flash type. The old `Session` class API remains without BC break as it
  236. will allow single messages as before.
  237. * Added basic session meta-data to the session to record session create time,
  238. last updated time, and the lifetime of the session cookie that was provided
  239. to the client.
  240. * Request::getClientIp() method doesn't take a parameter anymore but bases
  241. itself on the trustProxy parameter.
  242. * Added isMethod() to Request object.
  243. * [BC BREAK] The methods `getPathInfo()`, `getBaseUrl()` and `getBasePath()` of
  244. a `Request` now all return a raw value (vs a urldecoded value before). Any call
  245. to one of these methods must be checked and wrapped in a `rawurldecode()` if
  246. needed.