Démarrer avec Objective PHP

Pré-requis

Le pré-requis principal nécessaire pour utiliser Objective PHP est PHP7

Si vous ne l’avez pas encore installé, consultez le site officiel de PHP où vous trouverez les instructions nécessaires à l’installation de PHP7 sur votre machine de dévelopmment.

Installation

La façon la plus simple de démarrer un projet avec Objective PHP est d’utiliser la fonctionnalité “create-project” de composer et d’obtenir le starter kit d’Objective PHP :

The following command assumes composer is available in your current PATH:

composer create-project -s dev objective-php/starter-kit op-quick-start

op-quick-start devrait être remplacé par n’importe quel identifiant correspondant à votre projet réel.

Démarrer un serveur

To quickly run and access the starter application, you can use the internal PHP HTTP server. The easiest way for that being launching the provided serve.sh script:

cd op-quick-start
./server.sh [-p PORT=8080]

Or you can launch it manually:

cd op-quick-start
php -S localhost:8080 -t public

Et voilà ! Si tout s’est bien passé, vous devriez pouvoir consulter la page d’accueil du starter kit en vous rendant sur http://localhost:8080.

Repositories

While the objective-php/starter-kit repository is the easiest way to get started with Objective PHP, all repositories can be accessed and fetched on the project organization page.