{"id":1204,"date":"2019-02-11T12:10:47","date_gmt":"2019-02-11T12:10:47","guid":{"rendered":"https:\/\/codewk.com\/?p=1204"},"modified":"2019-07-05T14:23:45","modified_gmt":"2019-07-05T14:23:45","slug":"composer-kurulumu-ve-kullanimi","status":"publish","type":"post","link":"https:\/\/codewk.com\/composer-kurulumu-ve-kullanimi\/","title":{"rendered":"Composer Kurulumu ve Kullan\u0131m\u0131 ?"},"content":{"rendered":"\n

Composer PHP i\u00e7in ba\u011f\u0131ml\u0131l\u0131k y\u00f6netim arac\u0131d\u0131r. Projenizin ihtiya\u00e7 duydu\u011fu k\u00fct\u00fcphaneleri tan\u0131mlaman\u0131z\u0131 ve sizin i\u00e7in kurmas\u0131n\u0131 ve g\u00fcncellemesini sa\u011flar. Merak etmeyin otomatik g\u00fcncellemiyor \ud83d\ude42<\/p>\n\n\n\n

Composer Ne \u0130\u015fe Yarar ?<\/h2>\n\n\n\n

PHP ile yaz\u0131l\u0131m geli\u015ftiriyorsan\u0131z, baz\u0131 k\u00fct\u00fcphaneleri\/dosyalar\u0131 yeniden indirmek, yazmak, g\u00fcncel s\u00fcr\u00fcm kullanmaya \u00e7al\u0131\u015fmak i\u00e7in zaman harcaman\u0131n b\u00fcy\u00fck bir kay\u0131p oldu\u011funu fark etmi\u015fsinizdir. Zend, Symfony ve Laravel gibi k\u00fct\u00fcphaneleri kullanarak proje yap\u0131yorsan\u0131z Composer’a daha fazla ihtiyac\u0131n\u0131z var demektir.<\/p>\n\n\n\n

Composer kurulumu hakk\u0131nda daha detayl\u0131 bilgi i\u00e7in https:\/\/getcomposer.org\/doc\/<\/a> bu adrese bir g\u00f6z atabilirsiniz. <\/p>\n\n\n\n

Kimler \u0130\u00e7in ?<\/h2>\n\n\n\n

Asl\u0131nda PHP ile kod yazan herkesin kullanmas\u0131 gerekti\u011fini d\u00fc\u015f\u00fcn\u00fcyorum. \u0130llaha ki belirli k\u00fct\u00fcphaneler veya frameworkler vb. kullan\u0131yorsunuzdur; ve en son version kullanmak (benim g\u00f6z\u00fcmde<\/em>) her zaman daha sa\u011fl\u0131kl\u0131d\u0131r. Benim belli ba\u015fl\u0131 k\u00fct\u00fcphanelere s\u00fcrekli bir i\u015fim d\u00fc\u015f\u00fcyor ve her seferinde git yeniden bul,ara\u015ft\u0131r ve geri getirme i\u015flemlerini yapmak zaman ve odak kayb\u0131 bir i\u015f. <\/p>\n\n\n\n

S\u00fcrekli eski projelerinizi kar\u0131\u015ft\u0131r\u0131p fonksiyon,kod ve dizi araman\u0131za gerek yok. Neredeyse her i\u015finizi halledebilece\u011finiz \u00e7ok geni\u015f k\u00fct\u00fcphaneler mevcut. \u00d6rne\u011fin Laravel Framework i\u00e7in Carbon s\u0131n\u0131f\u0131n\u0131 anlatm\u0131\u015ft\u0131k
(
https:\/\/codewk.com\/laravel-carbon-kurulumu\/<\/a>).Carbon s\u0131n\u0131f\u0131 ger\u00e7ekten tarih\/zaman i\u015flemleri i\u00e7in muazzam bir k\u00fct\u00fcphane.<\/p>\n\n\n\n

Composer Kurulumu Nas\u0131l Yap\u0131l\u0131r ?<\/h2>\n\n\n\n

Windows (i\u00e7in Composer kurulumu)<\/h4>\n\n\n\n

Windows’a Composer kurulumu yapmak i\u00e7in \u00f6ncelikle bilgisayar\u0131n\u0131zda PHP kurulu olmal\u0131d\u0131r(XAMPP veya WAMP). https:\/\/getcomposer.org\/Composer-Setup.exe<\/a> bu adresten composer’\u0131n indirme i\u015flemini yap\u0131p kurulum yap\u0131yoruz.<\/p>\n\n\n\n

Kurulum yaparken php.exe se\u00e7menizi isteyecek. Bu k\u0131s\u0131mda \u00e7ok dikkatli olunuz. Do\u011fru php.exe dosyas\u0131n\u0131 se\u00e7ti\u011finizden emin olunuz.<\/p><\/blockquote>\n\n\n\n

Ve kurulum i\u015flemini ba\u015far\u0131yla tamamlad\u0131n\u0131z \ud83d\ude42 Art\u0131k \u00e7al\u0131\u015fmak istedi\u011finiz dizini CMD yard\u0131m\u0131 ile a\u00e7\u0131p art\u0131k k\u00fct\u00fcphaneleri projenize dahil edebilirsiniz.<\/p>\n\n\n\n

Linux (i\u00e7in Composer kurulumu)<\/h4>\n\n\n\n

Terminali a\u00e7\u0131yoruz ve a\u015fa\u011f\u0131daki komutlar\u0131 s\u0131ras\u0131yla veriyoruz.<\/p>\n\n\n\n

sudo apt-get update 
sudo apt-get install curl
sudo curl -s https:\/\/getcomposer.org\/installer | php
sudo mv composer.phar \/usr\/local\/bin\/composer
<\/pre>\n\n\n\n

Composer kurulumu’nu test etmek i\u00e7in\u00a0composer<\/code>\u00a0komutunu kullan\u0131n. Composer do\u011fru \u015fekilde y\u00fcklendiyse, sunucu uzun bir yard\u0131m bilgileri ve komutlar\u0131 listesiyle yan\u0131t verecektir.<\/p>\n\n\n\n