Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Building Websites with PHP Dependency Management Introducing Composer

HELP! I'm trying to install composer.json file...

{ "name": "monolog/monolog", "require-dev": { "monolog/monolog": "^1.16" }, "license": "proprietary", "authors": [ { "name": "Ken Chung", "email": "kendrickchung9001@gmail.com" } ], "require": {} // I cant fill in this part, CMD wont work!! }

This is what I have on my composer.json file so far, the problem is that I can't use "composer require" in the cmd. When I tried to fill it in it said...

"The requested package monolog/monolog No version set <parsed as 1.0.0> could not be found.

Potential causes:

  • A type in the package name
  • The package is not available in a stable-enough version according to the minimum-stability setting.

Installation failed, reverting ./composer.json to its original content."

It's so hard for windows, I don't know how to install anything. Help!

It works when I make "composer init" and "composer require" into 2 separate files. Does it work the same way if i just copy and paste all its contents in 1 file?

1 Answer