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

[FrameworkBundle] Serializer groups support#13107

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

Closed

Conversation

@dunglas
Copy link
Member

QA
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT
Doc PRnot yet

This PR enables serializer groups in the full stack framework (including XML, YAML, annotations and caching).

@dunglasdunglasforce-pushed theframework_serializer_groups branch 3 times, most recently from9de8a0f to47012cfCompareDecember 25, 2014 03:53
@dunglasdunglas changed the title[FrameworkBundle] Serializer groups support[WIP] [FrameworkBundle] Serializer groups supportDec 25, 2014
@dunglasdunglasforce-pushed theframework_serializer_groups branch 3 times, most recently from475e6ce to4ecb81eCompareDecember 25, 2014 10:23
@dunglasdunglas changed the title[WIP] [FrameworkBundle] Serializer groups support[FrameworkBundle] Serializer groups supportDec 25, 2014
@dunglas
Copy link
MemberAuthor

This PR is now ready to be reviewed.

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO 4 lines do not qualify for that.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ok I'll remove it.

@dunglas
Copy link
MemberAuthor

MadeObjectNormalizer the default normalizer.#13257 must be merged before this one.

@dunglas
Copy link
MemberAuthor

ping @symfony/deciders

Copy link
Member

Choose a reason for hiding this comment

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

Do we have other examples in Symfony where such a "convention" is harcoded? I know it's not the case for the routing, but probably done the same way for the translator.

Copy link
Contributor

Choose a reason for hiding this comment

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

JMSSerializerBundle which is probably the most used use theserializer directory name for configs (see conf) , but it can be changed for any bundle manually. I think we should look for resource existence before searching for a default one.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not saying that we should make it configurable. As a matter of fact, I think there is no need to make it configurable, I just wanted to be sure that we behave like other parts of the framework.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The point is to have a coherent behavior for both components (Validation, Translation, Routing...). If we allow to create a file by class (why not, I personally use annotations), it must be the same at least for validation mappings.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

For this PR, I'd prefer to keep what we have in other parts of the framework.

Copy link
Member

Choose a reason for hiding this comment

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

The Validator component just got the ability to read the configuration from a directory (see#13855). Why not adapt this approach here too?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Thanks for the pointer@xabbuh. I had not seen this PR.
Support forResources/config/serialization/*[.xml|.yml] added.

@dunglasdunglasforce-pushed theframework_serializer_groups branch from106fe6f to290d50bCompareMarch 10, 2015 10:46
@dunglas
Copy link
MemberAuthor

Rebased.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could this cause issues if cache is warmed up in one place, and later moved to another directory? I know we not necessarily support such case, but I'd rather avoid adding one more obstacle here.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Probably but this is already the case for the validator:https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L749

If we change this behavior, we must change it everywhere in another PR.

Copy link
Member

Choose a reason for hiding this comment

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

For the record, though it still looks a little odd to me to have this service here that may not be used, I do like it. As I mentioned before, it's private, so will be removed if it's not being used. And I think it ends up being quite usable. 👍

@dunglas
Copy link
MemberAuthor

Is this PR ok to be merged?

@fabpot
Copy link
Member

Thank you@dunglas.

dunglas added a commit to dunglas/symfony that referenced this pull requestMar 18, 2015
dunglas added a commit to dunglas/symfony that referenced this pull requestMar 18, 2015
dunglas added a commit that referenced this pull requestMar 19, 2015
…glas)This PR was merged into the 2.7 branch.Discussion----------[FrameworkBundle] Fix regression introduced by#13107| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aI've introduced a bug in83b56f6. An error will be throw if the serializer is enabled but no cache is set.This is the fix.Commits-------efadac0 [FrameworkBundle] Fix regression introduced by#13107
fabpot added a commit to symfony/symfony-standard that referenced this pull requestApr 15, 2015
This PR was squashed before being merged into the 2.7 branch (closes#764).Discussion----------Serializer groups support| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| License       | MITEnable serializer groups (related tosymfony/symfony#13107).Commits-------3561a7c Serializer groups support
@dunglasdunglas deleted the framework_serializer_groups branchDecember 5, 2015 09:02
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

9 participants

@dunglas@fabpot@weaverryan@jakzal@mvrhov@Tobion@aitboudad@xabbuh@Pierstoval

[8]ページ先頭

©2009-2025 Movatter.jp