Skip to content

Commit 4f9fe45

Browse files
committed
refactor!: remove deprecated properties in Response
1 parent 4767584 commit 4f9fe45

File tree

3 files changed

+17
-77
lines changed

3 files changed

+17
-77
lines changed

system/HTTP/Response.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ public function __construct($config)
156156
// We need CSP object even if not enabled to avoid calls to non existing methods
157157
$this->CSP = Services::csp();
158158

159-
$this->CSPEnabled = $config->CSPEnabled;
160-
161159
$this->cookieStore = new CookieStore([]);
162160

163161
$cookie = config(CookieConfig::class);

system/HTTP/ResponseTrait.php

Lines changed: 1 addition & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,12 @@
3434
*/
3535
trait ResponseTrait
3636
{
37-
/**
38-
* Whether Content Security Policy is being enforced.
39-
*
40-
* @var bool
41-
*
42-
* @deprecated Use $this->CSP->enabled() instead.
43-
*/
44-
protected $CSPEnabled = false;
45-
4637
/**
4738
* Content security policy handler
4839
*
4940
* @var ContentSecurityPolicy
50-
*
51-
* @deprecated Will be protected. Use `getCSP()` instead.
5241
*/
53-
public $CSP;
42+
protected $CSP;
5443

5544
/**
5645
* CookieStore instance.
@@ -59,69 +48,6 @@ trait ResponseTrait
5948
*/
6049
protected $cookieStore;
6150

62-
/**
63-
* Set a cookie name prefix if you need to avoid collisions
64-
*
65-
* @var string
66-
*
67-
* @deprecated Use the dedicated Cookie class instead.
68-
*/
69-
protected $cookiePrefix = '';
70-
71-
/**
72-
* Set to .your-domain.com for site-wide cookies
73-
*
74-
* @var string
75-
*
76-
* @deprecated Use the dedicated Cookie class instead.
77-
*/
78-
protected $cookieDomain = '';
79-
80-
/**
81-
* Typically will be a forward slash
82-
*
83-
* @var string
84-
*
85-
* @deprecated Use the dedicated Cookie class instead.
86-
*/
87-
protected $cookiePath = '/';
88-
89-
/**
90-
* Cookie will only be set if a secure HTTPS connection exists.
91-
*
92-
* @var bool
93-
*
94-
* @deprecated Use the dedicated Cookie class instead.
95-
*/
96-
protected $cookieSecure = false;
97-
98-
/**
99-
* Cookie will only be accessible via HTTP(S) (no javascript)
100-
*
101-
* @var bool
102-
*
103-
* @deprecated Use the dedicated Cookie class instead.
104-
*/
105-
protected $cookieHTTPOnly = false;
106-
107-
/**
108-
* Cookie SameSite setting
109-
*
110-
* @var string
111-
*
112-
* @deprecated Use the dedicated Cookie class instead.
113-
*/
114-
protected $cookieSameSite = Cookie::SAMESITE_LAX;
115-
116-
/**
117-
* Stores all cookies that were set in the response.
118-
*
119-
* @var array
120-
*
121-
* @deprecated Use the dedicated Cookie class instead.
122-
*/
123-
protected $cookies = [];
124-
12551
/**
12652
* Type of format the body is in.
12753
* Valid: html, json, xml

user_guide_src/source/changelogs/v4.5.0.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,22 @@ Model
136136
- ``Model::idValue()``
137137
- ``Model::classToArray()``
138138

139+
Response
140+
--------
141+
142+
- The visibility of the deprecated property ``ResponseTrait::$CSP`` has been
143+
changed to protected.
144+
- The following deprecated properties have been removed.
145+
146+
- ``ResponseTrait::$CSPEnabled``
147+
- ``ResponseTrait::$cookiePrefix``
148+
- ``ResponseTrait::$cookieDomain``
149+
- ``ResponseTrait::$cookiePath``
150+
- ``ResponseTrait::$cookieSecure``
151+
- ``ResponseTrait::$cookieHTTPOnly``
152+
- ``ResponseTrait::$cookieSameSite``
153+
- ``ResponseTrait::$cookies``
154+
139155
CodeIgniter
140156
-----------
141157

0 commit comments

Comments
 (0)