dariush
dariush

Reputation: 3341

Why composer does not install my app

I am new with composer and i am just trying to make a composer file and make my product to be downloadable via composer, i have registered in packagist site and uploaded my product there.

I have the following details in my composer.json file.

{
    "name": "dariushha/zinux",
    "type": "framework",
    "description": "A simple and lightweight but powerful framework supporting MVC design pattern",
    "license": "MIT",
    "version": "4.1.4",
    "homepage": "http://dariushha.github.io/zinux/",
    "keywords": ["PHP","MVC","lightweight","powerful", "design pattern", "zinux", "simple"],
    "authors": [
        {
            "name": "Dariush Hasanpoor",
            "email": "[email protected]",
            "homepage": "https://github.com/dariushha"
        }
    ],
    "minimum-stability": "dev",
    "require": {
        "php":    ">=5.5.8"
    }
}

But when i run composer install it only create the following filesystem tree structure:

   .
   |-vendor
   |---composer

It was suppose to create a subdirectory zinux as well.
What i am doing wrong?

Upvotes: 0

Views: 99

Answers (1)

trizz
trizz

Reputation: 1447

It is the composer information for your project, there's nothing to install as php is the only requirement and your framework is the thing that needs to be installed. You need to create a new project if you want to "install" your framework.

To create a new project, based on your framework, you can do the following:

  • Create an empty directory
  • Create, inside that directory, a file named "composer.json"
  • Inside that file, put the following

    { "require": { "dariushha/zinux": "dev-master" } }

  • Now enter composer install and a vendor/zinux directory with your framework will be created.

Upvotes: 1

Related Questions