酒店预订平台
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.

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