wintercms / winter

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.
https://wintercms.com
MIT License
1.36k stars 192 forks source link

Updating a plugin via command-line error. #1091

Closed qroft closed 6 months ago

qroft commented 6 months ago

Winter CMS Build

1.2

PHP Version

Other (please specify below)

Database engine

SQLite

Plugins installed

Winter.Demo, Winter.Blog, Indikator.Backend, Winter.Builder, Mercator.TwigExt

Issue description

Thanks to my not-so-nice webhost, i am having trouble using composer. To add the Mercator.TwigExt plugin, i copied it manually into the plugins folder. In the backend i can see that it was found and that - in theory - i can use it. But it does not work because i need some Twig Intl extras installed what through the FTP upload does not work. As i can not use composer, i can not make it install all the dependencies.

So i thought that i could use php artisan plugin:refresh Mercator.TwigExt as workaround but the result is this error:

In Questionhelper line 109: Undefined constant "STDIN"

I tried to update any other plugin, but all of them result in this error.

I am using PHP 8.3

Steps to replicate

  1. Installed a plugin manually.
  2. In the command line called "php artisan plugin:refresh Name.OfPlugin
  3. Wait

Workaround

Unfortunately until now, nothing.

damsfx commented 6 months ago

The plugin's composer.json file indicates that it requires dependencies (which will be installed with composer).

If in your case you can't use composer on your server (your hosting provider should offer it ... we're in 2024) you can perform the installation in a local environment and then upload the plugin files via FTP. ⚠ In this case, you'll also need to synchronize your ./vendor folder to get the plugin's dependencies (don't miss the autoload.php file).

mjauvin commented 6 months ago

The best way is to have a local install where composer is available and push the plugins and vendor folders using FTP.

Once done, run php artisan migrate