Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] Addinput=date_point toDateTimeType,DateType andTimeType#60315

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:7.4fromwkania:data_point_form
May 30, 2025

Conversation

wkania
Copy link
Contributor

@wkaniawkania commentedMay 1, 2025
edited
Loading

QA
Branch?7.4
Bug fix?no
New feature?yes
Deprecations?no
Issues
LicenseMIT

Based ondatetime_immutable.

AfterDatePointType andDatePointDateType, it would be great to use Forms without needing to transform values into the DatePoint type manually.

use Symfony\Component\Form\Extension\Core\Type\DateType;use Symfony\Component\Form\Extension\Core\Type\DateTimeType;use Symfony\Component\Form\Extension\Core\Type\TimeType;use Symfony\Component\Form\Extension\Core\Type\BirthdayType;$builder->add('from', DateType::class, [    'input' => 'date_point',]);$builder->add('from', DateTimeType::class, [    'input' => 'date_point',]);$builder->add('from', TimeType::class, [    'input' => 'date_point',]);$builder->add('from', BirthdayType::class, [    'input' => 'date_point',]);

Alternative: Make symfony/clock a hard requirement and refactor the existing DateTimeImmutableToDateTimeTransformer to return a DatePoint instead. This should not introduce any breaking changes.

garak reacted with thumbs up emoji
@carsonbotcarsonbot added this to the7.3 milestoneMay 1, 2025
@wkaniawkania changed the title[Form] Add to DateTimeType, DateType and TimeType[Form] Add DatePoint to DateTimeType, DateType and TimeTypeMay 1, 2025
@wkaniawkania changed the title[Form] Add DatePoint to DateTimeType, DateType and TimeType[Form] Addinput=date_point to DateTimeType, DateType and TimeTypeMay 1, 2025
@xabbuh
Copy link
Member

The approach makes sense to me.

wkania reacted with thumbs up emoji

@wkaniawkaniaforce-pushed thedata_point_form branch 2 times, most recently fromcb58650 to521e9cfCompareMay 2, 2025 18:06
@wkaniawkania requested a review fromycerutoMay 2, 2025 18:07
@wkania
Copy link
ContributorAuthor

I have added DateTimeType and TimeType.

Copy link
Member

@ycerutoyceruto left a comment

Choose a reason for hiding this comment

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

LGTM!

@OskarStarkOskarStark changed the title[Form] Addinput=date_point to DateTimeType, DateType and TimeType[Form] Addinput=date_point toDateTimeType,DateType andTimeTypeMay 5, 2025
Copy link
Member

@alexandre-dauboisalexandre-daubois left a comment

Choose a reason for hiding this comment

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

After Oskar's comment

@ksn135
Copy link

@fabpotfabpot modified the milestones:7.3,7.4May 26, 2025
@wkania
Copy link
ContributorAuthor

Updated Changelog 7.3 ->7.4.

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Good to me once this minor comment +@xabbuh's have been addressed

@nicolas-grekas
Copy link
Member

Thank you@wkania.

wkania reacted with hooray emoji

@nicolas-grekasnicolas-grekas merged commit21c1205 intosymfony:7.4May 30, 2025
10 of 11 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@xabbuhxabbuhxabbuh left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@ycerutoycerutoyceruto approved these changes

@OskarStarkOskarStarkAwaiting requested review from OskarStark

@alexandre-dauboisalexandre-dauboisAwaiting requested review from alexandre-daubois

Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

9 participants
@wkania@xabbuh@ksn135@nicolas-grekas@OskarStark@yceruto@alexandre-daubois@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp