major697 major697 - 1 month ago 12
PHP Question

Disappearing function "use" in Sublime Text 3

I have a problem with function "use" in Sublime Text 3 (version: 3114).
I am using framework Laravel and when I want edit MY file


...\app\Http\Controller\PagesController.php:


<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

class PagesController extends Controller
{
public function contact(){
return 'KONTAKT';
}

public function about(){
return 'O NAS';
}
}


And when I click SAVE then disappears me part of the code, and I have this code:

<?php

namespace App\Http\Controllers;

class PagesController extends Controller {
public function contact() {
return 'KONTAKT';
}

public function about() {
return 'O NAS';
}
}


I don't have these two lines:

use Illuminate\Http\Request;
use App\Http\Requests;


Why this happens? Can somehow fix this ?

P.S I remember that the same thing has happened with Symfony. I had to use a different editor (Notepad++)

This is list my plugin:


  1. "CSSLint",

  2. "DocBlockr",

  3. "Emmet",

  4. "FTPSync",

  5. "HTML-CSS-JS Prettify",

  6. "HTML5",

  7. "JavaScript Completions",

  8. "jQuery",

  9. "JsFormat",

  10. "JSHint",

  11. "LiveReload",

  12. "MySQL Snippets",

  13. "Nettuts+ Fetch",

  14. "Package Control",

  15. "PHP Companion",

  16. "PHP Completions Kit",

  17. "PHP MySQLi connection",

  18. "PHP Zend Framework 2 Helper",

  19. "Phpcs",

  20. "PhpDoc",

  21. "phpfmt",

  22. "PhpNamespace",

  23. "PHPUnit",

  24. "PHPUnit Completions",

  25. "Search WordPress Codex or QueryPosts",

  26. "SublimeCodeIntel",

  27. "SublimeLinter",

  28. "SublimeLinter-contrib-bootlint",

  29. "SublimeLinter-csslint",

  30. "SublimeLinter-html-tidy",

  31. "SublimeLinter-jshint",

  32. "SublimeLinter-php",

  33. "SublimeLinter-phpcs",

  34. "SublimeLinter-phplint",

  35. "WordPress",

  36. "WordPress Developer Resources",

  37. "WordpressDev"


Answer

I removed the plugin: phpfmt. Now works correctly;) Link to phpfmt :enter link description here