MasaKu
    • 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
      • Invitee
    • 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
    • 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 Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync 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
Invitee
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
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
[PHPerのための「Composer」を語り合うPHP TechCafe](https://rakus.connpass.com/event/248578/) ============================================ # PHPer's NEWS ::: info **[PHPの現場 47. 現場での設計論や方法論との向き合い方(ytake / kurikazu / omoon)](https://php-genba.shin1x1.com/47)** 技術選定や採用の話まで幅広い話が聞けて面白かった。 ::: ::: info **[GitHub、コードエディター「Atom」の開発を終了 ~年内にアーカイブ](https://forest.watch.impress.co.jp/docs/news/1415735.html)** ラクスに入る時の課題でお世話になったので、残念。 ::: ::: info **[Internet Explorer 11 のサポートは 2022 年 6 月 15 日に終了](https://support.microsoft.com/ja-jp/windows/windows-10-%E3%81%A7-internet-explorer-%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B-7248a101-d5dd-bded-d843-d9427c42d60f)** エンジニアは喜んでいる人が多いのではないでしょうか。 ::: ::: info **[GitLabがVisual Studio CodeベースのWebIDEへ移行すると発表](https://www.publickey1.jp/blog/22/gitlabvisual_studio_codewebide.html)** VS Code強いですね。 ::: ::: info **[Laravel 9.16」がリリース](https://laravel-news.com/laravel-9-16-0)** ::: ::: info **[PHP 8.2: true type](https://php.watch/versions/8.2/true-type)** PHP8.0 で入った false 型に続いて導入されましたが、使い道はあまり思いつきません…… ::: ::: info **[ここがつらい! Slack API](https://qiita.com/mpyw/items/5a8a90713a56196a55ae)** PHPがマイナー言語なのかどうなのか?というネタのとっかりとして。 ::: ::: info **[PHPのコア開発者が決定!](https://qiita.com/rana_kualu/items/0479edbd936447572c3b)** 末尾の↓、その通り。 「Nikitaの抜けた穴を埋めるのに6人が必要ってのもすごい話ですな」 ::: ::: info **[Java使いからPHPerに転身した際にはまったこと](https://qiita.com/fujikenbotebote/items/eb7796791765e7ea73a4)** ありがちなネタではあるが、同じような立場の人は結構いそうなので、盛り上がるかも。(過去にもやってたかも) ::: ::: info **[「Google Chrome 103」が安定版に ~新しいHTTPステータスコード「103 Early Hints」に対応](https://forest.watch.impress.co.jp/docs/news/1419061.html)** いつの間にか新しいHTTPステータスコードが ::: ::: info **[PhpStorm 2022.2 EAP #4: Highlighting Failed Test Assertions](https://blog.jetbrains.com/phpstorm/2022/06/phpstorm-2022-2-eap-4/)** 個々のランタイムに代替のphp.iniファイルを指定できるようになったようです。地味に便利そう。 ::: ::: info **[PHPアプリケーションを保護する新しいアプローチとなるPHPエージェントをContrast Securityが新たに発表](https://www.excite.co.jp/news/article/Prtimes_2022-06-23-86703-10/)** 利用しているOSSの脆弱性検知だけでなくソースコードの脆弱性も検知できる模様。 ::: # 特集:「Composer」を語り合う ## Composerとは **A Dependency Manager for PHP** ### プロジェクトの依存関係管理ツール * 基本的にはプロジェクト内の `vendor` ディレクトリにインストールする * composer.json に必要なパッケージを宣言して共有 * プロジェクト新規参画者はコマンド1つで実行環境が整う ### オートローディング * PSR-4に基づいた名前空間を宣言 * プロジェクトないの指定したディレクトリの配下を名前空間として使用可能にする ### Packagist でのパッケージの調べ方 https://packagist.org/ ## 使い方 * 公式ドキュメント * https://getcomposer.org/doc/ * [基本的な使い方](https://getcomposer.org/doc/01-basic-usage.md) * [monolog](https://packagist.org/packages/monolog/monolog) のインストール手順 * composer.json を作成 * ``` { "require": { "monolog/monolog": "3.1.*" } } ``` * プロジェクトに組み込むパッケージをrequire に記載 * 書式 * ベンダー名 / プロジェクト名 * 基本的には同じ名前になるがPakagist に登録する際に衝突する場合は変更する * バージョン指定 * `vX.Y.Z` または `X.Y.Z` * ワイルドカードが指定されている箇所は最新を取得するようにする * 上記は 3.1 系の最新が取得される * `>=3.1 <3.2` と同じ意味 * 詳しくは[コチラ](https://getcomposer.org/doc/articles/versions.md) * 依存関係のインストール * ``` php composer.phar update ``` * 上記を実行することで2つのことが実行されている * `composer.lock` を作成 * 取り込むライブラリのバージョンを確定させる * 暗黙的に `install` を実行 * `vendor` ディレクトリを作成して必要なパッケージを取得 * アプリなどは利用するパッケージのバージョンを固定したい場合があるため、`composer.lock` も Git 管理に含める * `composer.lock` の更新方法 * ``` php composer.phar update ``` * composer.json読みかた * https://getcomposer.org/doc/04-schema.md * セマンティックバージョン * バージョンの指定方法など * よく使うオプション/便利オプション * https://getcomposer.org/doc/03-cli.md ## Packagist への登録方法 * 公式ドキュメント * https://packagist.org/about#naming-your-package * composer.json の更新 * composer.json を新規作成し以下を追記 * ```json { "name": "monolog/monolog", "type": "library", "description": "Logging for PHP 8.0", "keywords": ["log","logging"], "homepage": "https://github.com/Seldaek/monolog", "license": "MIT", "authors": [ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be", "role": "Developer" } ], "require": { "php": ">=8.0.0" }, "autoload": { "psr-0": { "Monolog": "src" } } } ``` * 以下コマンドで composer.lock を更新 * `composer update` * 以下コマンドで composer.json の書式チェック * `composer validate` * GitHub 等にソースをPUSH * packagist に登録 * https://packagist.org/packages/submit * private版も存在(有料) * https://packagist.com/ * Packagist のリポジトリ * https://github.com/composer/packagist ## Composer2での変更点 * Composer2.0.0 概要 * 2020/10/24リリース * 2012年のリリース依頼初のメジャーバージョンアップ * 資料 * [Changelog](https://github.com/composer/composer/releases/tag/2.0.0) * [アップグレードガイド](https://github.com/composer/composer/blob/2.0.0/UPGRADE-2.0.md) * [Composer 2.0 is now available!](https://blog.packagist.com/composer-2-0-is-now-available/) * 主な変更 * [Performance improvements](https://blog.packagist.com/composer-2-0-is-now-available/#performance-improvements) * 速度とメモリ使用量の両方が大幅に改善された。 * [Architectural changes and determinism](https://blog.packagist.com/composer-2-0-is-now-available/#architectural-changes-and-determinism) * vendorディレクトリの中身の変更は、ネットワークをまたぐ処理をすべて終えた後に行うようになった。(vendorディレクトリが中途半端に更新されることがなくなった。) * [Runtime features](https://blog.packagist.com/composer-2-0-is-now-available/#runtime-features) * プラットフォームチェックが追加された。(vendor/autoload.phpが呼ばれた際、現在のPHPバージョンやエクステンションが対応したバージョンであるかをチェックし、一致していなければエラーする。) * [Error reporting improvements](https://blog.packagist.com/composer-2-0-is-now-available/#error-reporting-improvements) * 依存関係が解決できない場合に表示されるエラーの内容が改善された。 * [Partial updates with temporary constraints](https://blog.packagist.com/composer-2-0-is-now-available/#partial-updates-with-temporary-constraints) * 特定のパッケージのバージョンを更新するためのコマンドが追加された。 * `composer update vendor/package:1.0.*` * このコマンドであれば、composer.jsonが更新されない。 * `composer update --with vendor/package:1.0.*` * `--with`を付ければ依存関係のあるパッケージも同時に更新される。 * 参考資料 * [Composer2.0ついにリリース!](https://qiita.com/rana_kualu/items/8be56a5a20b71710e7ca) * [Composer 2.0って何?どう変わるの?読んでみました!](https://fortee.jp/phpcon-2020/proposal/7d06050f-a592-4869-b048-1795d2cb4fe3)

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