Ceci est une ancienne révision du document !
Table des matières
Participalibre
Mise en place de l'environnement de développement
Il y a une page qui détaille la mise en place de l'environnement de développement : Installer son environement de développement
Composer
Composer (site officiel) est le gestionnaire de package de PHP.
L'installation est détaillée sur la page dédiée.
Laravel
Laravel (site officiel) est le framework utilisé pour participalibre.
L'installation est détaillée sur la page dédiée.
Installer les dépendances de participalibre
PHP
Une fois composer et laravel installé, la doc propose d'installer les dépendances du projet.
On clone le dossier de participalibre :
$ git clone https://framagit.org/participalibre/participalibre.git
On se place dans ce dossier et on lance l'installation des dépendances :
$ cd participalibre $ composer install Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - laravel/framework is locked to version v7.14.1 and an update of this package was not requested. - laravel/framework v7.14.1 requires ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension. Problem 2 - league/commonmark is locked to version 1.4.3 and an update of this package was not requested. - league/commonmark 1.4.3 requires ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension. Problem 3 - tijsverkoyen/css-to-inline-styles is locked to version 2.2.2 and an update of this package was not requested. - tijsverkoyen/css-to-inline-styles 2.2.2 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 4 - facade/ignition is locked to version 2.0.6 and an update of this package was not requested. - facade/ignition 2.0.6 requires ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension. Problem 5 - phar-io/manifest is locked to version 1.0.3 and an update of this package was not requested. - phar-io/manifest 1.0.3 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 6 - phpunit/php-code-coverage is locked to version 7.0.10 and an update of this package was not requested. - phpunit/php-code-coverage 7.0.10 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 7 - phpunit/phpunit is locked to version 8.5.5 and an update of this package was not requested. - phpunit/phpunit 8.5.5 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 8 - scrivo/highlight.php is locked to version v9.18.1.1 and an update of this package was not requested. - scrivo/highlight.php v9.18.1.1 requires ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension. Problem 9 - theseer/tokenizer is locked to version 1.1.3 and an update of this package was not requested. - theseer/tokenizer 1.1.3 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. Problem 10 - laravel/framework v7.14.1 requires ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension. - facade/flare-client-php 1.3.2 requires illuminate/pipeline ^5.5|^6.0|^7.0 -> satisfiable by laravel/framework[v7.14.1]. - facade/flare-client-php is locked to version 1.3.2 and an update of this package was not requested. To enable extensions, verify that they are enabled in your .ini files: - /etc/php/7.4/cli/php.ini - /etc/php/7.4/cli/conf.d/10-opcache.ini - /etc/php/7.4/cli/conf.d/10-pdo.ini - /etc/php/7.4/cli/conf.d/20-calendar.ini - /etc/php/7.4/cli/conf.d/20-ctype.ini - /etc/php/7.4/cli/conf.d/20-exif.ini - /etc/php/7.4/cli/conf.d/20-ffi.ini - /etc/php/7.4/cli/conf.d/20-fileinfo.ini - /etc/php/7.4/cli/conf.d/20-ftp.ini - /etc/php/7.4/cli/conf.d/20-gettext.ini - /etc/php/7.4/cli/conf.d/20-iconv.ini - /etc/php/7.4/cli/conf.d/20-json.ini - /etc/php/7.4/cli/conf.d/20-phar.ini - /etc/php/7.4/cli/conf.d/20-posix.ini - /etc/php/7.4/cli/conf.d/20-readline.ini - /etc/php/7.4/cli/conf.d/20-shmop.ini - /etc/php/7.4/cli/conf.d/20-sockets.ini - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini - /etc/php/7.4/cli/conf.d/20-sysvsem.ini - /etc/php/7.4/cli/conf.d/20-sysvshm.ini - /etc/php/7.4/cli/conf.d/20-tokenizer.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
La ligne importante c'est :
Your lock file does not contain a compatible set of packages. Please run composer update.
On lance donc composer update
:
$ composer update Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - laravel/framework[v7.0.0, ..., 7.x-dev] require ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension. - Root composer.json requires laravel/framework ^7.0 -> satisfiable by laravel/framework[v7.0.0, ..., 7.x-dev]. To enable extensions, verify that they are enabled in your .ini files: - /etc/php/7.4/cli/php.ini - /etc/php/7.4/cli/conf.d/10-opcache.ini - /etc/php/7.4/cli/conf.d/10-pdo.ini - /etc/php/7.4/cli/conf.d/20-calendar.ini - /etc/php/7.4/cli/conf.d/20-ctype.ini - /etc/php/7.4/cli/conf.d/20-exif.ini - /etc/php/7.4/cli/conf.d/20-ffi.ini - /etc/php/7.4/cli/conf.d/20-fileinfo.ini - /etc/php/7.4/cli/conf.d/20-ftp.ini - /etc/php/7.4/cli/conf.d/20-gettext.ini - /etc/php/7.4/cli/conf.d/20-iconv.ini - /etc/php/7.4/cli/conf.d/20-json.ini - /etc/php/7.4/cli/conf.d/20-phar.ini - /etc/php/7.4/cli/conf.d/20-posix.ini - /etc/php/7.4/cli/conf.d/20-readline.ini - /etc/php/7.4/cli/conf.d/20-shmop.ini - /etc/php/7.4/cli/conf.d/20-sockets.ini - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini - /etc/php/7.4/cli/conf.d/20-sysvsem.ini - /etc/php/7.4/cli/conf.d/20-sysvshm.ini - /etc/php/7.4/cli/conf.d/20-tokenizer.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Il manque manifestement “php-mbstring” :
$ sudo apt install php-mbstring
Il manque d'autres dépendances :
$ sudo apt install php-tijsverkoyen-css-to-inline-styles $ sudo apt install php-phar-io-manifest $ sudo apt install php-codecoverage $ sudo apt install phpunit
(Je pensais que Composer allait se charger d'installer tout ça ? Est-ce que je loupe une étape ?)
On relance composer update
:
$ composer update
Et puis composer install
:
composer install
Et composer fund
:
$ composer fund
Front avec npm
$ npm install --dev npm WARN install Usage of the `--dev` option is deprecated. Use `--include=dev` instead. added 1116 packages, and audited 1116 packages in 18s 10 vulnerabilities (4 low, 6 high) To address all issues, run: npm audit fix Run `npm audit` for details.
Donc, il vaut mieux utiliser cette commande :
$ npm install --include=dev
La commande conseille d'utiliser npm audit fix
:
$ npm audit fix added 7 packages, removed 16 packages, changed 19 packages, and audited 1107 packages in 6s 1 package is looking for funding run `npm fund` for details found 0 vulnerabilities
Et aussi npm fund
:
$ npm fund participalibre └── https://github.com/chalk/ansi-styles?sponsor=1 └── ansi-styles@4.3.0