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

[5.3] Update BladeCompiler.php to change protected function stripParentheses to public #14986

Merged
merged 1 commit into from
Aug 24, 2016
Merged

Conversation

ricardogobbosouza
Copy link
Contributor

Function stripParentheses very helpfull in blade extensions

Blade::directive('example', function($expression) {
    $expression = Blade::stripParentheses($expression); // protected
    return "<?php echo example($expression); ?>";
});

@example('foo', 'bar')

@GrahamCampbell
Copy link
Member

Maybe we could bind these closures to the compliler so you could just do $this->stripParentheses. That would need to go to 5.4 though. What do you think @taylorotwell?

@taylorotwell taylorotwell merged commit 65927fc into laravel:5.3 Aug 24, 2016
@yajra
Copy link
Contributor

yajra commented Aug 24, 2016

@ricardogobbosouza I think the default behavior of blade automatically strips the parentheses from the expression? Trying to upgrade my project to 5.3 and this behavior breaks my custom directives.

https://laravel.com/docs/5.3/upgrade

@ricardogobbosouza
Copy link
Contributor Author

@yajra In version 5.3 yes, the parentheses are automatically removed.
But this function can be very useful in other cases

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.

4 participants