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

Path fixed#5507

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
carlosreig wants to merge3 commits intosymfony:2.7fromcarlosreig:patch-1
Closed

Path fixed#5507

carlosreig wants to merge3 commits intosymfony:2.7fromcarlosreig:patch-1

Conversation

carlosreig
Copy link
Contributor

Path fixed since TwigBridge v2.7 changed the folder structure

Path fixed since to TwigBridge v2.7 changed the folder structure
@xabbuh
Copy link
Member

Good catch@carlosreig. However, I think we should do better than hardcoding paths in thevendor directory.

What about using reflection here to determine the path to theTwigEngine class which reside in the top level directory of the TwigBridge?

@carlosreig
Copy link
ContributorAuthor

Cool! Good idea. I will work on it.

@carlosreig
Copy link
ContributorAuthor

Changed the hardcoded path by a ReflectionClass of the AppVariable class located in the TwigBridge library.
Used AppVariable instead of TwigEngine because TwigEngine has dependencies on the Templating component that is not needed if using the Form component outside Symfony framework.

@wouterj
Copy link
Member

👍

// form_div_layout.html.twig file
$vendorTwigBridgeDir =
$vendorDir.'/symfony/twig-bridge/Symfony/Bridge/Twig';
$appVariableReflection = new \ReflectionClass( '\Symfony\Bridge\Twig\AppVariable' );
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove the spaces around the argument?

@carlosreig
Copy link
ContributorAuthor

Done! The spaces around the parameter are removed.

@wouterj
Copy link
Member

Thank you Carlos! This is a very flexible solution to fix the hardcoded path :)

wouterj added a commit that referenced this pull requestSep 5, 2015
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes#5507).Discussion----------Path fixedPath fixed since TwigBridge v2.7 changed the folder structureCommits-------8d7b5db Path fixed
@wouterjwouterj closed thisSep 5, 2015
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.

4 participants
@carlosreig@xabbuh@wouterj@javiereguiluz

[8]ページ先頭

©2009-2025 Movatter.jp