추천 패키지 소개
실제로 프로젝트에 도입해서 도움을 받았던 패키지들을 소개한다. 처음 composer 를 사용하게 되면 방대한 패키지들 사이에서 뭘 써야 할지 난감해지기 십상인데, 이 패키지 소개가 도움이 되길 바란다.
https://packagist.org/packages/akrabat/ip-address-middleware
akrabat/ip-address-middleware - Packagist
README PSR-15 Middleware that determines the client IP address and stores it as an ServerRequest attribute called ip_address. It optionally checks various common proxy headers and then falls back to $_SERVER['REMOTE_ADDR']. Configuration The constructor ta
packagist.org
클라이언트 리얼 IP 를 얻어올 수 있는 라이브러리로 Slim4 의 미들웨어에 추가해서 사용하였다.
https://packagist.org/packages/guzzlehttp/guzzle
guzzlehttp/guzzle - Packagist
README Guzzle, PHP HTTP client Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services. Simple interface for building query strings, POST requests, streaming large uploads, streaming large downloads,
packagist.org
많은 PHP user 에게 사랑받는 패키지중 하나로 http 기반의 request 들을 처리해주는 패키지. composer 를 사용하면 거의 항상 들어가는 패키지가 되었다.
https://packagist.org/packages/kzykhys/php-csv-parser
kzykhys/php-csv-parser - Packagist
README Convert CSV to array/Iterator (Excel style is fully suppoted!) Why PHPCsvParser? As you know, PHP has built-in fgetcsv function. But has some probrems: Line breaks in the cell Multibyte string (especially NON UTF-8) Double quote in the cell Requirem
packagist.org
갑자기 엑셀을 읽어와서 빠르게 처리해야 할 일이 있었는데, 패키지스트를 검색했더니 존재하길래 빠르게 갖다 썼던 패키지.
https://packagist.org/packages/league/flysystem
league/flysystem - Packagist
README Flysystem is a filesystem abstraction which allows you to easily swap out a local filesystem for a remote one. Goals Have a generic API for handling common tasks across multiple file storage engines. Have consistent output which you can rely on. Int
packagist.org
파일시스템을 추상화하여 동일한 명령으로 로컬파일, FTP, SFTP, Stream 등등을 다룰수 있게 지원하는 패키지.
https://packagist.org/packages/monolog/monolog
monolog/monolog - Packagist
README Monolog sends your logs to files, sockets, inboxes, databases and various web services. See the complete list of handlers below. Special handlers allow you to build advanced logging strategies. This library implements the PSR-3 interface that you ca
packagist.org
로그파일을 다양한 타겟(파일, db 등등..)에 기록할 수 있도록 하는 패키지. PSR-3 Logging 을 준수한다.
https://packagist.org/packages/nesbot/carbon
nesbot/carbon - Packagist
README An international PHP extension for DateTime. http://carbon.nesbot.com toDateTimeString()); printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __
packagist.org
DateTime 관련 부분을 전담하는 라이브러리. 날자연산 등을 할 때 편리한다.
https://packagist.org/packages/psecio/iniscan
psecio/iniscan - Packagist
README The Iniscan is a tool designed to scan the given php.ini file for common security practices and report back results. Currently it is only for use on the command line and reports the results back to the display for both Pass and Fail on each test. In
packagist.org
php.ini 의 보안설정에 문제가 있는지를 점검해주는 패키지.
https://packagist.org/packages/php-console/php-console
php-console/php-console - Packagist
README PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things using Google Chrome extension PHP Console and PhpConsole server library. Overview Requirements For projects with PHP < 5.3 you
packagist.org
Chrome 의 PHP Console 익스텐션과 함께 사용하여 PHP의 에러, 예외, 변수 덤프등을 제어할 수 있도록 하게한다.. 는 라이브러리. 설치만 해보고 아직 안써봤는데, 좀 파보고 싶은 패키지.
https://packagist.org/packages/zircote/swagger-php
zircote/swagger-php - Packagist
README swagger-php Generate interactive OpenAPI documentation for your RESTful API using doctrine annotations. Features Compatible with the OpenAPI 3.0 specification. Extracts information from code & existing phpdoc annotations. Command-line interface avai
packagist.org
API 서버를 제작할 때 주석을 상세하게 문법에 맞추어 달면, 자동으로 API Document 를 생성해 주는 패키지. 이 패키지는 결과물을 json 이나 yaml 등으로만 만들어 주고, 별도의 Swagger UI 와 연계하면 API Document 를 생성해 준다.
편리해서 좋은거 같기도 하고, 주석이 너무 길어져서 오히려 거추장스러운 느낌도 드는 양날의 검같은 패키지.
'PHP' 카테고리의 다른 글
composer (5) composer.json (0) | 2020.05.29 |
---|---|
composer (4) 자주 사용하는 커맨드 와 composer.json, composer.lock (0) | 2020.05.24 |
composer (3) 첫 사용 (0) | 2020.05.23 |
composer (2) 설치 (0) | 2020.05.23 |
composer (1) 기본개념 (0) | 2020.05.17 |