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

Blade php shorthand was re-introduced with Sage 10 #2491

Closed
4 tasks done
dawidurbanski opened this issue Jun 20, 2020 · 2 comments
Closed
4 tasks done

Blade php shorthand was re-introduced with Sage 10 #2491

dawidurbanski opened this issue Jun 20, 2020 · 2 comments

Comments

@dawidurbanski
Copy link

Description

In sage 9 we had php blade shorthand used in many places (@php(something())), but at some point after someone correctly pointed out (here) this shorthand was deprecated by blade and it was later removed by this and this, in favour of long form (@php something() @endphp).

With the following PR the same shorthand we re-introduced in many places:

#2122

To be more precise in these files:

https://github.com/roots/sage/pull/2138/files#diff-e09897fbdd2918deee752b67af496219
https://github.com/roots/sage/pull/2138/files#diff-247464e8a323304ef08b46558bf5a2fd
https://github.com/roots/sage/pull/2138/files#diff-8de5e7d2e658d0e8e22455127ff569ee
https://github.com/roots/sage/pull/2138/files#diff-21503203223292a031e9846d62475cac
https://github.com/roots/sage/pull/2138/files#diff-d9a6166239d8c4c0f303cf92c0c84d14
https://github.com/roots/sage/pull/2138/files#diff-fc43d41c4d0653820b99f0692689c9f5
https://github.com/roots/sage/pull/2138/files#diff-858c467c85fc822ba60439c4048bb48a
https://github.com/roots/sage/pull/2138/files#diff-523bdef1518642d82293490b410cd7a8
https://github.com/roots/sage/pull/2138/files#diff-3d83f5734433c59ae117ffd70ecf88fe
https://github.com/roots/sage/pull/2138/files#diff-e6c6583e10bcc9c6232d75a18c415dca
https://github.com/roots/sage/pull/2138/files#diff-ace29c022ecb3da4003716240b6da8fb
https://github.com/roots/sage/pull/2138/files#diff-b537a90068d54375cfcc450b389a4980

Did something change in this shorthand matter from Laravel side that I'm not aware of?

From what I see they don't even mention this syntax at all in the docs any more: https://laravel.com/docs/7.x/blade#php

Steps to reproduce

  1. Just go to the code.

Expected behavior: No @php shorthand in the codebase

Actual behavior: The shorthand is all over the place

Reproduces how often: 100%

Versions

10.0.0-alpha.1

@QWp6t
Copy link
Member

QWp6t commented Jun 20, 2020

@Log1x had some reasoning for it but I don't remember what it was. I'll let him explain it.

@Log1x
Copy link
Member

Log1x commented Jul 8, 2020

I explain my reasoning in the second bullet under enhancements on #2171

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

No branches or pull requests

3 participants