ユーザ用ツール

サイト用ツール


cms:drupal:drupal10try3

Drupal10Try3

まず、何がいけないのかじっくりみてみよう。大量にエラーメッセージが吐き出されるが、問題は案外少ないのかもしれない。

why-notをやってみる。一度やってるが、たくさんメッセージが出て途方にくれたが、一つ一つを見たわけではなかった。

why-not

$ composer why-not drupal/core ^10
drupal/core-recommended 9.5.11       requires         drupal/core (9.5.11)                                    
drupal/insert           2.0.0        requires         drupal/core (^8 || ^9)                                  
drupal/core             10.2.0-beta1 requires         symfony/console (^6.4)                                  
drupal/legacy-project   -            does not require symfony/console (but v4.4.49 is installed)              
drupal/core             10.2.0-beta1 requires         symfony/dependency-injection (^6.4)                     
drupal/legacy-project   -            does not require symfony/dependency-injection (but v4.4.49 is installed) 
drupal/core             10.2.0-beta1 requires         symfony/event-dispatcher (^6.4)                         
drupal/legacy-project   -            does not require symfony/event-dispatcher (but v4.4.44 is installed)     
drupal/core             10.2.0-beta1 requires         symfony/finder (^6.4)                                   
drupal/legacy-project   -            does not require symfony/finder (but v4.4.44 is installed)               
drupal/core             10.2.0-beta1 requires         symfony/http-foundation (^6.4)                          
drupal/legacy-project   -            does not require symfony/http-foundation (but v4.4.49 is installed)      
drupal/core             10.2.0-beta1 requires         symfony/http-kernel (^6.4)                              
drupal/legacy-project   -            does not require symfony/http-kernel (but v4.4.51 is installed)          
drupal/core             10.2.0-beta1 requires         symfony/mime (^6.4)                                     
drupal/legacy-project   -            does not require symfony/mime (but v5.4.13 is installed)                 
drupal/core             10.2.0-beta1 requires         symfony/routing (^6.4)                                  
drupal/legacy-project   -            does not require symfony/routing (but v4.4.44 is installed)              
drupal/core             10.2.0-beta1 requires         symfony/serializer (^6.4)                               
drupal/legacy-project   -            does not require symfony/serializer (but v4.4.47 is installed)           
drupal/core             10.2.0-beta1 requires         symfony/validator (^6.4)                                
drupal/legacy-project   -            does not require symfony/validator (but v4.4.48 is installed)            
drupal/core             10.2.0-beta1 requires         symfony/process (^6.4)                                  
drupal/legacy-project   -            does not require symfony/process (but v4.4.44 is installed)              
drupal/core             10.2.0-beta1 requires         symfony/yaml (^6.4)                                     
drupal/legacy-project   -            does not require symfony/yaml (but v4.4.45 is installed)                 
drupal/core             10.2.0-beta1 requires         twig/twig (^3.5.0)                                      
drupal/legacy-project   -            does not require twig/twig (but v2.15.5 is installed)                    
drupal/core             10.2.0-beta1 requires         doctrine/annotations (^1.14)                            
drupal/legacy-project   -            does not require doctrine/annotations (but 1.13.3 is installed)          
drupal/core             10.2.0-beta1 requires         guzzlehttp/guzzle (^7.5)                                
drupal/legacy-project   -            does not require guzzlehttp/guzzle (but 6.5.8 is installed)              
drupal/core             10.2.0-beta1 requires         guzzlehttp/psr7 (^2.4.5)                                
drupal/legacy-project   -            does not require guzzlehttp/psr7 (but 1.9.1 is installed)                
drupal/core             10.2.0-beta1 requires         asm89/stack-cors (^2.1)                                 
drupal/legacy-project   -            does not require asm89/stack-cors (but 1.3.0 is installed)               
drupal/core             10.2.0-beta1 requires         psr/log (^3.0)                                          
drupal/legacy-project   -            does not require psr/log (but 1.1.4 is installed)                        
Not finding what you were looking for? Try calling `composer update "drupal/core:^10" --dry-run` to get another view on the problem.

これをみると、coreの要件があってないというのが、たくさんあるけど、

symfony/console (^6.4)             
symfony/dependency-injection (^6.4)
symfony/event-dispatcher (^6.4)                         
symfony/finder (^6.4)
symfony/http-foundation (^6.4)                          
symfony/http-kernel (^6.4)
symfony/mime (^6.4)                                     
symfony/routing (^6.4)                                  
symfony/serializer (^6.4)                               
symfony/validator (^6.4)                                
symfony/process (^6.4)                                  
symfony/yaml (^6.4)                                     
twig/twig (^3.5.0)                                      
doctrine/annotations (^1.14)                            
guzzlehttp/guzzle (^7.5)                                
guzzlehttp/psr7 (^2.4.5)                                
asm89/stack-cors (^2.1)                                 
psr/log (^3.0)                                          

これらは全部coreの中身だから、使用者がどうこうできる内容じゃないよね。となると、うえからの2行目のinsertだけなんとか(削除)すればいけるのでは?とおもってしまうが、どうでしょうか。

insertモジュール削除

サイト上でuninstallしたあと、

$ composer remove drupal/insert -W  
./composer.json has been updated
Running composer update drupal/insert --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 1 removal
  - Removing drupal/insert (2.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 1 removal
  - Removing drupal/insert (2.0.0)
Deleting modules/contrib/insert - deleted
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
46 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning vendor directory.
No security vulnerability advisories found.

がしかし、まだ機能拡張には残ってる(composer.jsonには無くなっていたのに)。./moduleの中にまだディレクトリがある。

削除してしまう。

composer update

no-update

composer require 'drupal/core-recommended:^10' 'drupal/core-composer-scaffold:^10' 'drupal/core-project-message:^10' --no-update

composer.jsonから、devの記述は前回消してしまったので、このままで

composer update

おっ! 初めてエラーなく動いたのか?

$ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 9 installs, 42 updates, 11 removals
  - Removing doctrine/reflection (1.2.4)
  - Removing laminas/laminas-escaper (2.13.0)
  - Removing laminas/laminas-feed (2.22.0)
  - Removing longwave/laminas-diactoros (2.14.2)
  - Removing stack/builder (v1.0.6)
  - Removing symfony-cmf/routing (2.3.4)
  - Removing symfony/debug (v4.4.44)
  - Removing symfony/http-client-contracts (v2.5.2)
  - Removing symfony/polyfill-php73 (v1.28.0)
  - Removing symfony/translation (v4.4.47)
  - Removing typo3/phar-stream-wrapper (v3.1.7)
  - Upgrading asm89/stack-cors (1.3.0 => v2.1.1)
  - Upgrading defuse/php-encryption (v2.3.1 => v2.4.0)
  - Upgrading doctrine/annotations (1.13.3 => 1.14.3)
  - Locking doctrine/deprecations (1.1.2)
  - Upgrading doctrine/lexer (1.2.3 => 2.1.0)
  - Upgrading drupal/core (9.5.11 => 10.1.6)
  - Upgrading drupal/core-composer-scaffold (9.5.11 => 10.1.6)
  - Upgrading drupal/core-project-message (9.5.11 => 10.1.6)
  - Upgrading drupal/core-recommended (9.5.11 => 10.1.6)
  - Upgrading egulias/email-validator (3.2.6 => 4.0.2)
  - Upgrading guzzlehttp/guzzle (6.5.8 => 7.7.1)
  - Upgrading guzzlehttp/promises (1.5.3 => 2.0.1)
  - Upgrading guzzlehttp/psr7 (1.9.1 => 2.5.1)
  - Downgrading laminas/laminas-servicemanager (3.22.1 => 3.15.0)
  - Upgrading masterminds/html5 (2.7.6 => 2.8.1)
  - Locking mck89/peast (v1.15.4)
  - Upgrading mglaman/phpstan-drupal (1.1.25 => 1.2.4)
  - Upgrading phpstan/phpstan (1.8.6 => 1.10.44)
  - Upgrading phpstan/phpstan-deprecation-rules (1.0.0 => 1.1.4)
  - Upgrading psr/cache (1.0.1 => 3.0.0)
  - Upgrading psr/container (1.1.2 => 2.0.2)
  - Locking psr/event-dispatcher (1.0.0)
  - Locking psr/http-client (1.0.3)
  - Upgrading psr/http-message (1.0.1 => 2.0)
  - Upgrading psr/log (1.1.4 => 3.0.0)
  - Locking sebastian/diff (4.0.5)
  - Upgrading symfony/console (v4.4.49 => v6.3.8)
  - Upgrading symfony/dependency-injection (v4.4.49 => v6.3.8)
  - Upgrading symfony/deprecation-contracts (v2.5.2 => v3.3.0)
  - Upgrading symfony/error-handler (v4.4.44 => v6.3.5)
  - Upgrading symfony/event-dispatcher (v4.4.44 => v6.3.2)
  - Upgrading symfony/event-dispatcher-contracts (v1.1.13 => v3.3.0)
  - Upgrading symfony/finder (v4.4.44 => v6.3.5)
  - Upgrading symfony/http-foundation (v4.4.49 => v6.3.8)
  - Upgrading symfony/http-kernel (v4.4.51 => v6.3.8)
  - Upgrading symfony/mime (v5.4.13 => v6.3.5)
  - Locking symfony/polyfill-intl-grapheme (v1.27.0)
  - Upgrading symfony/polyfill-php80 (v1.27.0 => v1.28.0)
  - Locking symfony/polyfill-php83 (v1.27.0)
  - Upgrading symfony/process (v4.4.44 => v6.3.4)
  - Upgrading symfony/psr-http-message-bridge (v2.1.4 => v2.2.0)
  - Upgrading symfony/routing (v4.4.44 => v6.3.5)
  - Upgrading symfony/serializer (v4.4.47 => v6.3.8)
  - Upgrading symfony/service-contracts (v2.5.2 => v3.3.0)
  - Locking symfony/string (v6.3.8)
  - Upgrading symfony/translation-contracts (v2.5.2 => v3.3.0)
  - Upgrading symfony/validator (v4.4.48 => v6.3.8)
  - Upgrading symfony/var-dumper (v5.4.29 => v6.3.8)
  - Locking symfony/var-exporter (v6.3.6)
  - Upgrading symfony/yaml (v4.4.45 => v6.3.8)
  - Upgrading twig/twig (v2.15.5 => v3.6.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 9 installs, 42 updates, 11 removals
  - Downloading defuse/php-encryption (v2.4.0)
  - Downloading phpstan/phpstan (1.10.44)
  - Downloading phpstan/phpstan-deprecation-rules (1.1.4)
  - Downloading symfony/finder (v6.3.5)
  - Downloading mglaman/phpstan-drupal (1.2.4)
  - Downloading laminas/laminas-servicemanager (3.15.0)
  - Removing typo3/phar-stream-wrapper (v3.1.7)
  - Removing symfony/translation (v4.4.47)
  - Removing symfony/polyfill-php73 (v1.28.0)
  - Removing symfony/http-client-contracts (v2.5.2)
  - Removing symfony/debug (v4.4.44)
  - Removing symfony-cmf/routing (2.3.4)
  - Removing stack/builder (v1.0.6)
  - Removing longwave/laminas-diactoros (2.14.2)
  - Removing laminas/laminas-feed (2.22.0)
  - Removing laminas/laminas-escaper (2.13.0)
  - Removing doctrine/reflection (1.2.4)
  - Upgrading drupal/core-composer-scaffold (9.5.11 => 10.1.6): Extracting archive
  - Upgrading drupal/core-project-message (9.5.11 => 10.1.6): Extracting archive
  - Upgrading defuse/php-encryption (v2.3.1 => v2.4.0): Extracting archive
  - Upgrading twig/twig (v2.15.5 => v3.6.1): Extracting archive
  - Upgrading symfony/deprecation-contracts (v2.5.2 => v3.3.0): Extracting archive
  - Upgrading symfony/yaml (v4.4.45 => v6.3.8): Extracting archive
  - Upgrading symfony/translation-contracts (v2.5.2 => v3.3.0): Extracting archive
  - Upgrading symfony/polyfill-php80 (v1.27.0 => v1.28.0): Extracting archive
  - Installing symfony/polyfill-php83 (v1.27.0): Extracting archive
  - Upgrading symfony/validator (v4.4.48 => v6.3.8): Extracting archive
  - Upgrading symfony/serializer (v4.4.47 => v6.3.8): Extracting archive
  - Upgrading symfony/routing (v4.4.44 => v6.3.5): Extracting archive
  - Upgrading symfony/http-foundation (v4.4.49 => v6.3.8): Extracting archive
  - Upgrading psr/http-message (1.0.1 => 2.0): Extracting archive
  - Upgrading symfony/psr-http-message-bridge (v2.1.4 => v2.2.0): Extracting archive
  - Upgrading symfony/process (v4.4.44 => v6.3.4): Extracting archive
  - Upgrading symfony/mime (v5.4.13 => v6.3.5): Extracting archive
  - Installing psr/event-dispatcher (1.0.0): Extracting archive
  - Upgrading symfony/event-dispatcher-contracts (v1.1.13 => v3.3.0): Extracting archive
  - Upgrading symfony/event-dispatcher (v4.4.44 => v6.3.2): Extracting archive
  - Upgrading symfony/var-dumper (v5.4.29 => v6.3.8): Extracting archive
  - Upgrading psr/log (1.1.4 => 3.0.0): Extracting archive
  - Upgrading symfony/error-handler (v4.4.44 => v6.3.5): Extracting archive
  - Upgrading symfony/http-kernel (v4.4.51 => v6.3.8): Extracting archive
  - Installing symfony/var-exporter (v6.3.6): Extracting archive
  - Upgrading psr/container (1.1.2 => 2.0.2): Extracting archive
  - Upgrading symfony/service-contracts (v2.5.2 => v3.3.0): Extracting archive
  - Upgrading symfony/dependency-injection (v4.4.49 => v6.3.8): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.27.0): Extracting archive
  - Installing symfony/string (v6.3.8): Extracting archive
  - Upgrading symfony/console (v4.4.49 => v6.3.8): Extracting archive
  - Installing sebastian/diff (4.0.5): Extracting archive
  - Installing mck89/peast (v1.15.4): Extracting archive
  - Upgrading masterminds/html5 (2.7.6 => 2.8.1): Extracting archive
  - Upgrading guzzlehttp/psr7 (1.9.1 => 2.5.1): Extracting archive
  - Installing psr/http-client (1.0.3): Extracting archive
  - Upgrading guzzlehttp/promises (1.5.3 => 2.0.1): Extracting archive
  - Upgrading guzzlehttp/guzzle (6.5.8 => 7.7.1): Extracting archive
  - Installing doctrine/deprecations (1.1.2): Extracting archive
  - Upgrading doctrine/lexer (1.2.3 => 2.1.0): Extracting archive
  - Upgrading egulias/email-validator (3.2.6 => 4.0.2): Extracting archive
  - Upgrading psr/cache (1.0.1 => 3.0.0): Extracting archive
  - Upgrading doctrine/annotations (1.13.3 => 1.14.3): Extracting archive
  - Upgrading asm89/stack-cors (1.3.0 => v2.1.1): Extracting archive
  - Upgrading drupal/core (9.5.11 => 10.1.6): Extracting archive
  - Upgrading drupal/core-recommended (9.5.11 => 10.1.6)
  - Upgrading phpstan/phpstan (1.8.6 => 1.10.44): Extracting archive
  - Upgrading phpstan/phpstan-deprecation-rules (1.0.0 => 1.1.4): Extracting archive
  - Upgrading symfony/finder (v4.4.44 => v6.3.5): Extracting archive
  - Upgrading mglaman/phpstan-drupal (1.1.25 => 1.2.4): Extracting archive
  - Downgrading laminas/laminas-servicemanager (3.22.1 => 3.15.0): Extracting archive
    Cleaning: twig/twig
    Cleaning: symfony/yaml
    Cleaning: symfony/validator
    Cleaning: symfony/serializer
    Cleaning: symfony/routing
    Cleaning: symfony/http-foundation
    Cleaning: symfony/psr-http-message-bridge
    Cleaning: symfony/process
    Cleaning: symfony/event-dispatcher
    Cleaning: symfony/http-kernel
    Cleaning: symfony/dependency-injection
    Cleaning: symfony/console
    Cleaning: sebastian/diff
    Cleaning: masterminds/html5
    Cleaning: guzzlehttp/psr7
    Cleaning: guzzlehttp/promises
    Cleaning: egulias/email-validator
    Cleaning: symfony/finder
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning vendor directory.
Scaffolding files for drupal/core:
  - Copy [web-root]/.ht.router.php from assets/scaffold/files/ht.router.php
  - Copy [web-root]/.htaccess from assets/scaffold/files/htaccess
  - Copy [web-root]/example.gitignore from assets/scaffold/files/example.gitignore
  - Copy [web-root]/sites/example.settings.local.php from assets/scaffold/files/example.settings.local.php
 
In Filesystem.php line 288:
 
  Could not delete /home/husq/www/www_cycle_eek/sites/default/default.services.yml:  
 
 
update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]

composer install

エラーなしでcomposer updateを実行できたら、composer installも実行できることを確認してください。これにより、プロジェクトの他の開発者、および/またはあなたが持っている可能性のある展開スクリプトは、新しい依存関係をインストールするときにエラーをスローしないようにします。
すべてがうまくいけば、エラーは表示されませんし、「インストール、更新、削除するものはありません」も表示されます。

$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
45 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Scaffolding files for drupal/core:
  - Copy [web-root]/sites/default/default.services.yml from assets/scaffold/files/default.services.yml
  - Copy [web-root]/sites/default/default.settings.php from assets/scaffold/files/default.settings.php
  - Copy [web-root]/modules/README.txt from assets/scaffold/files/modules.README.txt
  - Copy [web-root]/profiles/README.txt from assets/scaffold/files/profiles.README.txt
  - Copy [web-root]/themes/README.txt from assets/scaffold/files/themes.README.txt
  * Homepage: https://www.drupal.org/project/drupal
  * Support:
    * docs: https://www.drupal.org/docs/user_guide/en/index.html
    * chat: https://www.drupal.org/node/314178
Cleaning vendor directory.

エラーなく終了

Drupal10Try3続き

cms/drupal/drupal10try3.txt · 最終更新: 2023/11/26 21:22 by king