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