Y-KANOH
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    1
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    PHPerのための「PhpStormを語る」 PHP TechCafe ======================== Connpass: https://rakus.connpass.com/event/279368/ # PHPer's NEWS ::: info **[ChatGPTに関する調査を実施](https://jitera.com/ja/news/8)** 案外まだ使ったことない人が多かった ::: ::: info **[PHPStan作者がPHPStan開発で得る月収が5365ユーロ=約77万円](https://twitter.com/OndrejMirtes/status/1641761879092518914?s=20)** 世界中の人々に使われているPHPStanの作者の報酬として、高いと見るか安いと見るか…… アンケートの結果としては低いと感じている人のほうが多い模様。 ::: ::: info **[FastAPIのフォルダ構成をChatGPTに教えてもらった](https://qiita.com/yu_fujita/items/0f745ffc72f13ec97e09)** こういうベストプラクティス的なのをChatGPTに聞くのは面白いと思いました Laravelのフォルダ構成のベストプラクティス教えて!(宗教戦争) ::: ::: info **[【PHP8.3】static変数に動的値を突っ込めるようになる](https://qiita.com/rana_kualu/items/20b80ded17c77e2b05d4)** 満場一致で受理されたものの、この新機能の恩恵は私にはわからなかったです。 ::: ::: info **[PHP Foundation Update, March 2023](https://thephp.foundation/blog/2023/03/31/php-foundation-update-march-2023/)** PHP Foundation の初期段階で 10,000 ドルを寄付した企業には、2023 年 10 月まで主要スポンサーのステータスと諮問委員会の席が提供されます。 (ラクスは主要スポンサーです) ::: ::: info **[Avoiding one-liners in PHP](https://localheinz.com/articles/2023/03/18/avoiding-one-liners-in-php/)** コードを短くするモチベーションがどこからきているのかということを把握して利用していかなければならない [Twitter上の反応](https://twitter.com/search?q=https%3A%2F%2Flocalheinz.com%2Farticles%2F2023%2F03%2F18%2Favoiding-one-liners-in-php%2F&src=typed_query) ::: ::: info **[PHPerKaigi 2023 に登壇させていただきました! (コロプラさんの「Rector ではじめる ""運用を止めない"" PHP アップグレード」の発表)](https://blog.colopl.dev/entry/2023/03/31/121458)** Rector が気になっていたので実践的な事例を拝見できて大変勉強になりました! ::: ::: info **[PHPカンファレンス福岡開催!](https://phpcon.fukuoka.jp/2023/)** 採択発表は完了している模様!! ::: ## 担当 ## PhpStomとは ### 概要 [PhpStorm 超高速でスマートなPHP IDE](https://www.jetbrains.com/ja-jp/lp/phpstorm-japan/) > PHP 開発者向けに設計された高速でスマートな IDE JetBrains社製の、PHP開発者に向けて設計された開発に便利な様々なツールが統合された環境:IDE。 * 強力なコード補完/静的解析つきのエディタ * 様々なリファクタリング機能 * DBクライアント * Gitクライアント * デバッガとの連携機能 #### JetBrains社とは [JetBrains会社概要](https://resources.jetbrains.com/storage/products/jetbrains/docs/corporate-overview/ja-jp/jetbrains_corporate_overview.pdf?_ga=2.34557473.1460807621.1682227261-1752966079.1652625322&_gl=1*1tpravj*_ga*MTc1Mjk2NjA3OS4xNjUyNjI1MzIy*_ga_9J976DJZ68*MTY4MjIyNzI2MS4yNy4xLjE2ODIyMjc2OTYuNjAuMC4w) プラハに本社を置くソフトウェア開発企業。 PhpStorm や IntelliJ IDEA をはじめとする IDE の開発、販売を行っている。 IDEの開発だけでなく、PHP自体にも貢献しており、Nikita Popov 氏を数年雇用し仕事としてPHPの開発を許可していた。 [PhpStormチーム](https://www.jetbrains.com/ja-jp/company/people/phpstorm/) ### 静的解析ツールとして PhpStormは強力な静的解析を持っている。 * エディターで開かれたファイル内のコードを分析し、入力時に問題のあるコードをハイライト * PHPDocを解析し引数や戻り値の型をチェック * Gitコミット実行後にチェック(以前はコミット前) * どの規約をチェックするのかなどは細かく設定可能 ## PhpStorm最新機能(2022.3) 気になった機能をピックアップしました。 ### 2022.3 https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/2022-3/ * [非推奨の動的プロパティ](https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/2022-3/#:~:text=%E3%83%97%E3%83%AD%E3%83%91%E3%83%86%E3%82%A3%E3%81%AE%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%80%82-,%E9%9D%9E%E6%8E%A8%E5%A5%A8%E3%81%AE%E5%8B%95%E7%9A%84%E3%83%97%E3%83%AD%E3%83%91%E3%83%86%E3%82%A3,-PHP%208.2%20%E3%81%A7%E3%81%AF) * 使用箇所をハイライトしてくれる。 * プロパティを追加するか`#[AllowDynamicProperties] `を追加するか選択できる。 * [日時形式のプレビュー](https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/2022-3/#version-2022-3-more-features-for-php:~:text=%E3%81%AE%E8%BF%BD%E5%8A%A0%E6%A9%9F%E8%83%BD-,%E6%97%A5%E6%99%82%E5%BD%A2%E5%BC%8F%E3%81%AE%E3%83%97%E3%83%AC%E3%83%93%E3%83%A5%E3%83%BC,-%E3%82%82%E3%81%86%20date()) * 多言語ユーザからするとマニュアルを確認しなくても良くなったので地味に嬉しい。 * [リストでの array shape の繰り返しをサポート](https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/2022-3/#version-2022-3-more-features-for-php:~:text=%E3%83%AA%E3%82%B9%E3%83%88%E3%81%A7%E3%81%AE%20array%20shape%20%E3%81%AE%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%97%E3%82%92%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88) * 配列はループで使うことが多いのにループ内で補完してくれない...という地味に痛かった点が解消された。array shapeを積極的に書くモチベーションになる。 ### 2023.1 https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/ * [3v4l.org での PHP スクラッチファイルの実行](https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/#:~:text=PHP-,3v4l.org%20%E3%81%A7%E3%81%AE%20PHP%20%E3%82%B9%E3%82%AF%E3%83%A9%E3%83%83%E3%83%81%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E5%AE%9F%E8%A1%8C,-PhpStorm%202023.1%20%E3%81%AF) * 好きなPHPバージョンでスクラッチファイルの実行が可能。非推奨とか禁止されたコードを実行したらどうなる? * [インデックス作成中でも使用できるようになった Go to Class(クラスに移動)アクション](https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/#:~:text=%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E4%BD%9C%E6%88%90%E4%B8%AD%E3%81%A7%E3%82%82%E4%BD%BF%E7%94%A8%E3%81%A7%E3%81%8D%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%9F) * 待ち時間が減るので地味に嬉しい。 * [データフロー解析に対応したデバッガー](https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/#:~:text=%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82-,%E3%83%87%E3%83%BC%E3%82%BF%E3%83%95%E3%83%AD%E3%83%BC%E8%A7%A3%E6%9E%90%E3%81%AB%E5%AF%BE%E5%BF%9C%E3%81%97%E3%81%9F%E3%83%87%E3%83%90%E3%83%83%E3%82%AC%E3%83%BC,-PHP%20%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE) * わざわざ分岐にブレークポイントを張らなくても良いのがポイント高い。 * [var_dump() / dd() のターミナル出力にクリック可能なパスとクラス参照を追加](https://www.jetbrains.com/ja-jp/phpstorm/whatsnew/#:~:text=var_dump()%20/%20dd()%20%E3%81%AE%E3%82%BF%E3%83%BC%E3%83%9F%E3%83%8A%E3%83%AB%E5%87%BA%E5%8A%9B%E3%81%AB%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E5%8F%AF%E8%83%BD%E3%81%AA%E3%83%91%E3%82%B9%E3%81%A8%E3%82%AF%E3%83%A9%E3%82%B9%E5%8F%82%E7%85%A7%E3%82%92%E8%BF%BD%E5%8A%A0) * var_dump派はかなり便利になる。 ## ショートカット ### ショートカットコマンド一覧 Windows/Linux: https://pleiades.io/sites/willbrains.jp/keymap/pdf/shortcut_phpstorm_windows.pdf Mac: https://pleiades.io/sites/willbrains.jp/keymap/pdf/shortcut_phpstorm_mac.pdf ### 主なコマンド #### 編集系 | 説明 | ショートカット | | ---- | ---- | | コードの生成(Getter, Setter,コンストラクターなど) | Alt + Insert | | コメント化/コメント解除 | Ctrl + / | | 自動インデント | Ctrl + Alt + L | | 選択範囲のコードをフォーマット | Ctrl + Alt + L | | ファイル全体をフォーマット | Ctrl + Alt + Shift + L | #### 検索系 | 説明 | ショートカット | | ---- | ---- | | どこでも検索 | Shift2回 | | ファイル名で検索 | Ctrl + Shift + N | | クラス名で検索 | Ctrl + N | | ファイル内検索・置換 | Ctrl + F / Ctrl + R | | プロジェクト内検索・置換 | Ctrl + Shift + F / Ctrl + Shift + R | | 使用箇所を検索 | Alt + F7 / Ctrl + F7 | #### ナビゲーション | 説明 | ショートカット | | ---- | ---- | | クラス、変数、メソッドの定義元にジャンプ | Ctrl + B / Ctrl + Click | | 前のカーソル位置に移動 | Ctrl + Alt + ⇐ | | 次のカーソル位置に移動 | Ctrl + Alt + ⇒ | | 行番号を指定して移動 | Ctrl + G | | コードブロックの最初・最後に移動 | Ctrl + ] / Ctrl + [ | | 最近使用したファイルに切替 | Ctrl + Tab | | 最近使用したファイルを表示 | Ctrl + E | ### 参考資料 * [あなたはPhpStormくんのショートカットキーを何個知っている?](https://fortee.jp/phperkaigi-2023/proposal/033ee700-0a8e-44c5-9d30-2cb7e073712f) * [【PhpStorm入門】基本的な使い方](https://tech-blog.rakus.co.jp/entry/20221017/phpstorm) ## プラグイン ### Marketplace PhpSrotmプラグインを検索できます。 JetBrainsスタッフのオススメPhpSrotmプラグインやダウンロード数ランキングが表示されているので、人気のプラグインが分かります。 https://plugins.jetbrains.com/phpstorm ### Pickup * [Japanese Language Pack / 日本語言語パック](https://plugins.jetbrains.com/plugin/13964-japanese-language-pack------) * PhpStormを日本語化してくれる。 * [Laravel Idea](https://plugins.jetbrains.com/plugin/13441-laravel-idea) * 有料のプラグイン。以前は「Laravel」プラグインがあったがメンテされておらず非推奨になった。 * [Symfony Support](https://plugins.jetbrains.com/plugin/7219-symfony-support) * Symfony用のプラグイン。様々な追加のサポートを受けられる。 * [PHP Annotations](https://plugins.jetbrains.com/plugin/7320-php-annotations) * PhpDocの補完をサポートしてくれます。 ### ## 静的解析として * [コードインスペクション](https://pleiades.io/help/phpstorm/code-inspection.html) * コードの作成中に解析を行い、危険な箇所に対して下線で示すか、ハイライトしてくれます。解析方法はPHPファイルをPhpStormで開くだけです。 * 文法の誤りをハイライトし、重要度によってハイライト部分の色が変更されるため見やすい。 * 他の解析ツールをインストールし使用すことも可能。 * コールバックの参照 * [使用箇所の検索](https://pleiades.io/help/phpstorm/find-highlight-usages.html) * [名前変更リファクタリング](https://pleiades.io/help/phpstorm/rename-refactorings.html) * [名前空間](https://pleiades.io/help/phpstorm/keeping-namespaces-in-compliance-with-psr0-and-psr4.html) * Auto-Import(自動インポート) * Optimize Imports(import文の最適化) * folding for imports(import文の折りたたみ) など * 静的解析ツールの導入が簡単 * [PHP_CodeSniffer](https://pleiades.io/help/phpstorm/using-php-code-sniffer.html) * [PHPStan](https://pleiades.io/help/phpstorm/using-phpstan.html) ## 他のエディタと比べて ←マサカリコワイ ### 参考資料 [【PhpStorm入門】基本的な使い方](https://tech-blog.rakus.co.jp/entry/20221017/phpstorm) [静的解析ではじめる負債コード解消](https://speakerdeck.com/daiki1020/jing-de-jie-xi-dehazimerufu-zhai-kodojie-xiao) [PhpStormで始めるGit生活 ](https://tech-blog.rakus.co.jp/entry/2017/09/14/112033) ### おすすめポイント * PHP の開発体験を高めるための機能が最初から備わっている * PHP の開発を行う上で欲しい機能 * コード補完 * コード整形 * コードインスペクション * コードジャンプ * 強力な検索機能 * デバック * Git操作 * 静的解析 * テスト実行 * DB操作 * その他のエディタやIDEでも同等のことは可能 * PHP 専用のものではないためプラグインを追加する必要がある * 「このプラグインおすすめだよ」であったり「これ入れるべきだよ」という意見を聞かないと勝手に気づくことができない * PhpStorm は PHP の開発初心者でも開発体験を高めるための機能があらかじめ利用可能な状態になっている * 開発しているうちに自然と便利な機能に触れることができる * 初心者ほど PhpStorm を使うことで開発スキルを高めることができる(と思います) * 「有料ツールを使うのはまだ早いかな?」と思っている方は是非ともトライアルから始めてみてください! * [設定の共有](https://pleiades.io/help/phpstorm/sharing-your-ide-settings.html)ができる * [プロジェクトごとの設定共有](https://pleiades.io/help/phpstorm/configure-project-settings.html)はGitを通じで可能

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully