|
12 | 12 | namespace Symfony\Component\HttpFoundation\Session\Storage;
|
13 | 13 |
|
14 | 14 | use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
|
15 |
| -use Symfony\Component\HttpFoundation\Session\SessionUtils; |
16 | 15 | use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler;
|
17 | 16 | use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy;
|
18 | 17 | use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy;
|
@@ -54,11 +53,6 @@ class NativeSessionStorage implements SessionStorageInterface
|
54 | 53 | */
|
55 | 54 | protected $metadataBag;
|
56 | 55 |
|
57 |
| - /** |
58 |
| - * @var string|null |
59 |
| - */ |
60 |
| - private $emulateSameSite; |
61 |
| - |
62 | 56 | /**
|
63 | 57 | * Depending on how you want the storage driver to behave you probably
|
64 | 58 | * want to override this constructor entirely.
|
@@ -157,13 +151,6 @@ public function start()
|
157 | 151 | throw new \RuntimeException('Failed to start the session.');
|
158 | 152 | }
|
159 | 153 |
|
160 |
| - if (null !== $this->emulateSameSite) { |
161 |
| - $originalCookie = SessionUtils::popSessionCookie(session_name(), session_id()); |
162 |
| - if (null !== $originalCookie) { |
163 |
| - header(sprintf('%s; SameSite=%s', $originalCookie, $this->emulateSameSite), false); |
164 |
| - } |
165 |
| - } |
166 |
| - |
167 | 154 | $this->loadSession();
|
168 | 155 |
|
169 | 156 | return true;
|
@@ -225,16 +212,7 @@ public function regenerate(bool $destroy = false, int $lifetime = null)
|
225 | 212 | $this->metadataBag->stampNew();
|
226 | 213 | }
|
227 | 214 |
|
228 |
| - $isRegenerated = session_regenerate_id($destroy); |
229 |
| - |
230 |
| - if (null !== $this->emulateSameSite) { |
231 |
| - $originalCookie = SessionUtils::popSessionCookie(session_name(), session_id()); |
232 |
| - if (null !== $originalCookie) { |
233 |
| - header(sprintf('%s; SameSite=%s', $originalCookie, $this->emulateSameSite), false); |
234 |
| - } |
235 |
| - } |
236 |
| - |
237 |
| - return $isRegenerated; |
| 215 | + return session_regenerate_id($destroy); |
238 | 216 | }
|
239 | 217 |
|
240 | 218 | /**
|
|
0 commit comments