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

[TwigBridge] Late deprecation for TwigRendererEngine::setEnvironment()#21021

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

Conversation

@chalasr
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets#20093 (comment)
LicenseMIT
Doc PRn/a

This method should have been deprecated in 3.2 since the twig environment should be injected through the constructor and replacing it later can break things (see#20093 (comment) for details).

Maybe this could target 3.2

@fabpot
Copy link
Member

Not sure about this one. AFAIU, the user will now receive two deprecation notices as if they don't pass Twig env as a constructor argument, they probably call the setter.

@stof
Copy link
Member

well, if they pass it in the constructor and still call the setter later, removing the setter would break their app without warning. So we need a deprecation warning there (to avoid the double deprecation warning, we may trigger it only when we already have an environment)

@chalasrchalasrforce-pushed thetwig-bridge/deprec-engine-setenv branch 2 times, most recently from28d55d1 to5ef1565CompareDecember 22, 2016 10:53
@chalasr
Copy link
MemberAuthor

Indeed, updated to avoid the double warning. Should this target 3.2? If so I'll update the corresponding UPGRADE file

@fabpot
Copy link
Member

3.3 is fine.

has been removed. Inject it into the`TwigRendererEngine` instead.

* The`TwigRendererEngine::setEnvironment()` method has been removed.
Pass the Twig Environment as second argument of the constructor instead.
Copy link
Member

Choose a reason for hiding this comment

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

Should also be documented in theUPGRADE-3.3.md file.

@chalasrchalasrforce-pushed thetwig-bridge/deprec-engine-setenv branch from5ef1565 toaabb73cCompareDecember 22, 2016 11:01
@chalasr
Copy link
MemberAuthor

UPGRADE files updated

@xabbuh
Copy link
Member

👍

@fabpot
Copy link
Member

Thank you@chalasr.

@fabpotfabpot merged commitaabb73c intosymfony:masterDec 23, 2016
fabpot added a commit that referenced this pull requestDec 23, 2016
…tEnvironment() (chalasr)This PR was merged into the 3.3-dev branch.Discussion----------[TwigBridge] Late deprecation for TwigRendererEngine::setEnvironment()| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets |#20093 (comment)| License       | MIT| Doc PR        | n/aThis method should have been deprecated in 3.2 since the twig environment should be injected through the constructor and replacing it later can break things (see#20093 (comment) for details).Maybe this could target 3.2Commits-------aabb73c Deprecate TwigRendererEngine::setEnvironment()
@chalasrchalasr deleted the twig-bridge/deprec-engine-setenv branchDecember 23, 2016 13:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@chalasr@fabpot@stof@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp