我已使用以下命令https://www.cloudways.com/blog/update-drupal-8-core/进行了升级https://alvinalexander.com/drupal/how-update-drupal-7-website-with-drush
drush pm-update
更新后出现以下错误
致命错误:找不到类'Aws \ S3 \ StreamWrapper'//第23行的//web/modules/contrib/s3fs/src/StreamWrapper/S3fsStream.php
我还添加了最新的AWS开发工具包
composer require aws/aws-sdk-php
任何想法如何解决此问题?
[UPDATE]升级之前8.6.16:
composer.json
composer.lock
config -> Folder
docs -> Folder
drush -> Folder
LICENSE
load.environment.php
phpunit.xml.dist
README.md
vendor -> Folder
web -> Folder
-> autoload.php
-> core -> Folder
-> index.php
-> libaries -> Folder
-> modules -> Folder
-> profiles -> Folder
-> robots.txt
-> sites -> Folder
-> themes -> Folder
-> update.php
-> web.config
升级后8.8.11:
composer.json
composer.lock
config -> Folder
docs -> Folder
drush -> Folder
LICENSE
load.environment.php
phpunit.xml.dist
README.md
vendor -> Folder
web -> Folder
-> autoload.php
-> composer.json [NEW FILES]
-> composer.lock [NEW FILES]
-> core -> Folder
-> index.php
-> libaries -> Folder
-> modules -> Folder
-> profiles -> Folder
-> robots.txt
-> sites -> Folder
-> themes -> Folder
-> vendor -> [NEW FOLDER]
-> update.php
-> web.config
然后我运行composer dump-autoload
。我重命名了web/composer.json_1
和web / composer.lock_1'。
我将web\vendor
文件夹内的内容复制/粘贴到root\web
。因此只有1个供应商文件夹。
之后我得到
PHP Warning: require(//web/vendor/autoload.php): failed to open stream: No such file or directory in /web/autoload.php on line 16
错误,因此我更改了路径
return require __DIR__ . '/vendor/autoload.php';
到
return require __DIR__ . '/../vendor/autoload.php';
现在我要得到
Fatal error: Declaration of Drupal\Core\Security\PharExtensionInterceptor::assert(string $path, string $command): bool must be compatible with TYPO3\PharStreamWrapper\Assertable::assert($path, $command) in /web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php on line 14
我希望我遵循正确的程序。
[UPDATE]
https://www.drupal.org/forum/support/upgrading-drupal/2020-01-09/upgrade-from-867-to-8711
最佳实践是使用作曲家更新Drupal 8:
composer update
然后运行drush updb