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] Add default mapping path for serializer component in bundle-less app#24833

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
fabpot merged 1 commit intosymfony:3.4fromyceruto:serializer_path
Nov 10, 2017

Conversation

@yceruto
Copy link
Member

@ycerutoyceruto commentedNov 6, 2017
edited
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PRToDo

http://symfony.com/doc/current/serializer.html#using-serialization-groups-annotations:
In addition to the@groups annotation, the Serializer component also supports Yaml or XML files. These files are automatically loaded when being stored in one of the following locations:

  • Theserialization.yml orserialization.xml file in theResources/config/ directory of a bundle;
  • All*.yml and*.xml files in theResources/config/serialization/ directory of a bundle.

Inspired by the second convention, this proposal adds one more but for bundle-less structure. Theoretically this is what it does for you:

framework:serializer:mapping:paths:                -'%kernel.project_dir%/config/serializer/'

@ycerutoyceruto changed the title[FrameworkBundle] Add groups configuration for serializer component in bundle-less application[FrameworkBundle] Add default mapping path for serializer component in bundle-less appNov 6, 2017
@yceruto
Copy link
MemberAuthor

yceruto commentedNov 6, 2017
edited
Loading

I just see this issue#21187 related to the same proposal by@chalasr:

Shouldn't we try to detect those configuration files in%kernel.root_dir%/Resources/config/serialization as well?

I hope it makes more sense now for Symfony 4 structure.

@ycerutoycerutoforce-pushed theserializer_path branch 5 times, most recently fromd4b9c2a toa1d852dCompareNovember 6, 2017 05:39
@ogizanagi
Copy link
Contributor

ogizanagi commentedNov 6, 2017
edited
Loading

Not sure theResources directory still makes sense for this with Flex. Ideally, if Symfony has adopted the rootres/ directory, I'd put it there in ares/serializer directory, next to templates, translations, validation mapping & other resources used by the application.
But for now, I put it inconfig/serializer. Notsrc/Resources/config/serializer. Actually my kernel isn't even atsrc/ root. IMHO%kernel.root_dir% should be avoided as much as possible now.

yceruto reacted with thumbs up emoji

@sroze
Copy link
Contributor

AFAIKres/ did not happen yet so I'd go forconfig/serializer, that would make sense to me.

@yceruto
Copy link
MemberAuthor

Changed to%kernel.project_dir%/config/serializer/ by now 👍

@xabbuhxabbuh added this to the4.1 milestoneNov 6, 2017
Copy link
Member

@dunglasdunglas left a comment

Choose a reason for hiding this comment

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

Should be merged in 3.4 as a bug fix. We should probably do the same for the validator component.

@yceruto
Copy link
MemberAuthor

@dunglas great! see#24856 for the Validator component.

@ycerutoyceruto changed the base branch frommaster to3.4November 7, 2017 13:57
@yceruto
Copy link
MemberAuthor

Rebased to 3.4 (same opinion of@nicolas-grekas here#24856 (comment))

@chalasr
Copy link
Member

So, we are moving fromconfig/serialization/ toconfig/serializer/ (same for validation/validator in#24856)?
No strong opinion on that, slightly preferserializer as it reflects the package name.
Shouldn't the new name be supported for other paths (e.g.Resources/config/serializer for bundles)?

@fabpot
Copy link
Member

I don't think we need to support the new name for the old paths.

@fabpot
Copy link
Member

Thank you@yceruto.

@fabpotfabpot merged commit43895b8 intosymfony:3.4Nov 10, 2017
fabpot added a commit that referenced this pull requestNov 10, 2017
…component in bundle-less app (yceruto)This PR was merged into the 3.4 branch.Discussion----------[FrameworkBundle] Add default mapping path for serializer component in bundle-less app| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | ToDo>http://symfony.com/doc/current/serializer.html#using-serialization-groups-annotations:> In addition to the@groups annotation, the Serializer component also supports Yaml or XML files. These files are automatically loaded when being stored in one of the following locations:>* The `serialization.yml` or `serialization.xml` file in the `Resources/config/` directory of a bundle;>* All `*.yml` and `*.xml` files in the `Resources/config/serialization/` directory of a bundle.Inspired by the second convention, this proposal adds one more but for bundle-less structure. Theoretically this is what it does for you:```yamlframework:    serializer:        mapping:            paths:                - '%kernel.project_dir%/config/serializer/'```Commits-------43895b8 Add default mapping path for serializer component
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestNov 10, 2017
…omponent in bundle-less app (yceruto)This PR was merged into the 3.4 branch.Discussion----------[FrameworkBundle] Add default mapping path for validator component in bundle-less app| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | ToDoSame approach ofsymfony/symfony#24833Commits-------4e0daecc63 Add default mapping path for validator component
fabpot added a commit that referenced this pull requestNov 10, 2017
…omponent in bundle-less app (yceruto)This PR was merged into the 3.4 branch.Discussion----------[FrameworkBundle] Add default mapping path for validator component in bundle-less app| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | ToDoSame approach of#24833Commits-------4e0daec Add default mapping path for validator component
@ycerutoyceruto deleted the serializer_path branchNovember 10, 2017 19:20
This was referencedNov 12, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@dunglasdunglasdunglas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

8 participants

@yceruto@ogizanagi@sroze@chalasr@fabpot@dunglas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp