craftcms / cloud-extension-yii2

0 stars 1 forks source link

[5.0.0]: Craft Cloud #37

Closed seandelaney closed 7 months ago

seandelaney commented 7 months ago

What happened?

Description

Cannot install Craft Cloud tools in Craft 5

PHP Compile Error 'yii\base\ErrorException' with message 'Declaration of craft\cloud\fs\Fs::renameFile(string $path, string $newPath): void must be compatible with craft\flysystem\base\FlysystemFs::renameFile(string $path, string $newPath, $config = []): void'

in /vendor/craftcms/cloud/src/fs/Fs.php:373

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
craftcms/cms#1 {main}

Steps to reproduce

  1. Update composer:

    "require": {
      ...
      "craftcms/cloud": "*",
      "craftcms/cms": "^5.0.0",
      "vlucas/phpdotenv": "^5.4.0"
      ...
    },
  2. Update craft-cloud.yaml:

php-version: '8.2'
  1. Run composer install
  2. Run php craft install

Expected behavior

Install Craft 5

Actual behavior

Craft CMS version

5.0.0

PHP version

8.2

Operating system and version

MacOS Monterey 12.7.4

Database type and version

MySQL 8

Image driver and version

No response

Installed plugins and versions

-

timkelty commented 7 months ago

@seandelaney can you let me know what version of craftcms/cloud is locked to in composer.lock

seandelaney commented 7 months ago

@timkelty

I see 1.44.1 but I think I have resolved the issue by setting "craftcms/cloud": "^2.0.0", which installed:

Upgrading craftcms/flysystem (1.0.2 => 2.0.1): Extracting archive
Upgrading craftcms/cloud (1.44.1 => 2.x-dev 87304d6): Extracting archive
timkelty commented 7 months ago

@seandelaney yep that's what you should have for Craft 5.