Download the PHP package quimgc/hello-ng without Composer

On this page you can find all versions of the php package quimgc/hello-ng. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hello-ng

ComposerPackagist

El primer que he fet ha sigut crear un directori amb el nom de ComposerPackagist.

Amb l'ajuda de PHPStorm he creat un directori amb el nom de src i a dins d'aquest dir he creat una classe PHP anomenat Hello.php.

Codi class Hello.php:

namespace Quimgc;

use Faker\Factory;
class Hello
{
    public function hello() {
    $faker = Factory::create();
    echo 'Hola ' . $faker->name;
    }
}

Un cop creada la classe, al directori ComposerPackagist s'ha d'executar:

composer init

Quan pregunta Search for a package: s'ha de posar:

fzaninotto/faker

Si pregunta per la versió clic Enter.

Resultat fitxer composer.json:

{
    "name": "quimgc/hello-ng",
    "require": {
        "fzaninotto/faker": "^1.7"
    },
    "authors": [
        {
            "name": "quimgc",
            "email": "[email protected]"
        }
    ],
    "autoload": {
  "psr-4": {
      "Quimgc\\": "src/"
  }
},
}

A continuació s'ha d'executar composer install.

Al directori arrel del paquet, s'ha de crear un nou directori anomenat tests i a dins s'ha de crear un fitxer php anomenat test_hello.php.

Dins del fitxer test_hello.php s'ha d'afegir:

require 'vendor/autoload.php';

require 'src/Hello.php';

$hello = new Hello();

$hello->hello();

Un cop fet tots aquests passos, al directori ComposerPackagist s'ha d'executar:

git tag -a 0.1.0

Això serveix per crear una versió.

NOTA: Per guardar Ctrl KD

Un cop fet això es fa:

git push origin 0.1.0

Packagist.org

Quan ja està el paquet pujat a github, s'ha d'anar a la web:

https://packagist.org/packages/submit

I afegir el paquet amb la url:

https://github.com/quimgc/ComposerPackagist

Ajudes

http://blog.jgrossi.com/2013/creating-your-first-composer-packagist-package/ http://acacha.org/mediawiki/Composer#Packagist

"autoload": { "files": "src/Hello.php" }

"psr-4": { "Quimgc\": "src/" }

prova


All versions of hello-ng with dependencies

PHP Build Version
Package Version
Requires fzaninotto/faker Version ^1.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package quimgc/hello-ng contains the following files

Loading the files please wait ...