I've installed composer via windows installer, and set the correct path variables for php to wamp's php, now I created a composer.json( and later .phar) file
and attempt to install dependencies listed there
{
"name": "phpunit/php-unit",
"require": {
"php": ">5.4.12",
"phpunit/phpunit": "3.7.28"
}
}
this comes out of almost every command, including
php composer.phar install
php composer.json install
i did ran this in windows cmd so im not sure if that affects anything.
For very Beginner Windows Users
Download the installer for windows from here
Check the installation by executing composer
command at command prompt
Now, create the composer.json
file at the same level where you have Vendor
directory (not inside Vendor
).
Move to the directory where you have composer.json
with the command prompt and run the following command:
composer install
It will show messages like 'packages are downloaded' and 'autoload.php file created'. (Check your /app/Vendor/
directory)
Now insert this code at the beginning of /app/config/core.php
:
require_once dirname(__DIR__) . '/Vendor/autoload.php';
The code above will load all the classes automatically.
Hope this helps for beginners.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With