Skip to main content

Posts

Showing posts with the label moder-web-technology

Composer and dependency injection

According to wikipedia, COMPOSER is an application-level package manager for PHP, and we will learn few more features about it. Download & Setup Windows : Download and run  Composer-Setup.exe Preferred way: Know your PHP version open cmd or gitbash and run php –v Prepare a shell script/bat file (composersetup.sh/composersetup.bat) Content of the shell script executable are: php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52 599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061’) { echo 'Installer verified'; } else { echo 'Installer corrupt’; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');" Perhaps you noticed the php execution statement is in blue color. Whats in it? ...