yiisoft / yiisoft/user

Support datetime string for `CookieLogin` duration

Open
#84 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type:enhancement
Dominant language
PHP
Stars
23
Forks
7
Avg merge
1d 18h
Merged PRs (30d)
5

Description

See https://github.com/yiisoft/user/blob/master/config/di-web.php#L38


($duration = $params['yiisoft/user']['cookieLogin']['duration']) !== null ?
                (
                    str_starts_with($duration, 'P') ?
                    new DateInterval($duration) : 
                    DateInterval::createFromDateString($duration)
                ) :
                null,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at config/di-web.php line 38, where the CookieLogin duration is read. Trace how duration values are converted and verify that datetime strings are accepted as DateInterval values while existing formats continue to work; done means CookieLogin supports the requested datetime-string duration.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.