10000 [PHP 8.3] Add Exception/Error classes for `Date/Time` extension by Ayesh · Pull Request #440 · symfony/polyfill · GitHub
[go: up one dir, main page]

Skip to content

[PHP 8.3] Add Exception/Error classes for Date/Time extension #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

Ayesh
Copy link
Contributor
@Ayesh Ayesh commented Aug 14, 2023

Adds nine classes for the new exceptions/errors declared in ext-date.

Adds nine classes for the new exceptions/errors declared in ext-date.

 - [RFC: PHP RFC: More Appropriate Date/Time Exceptions](https://wiki.php.net/rfc/datetime-exceptions)
 - [PHP.Watch: DateTime Exception Class Polyfill](https://php.watch/versions/8.3/datetime-exceptions#polyfill)
@nicolas-grekas
Copy link
Member

Thank you @Ayesh.

@nicolas-grekas nicolas-grekas merged commit 174a51b into symfony:1.x Aug 16, 2023
nicolas-grekas added a commit to symfony/symfony that referenced this pull request Aug 17, 2023
…lidTimeZoneException` when appropriate (nicolas-grekas)

This PR was merged into the 6.4 branch.

Discussion
----------

[Clock] Throw `DateMalformedStringException`/`DateInvalidTimeZoneException` when appropriate

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This PR leverages symfony/polyfill#440 and https://wiki.php.net/rfc/datetime-exceptions to provide consistent error handling when malformed dates/timezones are given.

Commits
-------

0262573 [Clock] Throw `DateMalformedStringException`/`DateInvalidTimeZoneException` when appropriate
Sign up for free to 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.

2 participants
0