Closed DannyTaki closed 1 year ago
Hello Daniel! Thank you for your issue. I'm not a woman, so I can answer a single question only.
config.json lives in you $COMPOSER_HOME, on my server it is ~/.composer/ Please find yours and create config.json there.
This command may tell you where that directory is composer global config --absolute home
What happens when I have to re-provision server will it remove the
szepeviktor/composer-envato
plugin?
Yes, this Composer plugin and its configuration file - config.json - lives outside your project. It needs to live outside your project as in Composer v1 world you cannot run a plugin locally that modifies package URL-s. In Composer v2 there is a solution for this. Pull Requests welcome!
Haha! I wasn't even expecting an answer much less from the plugin author! That's awesome. Thank you so much. Will re-provisioning a Trellis server remove your custom composer plugin on the server after I have manually installed it?
I do not really know Trellis. The work of Rocks people is not acceptable for me.
Just tell Trellis to copy your config.json file there and install this Composer plugin globally.
I created a config.json in the /home/$USER/.config/composer/
directory and added the following json and then added the package in my project's composer.json require
"envato/woocommerce-pipedrive-crm-integration": "*"
. I get the folllowing error when running composer update
:
PHP Fatal error: Declaration of SzepeViktor\Composer\Envato\EnvatoPackage::getDistType() must be compatible with Composer\Package\Package::getDistType(): ?string in /home/dannytaki/.config/composer/vendor/szepeviktor/composer-envato/src/EnvatoPackage.php on line 53
Fatal error: Declaration of SzepeViktor\Composer\Envato\EnvatoPackage::getDistType() must be compatible with Composer\Package\Package::getDistType(): ?string in /home/dannytaki/.config/composer/vendor/szepeviktor/composer-envato/src/EnvatoPackage.php on line 53
Composer command itself won't work and emits that error unless I remove the config.json file I created.
Running composer global config --absolute home
returns Changed current directory to /home/dannytaki/.config/composer /home/dannytaki/.config/composer
PHP Fatal error
You must be using Composer v2. This plugin is not yet Composer v2 compatible.
No, this plugin is Composer v2 compatible. Recent Composer releases introduced new typehints. https://github.com/composer/composer/commit/7abc8da7d3fa2db2f259517d84acb753399fab07
Please send a PR!
Following the install instructions after running
composer global require --update-no-dev szepeviktor/composer-envato
, I cannot find my config.json file the only file iscomposer.json
in the directory/home/$USER/.config/composer
.Since this installs the file on my local directory how would this work with a Trellis+Bedrock set up? Would I have to manually run the installation command on the server? What happens when I have to re-provision server will it remove the
szepeviktor/composer-envato
plugin?