Alors voila ce que je fais
$ php Thelia module:generate Algo3
$ cd local
$ cd modules
$ cd Algo3
Quand je lance :
$ composer require algolia/algoliasearch-client-php
Je reçois
./composer.json has been updated
Running composer update algolia/algoliasearch-client-php
Loading composer repositories with package information
Updating dependencies
Lock file operations: 5 installs, 0 updates, 0 removals
- Locking algolia/algoliasearch-client-php (3.4.1)
- Locking psr/http-message (2.0)
- Locking psr/log (3.0.0)
- Locking psr/simple-cache (3.0.0)
- Locking thelia/installer (1.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
thelia/installer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "thelia/installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?]
Je ne cherche pas du tout a faire un update, je ne sais pas ou est ce que je cherche a faire un update ?
Aucune idée de ce que je dois répondre, dans le doute, je met n et reçois :
Do you trust "thelia/installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] n
- Installing thelia/installer (1.3): Extracting archive
- Installing psr/simple-cache (3.0.0): Extracting archive
- Installing psr/log (3.0.0): Extracting archive
- Installing psr/http-message (2.0): Extracting archive
- Installing algolia/algoliasearch-client-php (3.4.1): Extracting archive
1 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
No security vulnerability advisories found
Using version ^3.4 for algolia/algoliasearch-client-php
Ensuite je vais dans le bo activer le module,
je recois
Compile Error: Cannot declare class Composer\Autoload\ClassLoader, because the name is already in use
in ../local/modules/Algo3/vendor/composer/ClassLoader.php (line 43)
Donc je m'en vais supprimer /local/modules/Algo3/vendor/composer
ça me fait le même coup pour :
Compile Error: Cannot declare class Psr\Log\AbstractLogger, because the name is already in use
Je m'en vais supprimer vendor/psr
Je me retrouve donc dans Algo3/vendor avec
/algolia
/bin
/thelia
autoload.php
Tout ça ne me parait pas trop normal et il y a forcément quelque chose que je fais, fais mal, ou ne fais pas mais quoi je n'en sais rien ?
Last edited by vz777 (14-11-2023 00:00:42)