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][FrameworkBundle][Bridge] Add a DateInterval form type#15030

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

Conversation

@MisatoTremor
Copy link
Contributor

QA
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#13389
LicenseMIT
Doc PRsymfony/symfony-docs#4817

Replaces#13390

Copy link
Contributor

Choose a reason for hiding this comment

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

is the header copied from other files?

i think you should be named here@MisatoTremor

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yes, this is the standard copyright header.
I've put my name at the class author PHPDoc as usual. ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, i didn't know.

thank you!

@jewome62
Copy link
Contributor

🆒 !!!

When that will be integrated into the 2.8?

Copy link
Member

Choose a reason for hiding this comment

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

IMO, this if/else should be outside the try/catch, avoiding the need to catch TransformationFailedException as is (and it should use an early return)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch, makes absolute sense to put it outside.
But is it really OK to just return null if the value is something the transformer does not expect?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@stof
Just saw again that this throw > catch > throw pattern is also used in DateTimeToStringTransformer. Most probably I got it originally from there.

So maybe both should be changed (DateTimeToStringTransformer in another PR then) or just be left as is.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Simplifying the DateTimeToStringTransformer in another PR makes sense yeah. but it should indeed be a separate PR

Also add dateinterval widget to twig templates.
@MisatoTremor
Copy link
ContributorAuthor

@stof Ok, simplified the transformer and also moved the format check out of the try/catch as this also was a throw > catch > throw.
Also fixed the deprecated form type by string name references and squashed commits.

AppVeyor build failure seems because of something else, as it also fails for the same tests in other PRs, etc. and Form component test passes.

Copy link
Contributor

Choose a reason for hiding this comment

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

@MisatoTremor
Copy link
ContributorAuthor

Rebased on master

fabpot added a commit that referenced this pull requestJun 22, 2016
…m type (MisatoTremor)This PR was merged into the 3.2-dev branch.Discussion----------[Form][FrameworkBundle][Bridge] Add a DateInterval form type| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#13389| License       | MIT| Doc PR        |symfony/symfony-docs#4817Replaces#15030Commits-------f7669be [Form] Add a DateInterval form type Also add dateinterval widget to twig templates.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@MisatoTremor@jewome62@stof@sstok@OskarStark@webmozart

[8]ページ先頭

©2009-2025 Movatter.jp