Skip to content

fix(utility): De- deprecate getDateTime and getTime as now() only returns DateTimeImmutable - #39511

Merged
nickvergessen merged 1 commit into
masterfrom
fix/reverse-getDateTime-deprecation
Aug 25, 2023
Merged

fix(utility): De- deprecate getDateTime and getTime as now() only returns DateTimeImmutable#39511
nickvergessen merged 1 commit into
masterfrom
fix/reverse-getDateTime-deprecation

Conversation

@miaulalala

@miaulalalamiaulalala commented Jul 20, 2023

Copy link
Copy Markdown
Contributor

This will mean lots of code like
$dateTime = (new DateTime())->setTimestamp(ITimeFactory::now()->getTimestamp())
if a regular DateTime object is needed

Checklist

@miaulalalamiaulalala added the 3. to review Waiting for reviews label Jul 20, 2023
@miaulalala
miaulalala requested review from a team and nickvergessenJuly 20, 2023 15:01
@miaulalalamiaulalala self-assigned this Jul 20, 2023
@miaulalala
miaulalala requested review from ArtificialOwl, icewind1991 and nfebe and removed request for a teamJuly 20, 2023 15:02
@miaulalala

Copy link
Copy Markdown
ContributorAuthor

/backport to stable27

@miaulalala

Copy link
Copy Markdown
ContributorAuthor

/backport to stable26

@miaulalala

miaulalala commented Jul 26, 2023

Copy link
Copy Markdown
ContributorAuthor

Failing test is Scenario: log in with invalid user once fixed by admin - unrelated.

@miaulalala
miaulalalaforce-pushed the fix/reverse-getDateTime-deprecation branch 2 times, most recently from ea72ac1 to eaec1d7CompareAugust 18, 2023 06:16
@miaulalalamiaulalala changed the title fix(utility): De- deprecate getDateTime as now() only returns DateTimeImmutablefix(utility): De- deprecate getDateTime and getTime as now() only returns DateTimeImmutableAug 18, 2023
@miaulalala
miaulalalaforce-pushed the fix/reverse-getDateTime-deprecation branch from eaec1d7 to 1989abcCompareAugust 25, 2023 06:19
…le objects
This will mean lots of code like
```$dateTime = (new DateTime())->setTimestamp(ITimeFactory::now()->getTimestamp()```
if a regular DateTime object is needed
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala
miaulalalaforce-pushed the fix/reverse-getDateTime-deprecation branch from 1989abc to 66c1aa4CompareAugust 25, 2023 06:56
@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable26 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@miaulalala@nickvergessen@Altahrim@bigcat88@skjnldsv