PHP
Compose
PHPDay 13

[PHP]使っているライブラリに感謝をしよう

使っているライブラリに感謝をするためGitHubで:star:をつけます。
symfony/thanksを使うことでComposerにあるライブラリに自動で:star:をつけることが出来ます。

やり方

composerでインストール

composer require --dev symfony/thanks

あとはコマンドを実行するだけです!(--dry-runオプションもあります)

composer thanks

初回はGithubのAPIトークンが必要です。
表示されているリンクにアクセスして[Generate token]でトークンを発行出来ます。
権限は特に変更しなくて大丈夫です。

app $composer thanks --dry-run

Could not fetch https://api.github.com/graphql, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+mosa+2017-12-23+1246
to retrieve a token. It will be stored in "/Users/mosa/.composer/auth.json" for future use by Composer.
Token (hidden): 

トークンを入力すると自動で:star:をつけてくれます!
今回はCakePHP3のプロジェクトで実行しました!

app $composer thanks
Stars sent to:
 ⭐  ajgl/breakpoint-twig-extension - https://github.com/ajgarlag/AjglBreakpointTwigExtension
 ⭐  aptoma/twig-markdown - https://github.com/aptoma/twig-markdown
 ⭐  asm89/twig-cache-extension - https://github.com/asm89/twig-cache-extension
 ⭐  aura/intl - https://github.com/auraphp/Aura
 ⭐  cakephp/bake - https://github.com/cakephp/bake
 ⭐  cakephp/cakephp - https://github.com/cakephp/cakephp
 ⭐  cakephp/cakephp-codesniffer - https://github.com/cakephp/cakephp-codesniffer
 ⭐  cakephp/chronos - https://github.com/cakephp/chronos
 ⭐  cakephp/debug_kit - https://github.com/cakephp/debug_kit
 ⭐  cakephp/migrations - https://github.com/cakephp/migrations
 ⭐  cakephp/plugin-installer - https://github.com/cakephp/plugin-installer
 ⭐  composer/ca-bundle - https://github.com/composer/ca-bundle
 ⭐  composer/composer - https://github.com/composer/composer
 ⭐  composer/semver - https://github.com/composer/semver
 ⭐  composer/spdx-licenses - https://github.com/composer/spdx-licenses
 ⭐  dnoegel/php-xdg-base-dir - https://github.com/dnoegel/php-xdg-base-dir
 ⭐  jakub-onderka/php-console-color - https://github.com/JakubOnderka/PHP-Console-Color
 ⭐  jakub-onderka/php-console-highlighter - https://github.com/JakubOnderka/PHP-Console-Highlighter
 ⭐  jasny/twig-extensions - https://github.com/jasny/twig-extensions
 ⭐  jdorn/sql-formatter - https://github.com/jdorn/sql-formatter
 ⭐  josegonzalez/dotenv - https://github.com/josegonzalez/php-dotenv
 ⭐  justinrainbow/json-schema - https://github.com/justinrainbow/json-schema
 ⭐  m1/env - https://github.com/m1/Env
 ⭐  mobiledetect/mobiledetectlib - https://github.com/serbanghita/Mobile-Detect
 ⭐  nikic/php-parser - https://github.com/nikic/PHP-Parser
 ⭐  php/php-src - https://github.com/php/php-src
 ⭐  psr/http-message - https://github.com/php-fig/http-message
 ⭐  psr/log - https://github.com/php-fig/log
 ⭐  psy/psysh - https://github.com/bobthecow/psysh
 ⭐  robmorgan/phinx - https://github.com/cakephp/phinx
 ⭐  seld/cli-prompt - https://github.com/Seldaek/cli-prompt
 ⭐  seld/jsonlint - https://github.com/Seldaek/jsonlint
 ⭐  seld/phar-utils - https://github.com/Seldaek/phar-utils
 ⭐  squizlabs/php_codesniffer - https://github.com/squizlabs/PHP_CodeSniffer
 ⭐  symfony/config - https://github.com/symfony/config
 ⭐  symfony/console - https://github.com/symfony/console
 ⭐  symfony/debug - https://github.com/symfony/debug
 ⭐  symfony/filesystem - https://github.com/symfony/filesystem
 ⭐  symfony/finder - https://github.com/symfony/finder
 ⭐  symfony/polyfill-mbstring - https://github.com/symfony/polyfill-mbstring
 ⭐  symfony/process - https://github.com/symfony/process
 ⭐  symfony/thanks - https://github.com/symfony/thanks
 ⭐  symfony/var-dumper - https://github.com/symfony/var-dumper
 ⭐  symfony/yaml - https://github.com/symfony/yaml
 ⭐  twig/twig - https://github.com/twigphp/Twig
 ⭐  umpirsky/twig-php-function - https://github.com/umpirsky/twig-php-function
 ⭐  wyrihaximus/twig-view - https://github.com/WyriHaximus/TwigView
 ⭐  zendframework/zend-diactoros - https://github.com/zendframework/zend-diactoros

Thanks to you! 💖


いつも使っているライブラリに:star:で感謝をしましょう!