Skip to content

Adding ability to create a DateTime or DateTimeImmutable from an inst…#5016

Closed
mikeSimonson wants to merge 6 commits into
php:masterfrom
mikeSimonson:datetime-create-from-interface
Closed

Adding ability to create a DateTime or DateTimeImmutable from an inst…#5016
mikeSimonson wants to merge 6 commits into
php:masterfrom
mikeSimonson:datetime-create-from-interface

Conversation

@mikeSimonson

Copy link
Copy Markdown
Contributor

…ance of the interface

Comment thread ext/date/php_date_arginfo.h Outdated
@nikic nikic requested a review from derickr December 16, 2019 13:56
@nikic

nikic commented Dec 16, 2019

Copy link
Copy Markdown
Member

+1 on these methods. Ideally we'd have just added these instead of createFromMutable+createFromImmutable.

@derickr derickr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with this idea, as Mike and I discussed this recently.

Comment thread ext/date/php_date_arginfo.h Outdated
Comment thread ext/date/php_date.c Outdated
Comment thread ext/date/php_date.c Outdated
Comment thread ext/date/tests/DateTime_verify.phpt Outdated
Comment thread ext/date/tests/DateTime_createFromInterface.phpt Outdated
@mikeSimonson

Copy link
Copy Markdown
Contributor Author

@derickr @nikic How can I run the test only for certain phpt files with as much information as possible related to a failure ?

@derickr

derickr commented Dec 16, 2019

Copy link
Copy Markdown
Member

@mikeSimonson TESTS=ext/date/foo.phpt make test and if it fails, there should be a ext/date/foo.sh file which contains the full line that was used to execute that test

Comment thread ext/date/php_date.stub.php Outdated
@mikeSimonson mikeSimonson force-pushed the datetime-create-from-interface branch from fbcad83 to fea4392 Compare December 22, 2019 00:56
@mikeSimonson mikeSimonson force-pushed the datetime-create-from-interface branch from fea4392 to 2bbf3d4 Compare December 22, 2019 08:37
@mikeSimonson

Copy link
Copy Markdown
Contributor Author

As far as I can tell this PR is ready tested and respect the CS ?
Any other issue to fix ?

@nikic nikic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but let's wait until Derick has had a look at this as well.

@derickr derickr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please fix the two nits before merging.

int(1)
["timezone"]=>
string(6) "+01:00"
} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: please make sure the last line also has a new line at the end (but not an extra empty line)

int(1)
["timezone"]=>
string(6) "+01:00"
} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: please make sure the last line also has a new line at the end (but not an extra empty line)

@cmb69

cmb69 commented Jan 3, 2020

Copy link
Copy Markdown
Member

It seems to me that this PR obsoletes PR #3394.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants