Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twig extension refactoring #3701

Merged
merged 4 commits into from
Apr 4, 2016

Conversation

greg0ire
Copy link
Contributor

@greg0ire greg0ire commented Apr 2, 2016

I wanted to work on the api closing, but ended up making this big backwards-compatible refactoring, which is BC.

greg0ire added 4 commits April 2, 2016 19:25
They make diffs harder to read, and window vertical split less useful.
Because of the last argument, this is actually impossible to use.
The special "exception" argument is better because it can even be used
to display a stack trace.
@greg0ire
Copy link
Contributor Author

greg0ire commented Apr 2, 2016

Please review this @core23 @OskarStark

@core23
Copy link
Member

core23 commented Apr 2, 2016

LGTM

@greg0ire
Copy link
Contributor Author

greg0ire commented Apr 4, 2016

ping @core23 @OskarStark please merge

$templateName,
$fieldDescription->getFieldName(),
$defaultTemplate
), array('exception' => $e));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@core23 @OskarStark BTW : this whole $defaultTemplate thing does not make much sense, don't you think? Removing it would be a BC break, but I think we should remove that for 3.0

Copy link
Member

Choose a reason for hiding this comment

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

Feel free to create a separate PR for this. Do you want to remove the $defaultTemplate for the log or in general? @greg0ire

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In general. I can't imagine why one would want to have this.

Copy link
Member

Choose a reason for hiding this comment

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

Don't know if there is a concrete case for this. Maybe someone else could review that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code was initially added with an interesting comment :

// todo: find a better solution

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll work on a PR, see if it breaks things.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@core23 core23 merged commit 1c6a15f into sonata-project:master Apr 4, 2016
@greg0ire greg0ire deleted the twig_extension_refactoring branch April 4, 2016 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants