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

Cookbook entry: Asset - Custom Version Strategy#5489

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

@teohhanhui
Copy link
Contributor

QA
Doc fix?no
New docs?yes
Applies to2.7+
Fixed tickets#4982

@teohhanhuiteohhanhuiforce-pushed thecookbook_asset_custom_version_strategy branch from94bd6ba tob5f5b71CompareJuly 5, 2015 21:27
@teohhanhuiteohhanhui changed the titleCookbook entry: Asset - custom version strategyCookbook entry: Asset - Custom Version StrategyJul 5, 2015
@teohhanhuiteohhanhuiforce-pushed thecookbook_asset_custom_version_strategy branch 2 times, most recently from1c48a83 to79564d2CompareJuly 5, 2015 22:11
Copy link
Contributor

Choose a reason for hiding this comment

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

which package?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

That's an empty string. I should make that clearer.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you!

@OskarStark
Copy link
Contributor

great job@teohhanhui

@teohhanhuiteohhanhuiforce-pushed thecookbook_asset_custom_version_strategy branch from79564d2 to4daa0f9CompareJuly 17, 2015 06:08

Choose a reason for hiding this comment

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

I'd like to reword this paragraph. Instead of saying: "Symfony has some options to tweak things" ... we could say something like: "Symfony uses by default the XXX asset versioning strategy. Its behavior can be controlled with the xxx and yyy configuration options".

@javiereguiluz
Copy link
Member

@teohhanhui thanks for writing this article. I like it a lot because I didn't know how to define your own asset versioning strategy 👍

@teohhanhuiteohhanhuiforce-pushed thecookbook_asset_custom_version_strategy branch from4daa0f9 to8d71390CompareJuly 17, 2015 09:12
@teohhanhui
Copy link
ContributorAuthor

Anything else that you need me to change?

Copy link
Contributor

Choose a reason for hiding this comment

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

you could put this "Note" in a note block

@teohhanhuiteohhanhuiforce-pushed thecookbook_asset_custom_version_strategy branch 3 times, most recently fromcb1c157 to254ddacCompareJuly 23, 2015 14:36
Copy link
Member

Choose a reason for hiding this comment

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

"use" must be capitalised

@teohhanhuiteohhanhuiforce-pushed thecookbook_asset_custom_version_strategy branch from254ddac to2f8f74bCompareJuly 25, 2015 09:55
Copy link
Member

Choose a reason for hiding this comment

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

this is wrong. Your XML config is passing a single argument to BusterVersionStrategy which is an array with 2 elements, which does not match at all the config in other formats

Copy link
Member

Choose a reason for hiding this comment

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

hmm no sorry. It does match them. I looked at it too fast. However, I don't think passing an array of option is worth it. Just configure things with normal arguments.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Since PHP doesn't have named arguments, it's rather unfortunate that things become unrecognizable soon when you no longer know what's what.

@teohhanhuiteohhanhuiforce-pushed thecookbook_asset_custom_version_strategy branch from2f8f74b tob770f79CompareAugust 1, 2015 13:18
@teohhanhui
Copy link
ContributorAuthor

Are we good yet?

@OskarStark
Copy link
Contributor

i would say: yes

@xabbuh
Copy link
Member

Wow, I really like this article! 👍 However, I think we should just move some contents around to show a more straight-forward implementation. What I have in mind to have short introduction which list the required steps:

  • implement the version strategy
  • create the compiler pass
  • register the compiler

I also think we should not focus on the default package. We can make the compiler pass generic and pass the package name as an argument to the constructor (we could just use the default package name in our example and add a sidebar which adds a short explanation about packages in general and the default package here). What do you think?

@teohhanhui
Copy link
ContributorAuthor

@xabbuh

add a sidebar which adds a short explanation about packages in general and the default package here

Sidebar?

@xabbuh
Copy link
Member

@teohhanhui You can use asidebar directive like this:

..sidebar::sidebar title    sidebar contents

Technically, it will not be rendered as a sidebar on symfony.com, but more like an additional note.

@xabbuh
Copy link
Member

@teohhanhui Are you able to finish this one? :)

return $versionized;
}

private function loadManifest(array $options)

Choose a reason for hiding this comment

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

$options is never used, should be removed.

But great work on this cookbook article! Is exactly what I was looking for.

@teohhanhui
Copy link
ContributorAuthor

@xabbuh Will try...

@javiereguiluz
Copy link
Member

Closing it in favor of#7141, which finishes this great article. Thanks@teohhanhui for your work. I've reused your original commits, so you'll get full credit for your work.

teohhanhui reacted with hooray emoji

xabbuh added a commit that referenced this pull requestDec 12, 2016
…teohhanhui, javiereguiluz)This PR was merged into the 2.7 branch.Discussion----------Added "How to Use a Custom Version Strategy for Assets"This PR finishes the great work made by@teohhanhui in#5489.Commits-------1399967 Fixed a label name981e82d Misc fixesa02f3b3 Added the version_strategy option to the config reference2830ba0 Added the missing doc label482fda5 Minor rewords and fixesf038483 Removed an unneeded changeab8fa54 Fixed a rebase errorc59cff6 Moved the article to its new location5971ce0 Removed an unneeded file40dff64 Minor updates to the doc and service config80d0ca2 Simplified the intro4f530d8 Cookbook entry: Asset - Custom Version Strategy
xabbuh added a commit that referenced this pull requestDec 14, 2016
… (xabbuh)This PR was merged into the 3.1 branch.Discussion----------Added "How to Use a Custom Version Strategy for Assets"Another attempt to finish@teohhanhui's great work from#5489.This willfix#6205.Commits-------d3308be Added "How to Use a Custom Version Strategy for Assets"
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.

6 participants

@teohhanhui@OskarStark@javiereguiluz@xabbuh@BartVB@stof

[8]ページ先頭

©2009-2025 Movatter.jp