2017 © Pedro Peláez
 

library hello-world

My first Composer project

image

udayshi/hello-world

My first Composer project

  • Tuesday, June 26, 2018
  • by udayshi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Composer Package

This is boilerplate for composer package., (*1)

Do not forget to tag the package

git tag v1.0
git push --tags

Useful command to brushup

Package URL

packagist.org, (*2)

Initialise

composer init

Searching package

composer search packagename@package version

Installing packages

composer require packagename

If we have only composer.json

composer install

Update all the packages including lock file.

composer update

Installing development package

composer require --dev packagename

Dumping autoload

composer dumpautoload

Removing package

composer remove packagename

Creating project

composer create-project packagename foldername

Sample Repo JSON

{
    "name": "udayshi/php_composer_hello-world",
    "description": "My first Composer project",
    "license": "MIT",
    "authors": [
        {
            "name": "Uday Shiwakoti",
            "email": "shiuday@gmail.com"
        }
    ],
    "minimum-stability": "dev",
    "require": {
        "php": "^7.0"
    },
    "autoload": {
            "psr-4": {
                "HelloWorld\\": "src/HelloWorld/"
            }
    }
}

Sample Client JSON

{
  "name": "uday.shiwakoti/ctest",
  "type": "project",
  "license": "MIT",
  "authors": [
    {
      "name": "Uday Shiwakoti",
      "email": "shiuday@gmail.com"
    }
  ],

  "repositories": [
    {
      "type": "composer",
      "url": "https://wpackagist.org"
    },
    {
      "type": "composer",
      "url": "https://github.com"
    }
  ],
  "require": {
    "udayshi/hello-world": "*"
  },
  "require-dev" : {},
  "scripts": {
    "post-install-cmd": [
      "bash ./scripts/symlinks.sh"
    ],
    "post-update-cmd": [
      "bash ./scripts/symlinks.sh"
    ]
  }
}

The Versions

26/06 2018

dev-master

9999999-dev

My first Composer project

  Sources   Download

MIT

The Requires

  • php ^7.0

 

by Uday Shiwakoti

26/06 2018

1.1

1.1.0.0

My first Composer project

  Sources   Download

MIT

The Requires

  • php ^7.0

 

by Uday Shiwakoti

26/06 2018

1.0

1.0.0.0

My first Composer project

  Sources   Download

by Uday Shiwakoti