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

do not touch php tags at the beginning #57

Closed
vv12131415 opened this issue Apr 7, 2020 · 0 comments · Fixed by #99
Closed

do not touch php tags at the beginning #57

vv12131415 opened this issue Apr 7, 2020 · 0 comments · Fixed by #99

Comments

@vv12131415
Copy link

Expected Behavior

I have some blade files that start with php tag, I did that so IDE can understand what kind of type this variable is. For example

<?php
/**
 * @var \Modules\Common\PageDataBuilderV2\RenderableItems\Card $card
 */
?>
@extends('layouts.mainLayout')

@section('someBlock')
    //something
@endsection

If file starts with php tag don't touch it.

Current Behavior

file

<?php
/**
 * @var \Modules\Common\PageDataBuilderV2\RenderableItems\Card $card
 */
?>
@extends('layouts.mainLayout')

@section('someBlock')
    //something
@endsection

will be converted to

{{ /**
 * @var \Modules\Common\PageDataBuilderV2\RenderableItems\Card $card
 */ }}
@extends('layouts.mainLayout')

@section('someBlock')
    //something
@endsection

which breaks things

Possible Solution

Steps to Reproduce

  1. add <?php ?> at start of the file
  2. get exception

Possible Implementation

ignore the first <?php ?> of the file

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 a pull request may close this issue.

1 participant