Skip to content

Change warnings to Errors in Date extension - #4976

Closed
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:datetime-warnings-to-error
Closed

Change warnings to Errors in Date extension#4976
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:datetime-warnings-to-error

Conversation

@Girgias

Copy link
Copy Markdown
Member

No description provided.

@Girgias
Girgiasforce-pushed the datetime-warnings-to-error branch from 79e2174 to a2fc26eCompareDecember 7, 2019 02:24
@Girgias
Girgiasforce-pushed the datetime-warnings-to-error branch from a2fc26e to e3ffc8fCompareDecember 7, 2019 03:08
@cmb69
cmb69 requested a review from derickrDecember 7, 2019 08:33
@derickr

Copy link
Copy Markdown
Member

I'm not so keen, as this is a BC break.

@Girgias

Copy link
Copy Markdown
MemberAuthor

I'm not so keen, as this is a BC break.

Are you opposed to the change in general or to some specific instances?

Because some of them do fall in line with the various other changes I've made to throw on programming/logic errors.

@cmb69

Copy link
Copy Markdown
Member

In my opinion, some of these changes are fine (e.g. throwing on "Timezone database is corrupt"), but some appear to be too aggressive (e.g. throwing on "Failed to parse interval"). Basically, it boils down to whether the programmer has a chance to validate user-supplied input, or whether it would be necessary to try calling the function/method.

@Girgias

Copy link
Copy Markdown
MemberAuthor

In my opinion, some of these changes are fine (e.g. throwing on "Timezone database is corrupt"), but some appear to be too aggressive (e.g. throwing on "Failed to parse interval"). Basically, it boils down to whether the programmer has a chance to validate user-supplied input, or whether it would be necessary to try calling the function/method.

Which seems totally reasonable, I'll need to rebase and rework this anyway when I've got time to use the new argument version of the Value errors.

@Girgias

Copy link
Copy Markdown
MemberAuthor

Superseded by #5613

@GirgiasGirgias closed this May 22, 2020
@Girgias
Girgias deleted the datetime-warnings-to-error branch May 22, 2020 15:11
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Girgias@derickr@cmb69