User tests: Successful: Unsuccessful:
Fix deprecated parameters in cookie set method calls
joomla-cms/libraries/src/Input/Cookie.php
Lines 80 to 88 in fd96379
remember me
login function in frontendFurther information: #45728 (comment)
old signature is used to set cookie
Joomla\CMS\Input\Cookie::set($name, $value, $expire, $path, $domain, $secure, $httpOnly)
new signature is used to set cookie
Joomla\CMS\Input\Cookie::set($name, $value, $options)
Please select:
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries Front End Plugins |
Labels |
Added:
PR-5.4-dev
|
the title of this PR and the description in the summary do not make sense with the code changes
BEFORE and AFTER applying the PR and I do not see anything different, what can I check/should I see to validate this test?
Yes the cookies should be equal
Also as I don't use the Remember Me feature (i.e. my browser offers up Username/Password combination natively)
This function sets an additional cookie which do not expire with the session. If you close and open the browser, you are logged in without click the login button.
what can I check/should I see to validate this test?
@exlemor You have already done this: check if cookies are equal BEFORE and AFTER and deleted if you do logout
additional check the log file (activate it in Global Configuration) administrator\logs\deprecated.php
- file may be very large
and check if you find something like this message - BEFORE: present; AFTER: gone (either delete the file or check the timestamp for the new entries after apply the patch):
deprecated Since joomla/input 1.4.0: The Joomla\CMS\Input\Cookie::set($name, $value, $expire, $path, $domain, $secure, $httpOnly) signature is deprecated and will not be supported once support for PHP 7.2 and earlier is dropped, use the Joomla\CMS\Input\Cookie::set($name, $value, $options) signature instead
the title of this PR and the description in the summary do not make sense with the code changes
Sometimes I have no idea how best to describe it. @brianteeman Suggestions are welcome
Sometimes I have no idea how best to describe it. @brianteeman Suggestions are welcome
Maybe something like "[5.4] Fix deprecated cookie set method calls"?
And for the summary of changes: "Fix deprecated parameters in cookie set method calls"?
Title |
|
I have tested this item ✅ successfully on 1b803c5
I was able to test this successfully - thanks @heelc29 for the additional explanations (allowed me to retest more confidently).
I have tested this item ✅ successfully on 1b803c5
tested and no deprecation message in the logs after applying this PR
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
|
Final test before merge with: JBT, http, enabled Log Deprecated API; macOS Safari 18.5, Chrome 138, Firefox 141
joomla_remember_me_*
cookie exists and expires 2025-09-21Cookie::set
deprecated messagesjoomla_remember_me_*
cookie exists and expires 2025-09-21Cookie::set
deprecated messagesStatus | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-07-23 16:31:31 |
Closed_By | ⇒ | muhme |
Thank you @heelc29 for your contribution. Thank you @exlemor and @brianteeman for testing.
I have tested this item ✅ successfully on 82d5522
Tested successfully, works as expected!
@krishnaGandhi11 Thanks for testing. However, this PR is already merged, so no need for testing anymore.
@heelc29 - During the Friday PR testing sessions, I was testing this PR, I have checked the Console --> Network --> Cookies BEFORE and AFTER applying the PR and I do not see anything different, what can I check/should I see to validate this test?
Also as I don't use the Remember Me feature (i.e. my browser offers up Username/Password combination natively), what is Remember me supposed to do because the behavior when I check the box or not is the same - I was expecting it like it does on other sites to remember my username (which it doesn't - perhaps because of the Safari browser overriding things with its native offering up of the Username/Password feature)...
Thanks.