verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
96 stars 72 forks source link

Unable to install Formie on Craft 5 through the plugin store. #1753

Closed benfeather closed 8 months ago

benfeather commented 8 months ago

Describe the bug

When installing Formie on a Craft 5 demo site, I get this error:

Error: The command "'/usr/bin/php' '/var/www/html/storage/runtime/composer.phar' 'update' 'verbb/formie' '--with-all-dependencies' '--working-dir' '/var/www/html' '--no-scripts' '--no-ansi' '--no-interaction'" failed.

Exit Code: 2(Misuse of shell builtins)

Working directory: /var/www/html/web

Output:
================

Error Output:
================
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- verbb/formie 3.0.0-beta.1 requires nystudio107/craft-plugin-vite dev-develop-v5 as 5.0.0-beta.1 -> found nystudio107/craft-plugin-vite[dev-develop-v5] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires verbb/formie 3.0.0-beta.1 -> satisfiable by verbb/formie[3.0.0-beta.1].

The Craft 5 site I'm using doesn't have nystudio107/craft-plugin-vite installed as a separate plugin.

I ran into this issue on a few other plugins as well, including:

Steps to reproduce

  1. Spin up a craft 5 install
  2. Install Formie from the Craft plugin store

Form settings

N/A, unable to install.

Craft CMS version

5.0.0-beta.5

Plugin version

3.0.0-beta.1

Multi-site?

Yes

Additional context

Composer packages:

"require": {
    "craftcms/ckeditor": "4.0.0-beta.7",
    "craftcms/cms": "5.0.0-beta.5",
    "craftcms/commerce": "5.0.0-beta.1",
    "doublesecretagency/craft-cpcss": "3.0.0",
    "doublesecretagency/craft-cpjs": "3.0.0",
    "mmikkel/cp-field-inspect": "2.0.0-beta.2",
    "nystudio107/craft-retour": "5.0.0-beta.4",
    "nystudio107/craft-seomatic": "5.0.0-beta.5",
    "spicyweb/craft-embedded-assets": "5.0.0-beta.1",
    "verbb/field-manager": "4.0.0-beta.1",
    "verbb/social-poster": "5.0.0-beta.1",
    "verbb/stamped-io": "3.0.0-beta.1",
    "verbb/super-table": "4.0.0-beta.1",
    "vlucas/phpdotenv": "^5.4.0"
  }
chadcrowell commented 8 months ago

+1 looks like the Vite plugin requirement within Formie might be specific to beta.1 and Andrew now has it on beta.3

engram-design commented 8 months ago

Ah, forgot to update that dependency now it's been tagged! Should be fixed in 3.0.0-beta.2

benfeather commented 8 months ago

That seems to have fixed the composer error, however, I get another error when I try to install the plugin:

yii\base\ErrorException: During class fetch: Uncaught Error: Interface "verbb\formie\base\SubFieldInterface" not found in /var/www/html/vendor/verbb/formie/src/base/SubField.php:13
Stack trace:
#0 /var/www/html/vendor/composer/ClassLoader.php(576): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/html/v...')
#2 /var/www/html/vendor/verbb/formie/src/fields/Address.php(35): Composer\Autoload\ClassLoader->loadClass('verbb\\formie\\ba...')
#3 /var/www/html/vendor/composer/ClassLoader.php(576): include('/var/www/html/v...')
#4 /var/www/html/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/html/v...')
#5 [internal function]: Composer\Autoload\ClassLoader->loadClass('verbb\\formie\\fi...')
#6 /var/www/html/vendor/verbb/formie/src/base/PluginTrait.php(220): class_alias('verbb\\formie\\fi...', 'verbb\\formie\\fi...')
#7 /var/www/html/vendor/composer/ClassLoader.php(576): include('/var/www/html/v...')
#8 /var/www/html/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/html/v...')
#9 /var/www/html/vendor/verbb/formie/src/Formie.php(87): Composer\Autoload\ClassLoader->loadClass('verbb\\formie\\ba...')
#10 /var/www/html/vendor/composer/ClassLoader.php(576): include('/var/www/html/v...')
#11 /var/www/html/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/html/v...')
#12 [internal function]: Composer\Autoload\ClassLoader->loadClass('verbb\\formie\\Fo...')
#13 /var/www/html/vendor/craftcms/cms/src/services/Plugins.php(908): is_subclass_of('verbb\\formie\\Fo...', 'craft\\base\\Plug...')
#14 /var/www/html/vendor/craftcms/cms/src/services/Plugins.php(484): craft\services\Plugins->createPlugin('formie')
#15 /var/www/html/vendor/craftcms/cms/src/controllers/PluginsController.php(52): craft\services\Plugins->installPlugin('formie', NULL)
#16 [internal function]: craft\controllers\PluginsController->actionInstallPlugin()
#17 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#18 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#19 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('install-plugin', Array)
#20 /var/www/html/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->runAction('plugins/install...', Array)
#21 /var/www/html/vendor/craftcms/cms/src/web/Application.php(651): craft\web\Application->runAction('plugins/install...', Array)
#22 /var/www/html/vendor/craftcms/cms/src/web/Application.php(312): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#23 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#24 /var/www/html/web/index.php(17): yii\base\Application->run()
#25 {main} in /var/www/html/vendor/verbb/formie/src/Formie.php:87
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}
engram-design commented 8 months ago

Ah, I believe that's probably due to Git's case insensitivity not picking up that change from SubfieldInterface to SubFieldInterface. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.2".

engram-design commented 8 months ago

Fixed in 3.0.0-beta.3