fortrabbit / craft-copy

Deployment tools for Craft on fortrabbit
https://www.fortrabbit.com
MIT License
73 stars 8 forks source link

Craft 3.5.x issues #86

Closed digason closed 3 years ago

digason commented 4 years ago

After upgrading to Craft 3.4.24 to 3.5.7, craft-copy results in errors.

$ ./craft copy/db/down PHP Compile Error 'yii\base\ErrorException' with message 'Declaration of Symfony\Component\Console\Style\SymfonyStyle::ask(string $question, ?string $default = NULL, $validator = NULL) must be compatible with Symfony\Component\Console\Style\StyleInterface::ask(string $question, ?string $default = NULL, ?callable $validator = NULL)'

in /Users/Shared/Sites/*****/vendor/symfony/console/Style/SymfonyStyle.php:36

Stack trace:

0 [internal function]: yii\base\ErrorHandler->handleFatalError()

1 {main}

Even running craft command on it's own:

$ ./craft

This is Yii version 2.0.36.

The following commands are available:

in /Users/Shared/Sites/*****/vendor/symfony/console/Style/SymfonyStyle.php:36

Stack trace:

0 [internal function]: yii\base\ErrorHandler->handleFatalError()

1 {main}

Uninstalling craft-copy resolves my errors, but I obviously lose the ability to easily copy database and assets.

ostark commented 4 years ago

Thanks Jason,

can you install it again, like you did before and run this:

composer why symfony/console

What's the output?


Can you update with the --with-all-dependencies option?

composer update fortrabbit/craft-copy --with-all-dependencies

What the output after the dependency update?

composer why symfony/console
ostark commented 4 years ago

solved in https://github.com/fortrabbit/craft-copy/commit/455cbad03fe09cd17dc9fecd548ca00ea5bd36e3

digason commented 4 years ago

This is still an issue for me with craft-copy 1.0.0-RC12. Disabling craft-copy removes all errors, but I obviously lose the ability to easily sync to Fortrabbit hosted sites.

$ composer why symfony/console
composer/composer           1.10.10  requires  symfony/console (^2.7 || ^3.0 || ^4.0 || ^5.0)   
ostark/yii2-artisan-bridge  1.3.1    requires  symfony/console (^3.0 || ^4.0 || ^5.0)           
psy/psysh                   v0.10.4  requires  symfony/console (~5.0|~4.0|~3.0|^2.4.2|~2.3.10)  
$ ./craft

This is Yii version 2.0.36.

The following commands are available:

- backup                                    Allows you to create a new database backup.
    backup/db (default)                     Creates a new database backup.

- cache                                     Allows you to flush cache.
    cache/flush                             Flushes given cache components.
    cache/flush-all                         Flushes all caches registered in the system.
    cache/flush-schema                      Clears DB schema cache for a given connection component.
    cache/index (default)                   Lists the caches that can be flushed.

- clear-caches                              Allows you to clear various Craft caches.
    clear-caches/all                        Clear all caches.
    clear-caches/asset                      Asset caches
    clear-caches/asset-indexing-data        Asset indexing data
    clear-caches/compiled-templates         Compiled templates
    clear-caches/cp-resources               Control panel resources
    clear-caches/data                       Data caches
    clear-caches/index (default)            Lists the caches that can be cleared.
    clear-caches/temp-files                 Temp files
    clear-caches/transform-indexes          Asset transform index

- copy                                      Copy Craft between environments.
    copy/all/downPHP Compile Error 'yii\base\ErrorException' with message 'Declaration of Symfony\Component\Console\Style\SymfonyStyle::ask(string $question, ?string $default = NULL, $validator = NULL) must be compatible with Symfony\Component\Console\Style\StyleInterface::ask(string $question, ?string $default = NULL, ?callable $validator = NULL)'

in /Users/Shared/Sites/xxxxxx/vendor/symfony/console/Style/SymfonyStyle.php:36

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}
ostark commented 4 years ago

Please update to the latest 1.0.0.

compass360 commented 3 years ago

I just ran into the same issue on 1.0.0. Everything was up to date, and both craft/copy and ./craft commands spit out the same Symfony error as above. I updated composer to 2.0.7, which solved it on my end. Hope that helps.