-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Config\App session items #7000
Conversation
|
||
// DEPRECATED COOKIE MANAGEMENT | ||
$this->cookiePath = $config->cookiePath ?? $this->cookiePath; | ||
$this->cookieDomain = $config->cookieDomain ?? $this->cookieDomain; | ||
$this->cookieSecure = $config->cookieSecure ?? $this->cookieSecure; | ||
$this->cookieSameSite = $config->cookieSameSite ?? $this->cookieSameSite; | ||
|
||
/** @var CookieConfig $cookie */ | ||
/** @var CookieConfig|null $cookie */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we can't remove the Session's dependency on the Config\App
without first removing the cookie items in Config\App
and making the Config\Cookie
mandatory...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If everyone would be okay with removing session items from Config\App
in 4.4, then I see no reason why we can't do the same with cookies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sent a PR #7011 to remove cookie items.
Would everyone be okay with removing items from Config\App
in 4.4?
7e63407
to
83cbf59
Compare
83cbf59
to
d58f098
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we just need to start working on v5? All the stuff we have to break to get these components aligned is stacking.
@@ -105,26 +105,19 @@ abstract class BaseHandler implements SessionHandlerInterface | |||
*/ | |||
protected $ipAddress; | |||
|
|||
public function __construct(AppConfig $config, string $ipAddress) | |||
public function __construct(SessionConfig $session, string $ipAddress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a pretty major change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no. Almost no one writes their own session handlers, so in this particular case, the impact would be minimal. Although, I haven't thought of any other possible problems yet.
Sooner or later, v5 will come. It is more a question of where we want to draw the line. Will clearing the deprecated code and fixing some "bugs" will be enough to release v5, or are we hoping for some new features and major code rewrites? Personally, I think that v5 doesn't have to be followed by some spectacular breakthrough. Fixing a few things and cleaning up the codebase would be enough. |
@michalsn I don't disagree, but keep in mind that ultimately the major release cycle is governess by the CodeIgniter Foundation. While it's in a bit of a limbo, the last deliberation on the subject yielded a strong preference for keeping major releases to a minimum. We've been able to accomplish a lot in v4 since it's release, but at the cost of lots of breaking changes. I don't want to take v5 lightly, because I don't want to be stuck bearing these same inconsistencies and tension between proper implementation and breaking releases. I do think a focus on refactoring over new features makes sense for v5, since v4 and it's accompanying repos was so feature-focused. |
@MGatner Of course, deciding when something will be released is not my role. We have already deprecated many things in the codebase without giving any date for removing them. So common sense suggests that they will be removed in the next major version - not before. That's my only concern here. I'm not against refactoring, but it would be nice to have some path/policy for removing deprecated features so that developers won’t be surprised that some feature is gone in the next minor release. Even announcing that deprecated functionality may disappear anytime would be okay. |
I sent a PR #7021 |
Needs #6998Needs #7011
Description
Session should not depends on
Config\App
. See #4297 (comment)Config\App
session itemsConfig\Session
inSession
Checklist: