PHPStorm For Laravel 設定してみた
ユニラボでは最近有償エディタのライセンスを会社負担で購入できる制度ができまして早速申請して初期設定をしてみました。
元々VScodeで開発していたのですが、こういう機会がないと新しいエディタに触れる機会がないのとさらに開発効率が上がることを期待して乗り換えてみました!
PHPStorm設定
1. 日本語化
https://plugins.jetbrains.com/plugin/13964-japanese-language-pack------
2. Rainbow Brackets
https://plugins.jetbrains.com/plugin/10080-rainbow-brackets
3. Laravel
https://plugins.jetbrains.com/plugin/7532-laravel
4. Blade
https://plugins.jetbrains.com/plugin/7569-blade/
5. deep-assoc-completion
https://plugins.jetbrains.com/plugin/9927-deep-assoc-completion
6. yaml-ansible-support
https://plugins.jetbrains.com/plugin/7792-yaml-ansible-support
7. Vue.js
https://plugins.jetbrains.com/plugin/9442-vue-js
8 laravel-ide-helper
https://qiita.com/mejileben/items/a01f03d203ead8cb7081
root@4beebc84e1f9:/var/www# php artisan clear-compiled
Compiled services and packages files removed!
root@4beebc84e1f9:/var/www# php artisan ide-helper:generate
A new helper file was written to _ide_helper.php
root@4beebc84e1f9:/var/www# php artisan ide-helper:meta
A new meta file was written to .phpstorm.meta.php
root@4beebc84e1f9:/var/www# php artisan ide-helper:model
Do you want to overwrite the existing model files? Choose no to write to _ide_helper_models.php instead (yes/no) [no]:
> no
9. PHP8.0に変更
10. コード整形
shit + option + command + l 同時押し
> https://www.jetbrains.com/help/phpstorm/2021.1/reformat-file-dialog.html
11. php_codesniffer
11-1 . mac に composer install
11-2. mac に php_codesniffer install
user@UL-PC-IA ~ % brew install composer
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
elfutils slides
==> Updated Formulae
Updated 194 formulae.
==> Downloading https://getcomposer.org/download/2.1.3/composer.phar
######################################################################## 100.0%
🍺 /usr/local/Cellar/composer/2.1.3: 3 files, 2.2MB, built in 4 seconds
user@UL-PC-IA ~ % composer global require "squizlabs/php_codesniffer=*"
zsh: command not found: composer
user@UL-PC-IA ~ % brew install composer
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
elfutils slides
==> Updated Formulae
Updated 194 formulae.
==> Downloading https://getcomposer.org/download/2.1.3/composer.phar
######################################################################## 100.0%
🍺 /usr/local/Cellar/composer/2.1.3: 3 files, 2.2MB, built in 4 seconds
user@UL-PC-IA ~ % composer global require "squizlabs/php_codesniffer=*"
Changed current directory to /Users/user/.composer
./composer.json has been created
Running composer update squizlabs/php_codesniffer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking squizlabs/php_codesniffer (3.6.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Downloading squizlabs/php_codesniffer (3.6.0)
- Installing squizlabs/php_codesniffer (3.6.0): Extracting archive
Generating autoload files
11-3. PHP_CodeSniffer 設定
12. ファイル末尾に改行を挿入する
13. 空白行を表示する
【宣伝】ユニラボ に興味がある方へ
エンジニア採用情報 までお待ちしています!