Обновление Д9 через Композер. - Package "composer" listed for update is not locked.

Главные вкладки

Аватар пользователя kompospec kompospec 23 мая 2021 в 13:44

~/New_irs/web/core$ /opt/php74/bin/php /usr/local/bin/composer update composer update --dry-run "drupal/*"
Loading composer repositories with package information
Package "composer" listed for update is not locked.
Package "update" listed for update is not locked.
Pattern "drupal/*" listed for update does not match any locked packages.
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
39 packages you are using are looking for funding.
Use the `composer fund` command to find out more

Лучший ответ

Аватар пользователя kompospec kompospec 26 мая 2021 в 13:05

Я удалил этот блок из файла - И всё обновилось за 5 сек!

Комментарии

Аватар пользователя ivnish ivnish 23 мая 2021 в 14:04
1

kompospec wrote: ~/New_irs/web/core$ /opt/php74/bin/php /usr/local/bin/composer update composer update --dry-run "drupal/*"

Обычная невнимательность. У вас дублируется composer update composer update Pardon

Аватар пользователя kompospec kompospec 23 мая 2021 в 14:24

~/New_irs/web/core$ /opt/php74/bin/php /usr/local/bin/composer update --dry-run "drupal/*"
Loading composer repositories with package information
Pattern "drupal/*" listed for update does not match any locked packages.
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
39 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Аватар пользователя ivnish ivnish 23 мая 2021 в 14:27
1

Потому что это некорректный синтаксис. Если нужно обновить вообще всё, достаточно вызвать composer update. Если нужно обновить только ядро, то нужно запускать команду composer update drupal/core "drupal/core-*" --with-all-dependencies, что написано в документации, которую никто не читает https://www.drupal.org/docs/updating-drupal/updating-drupal-core-via-com...

Аватар пользователя kompospec kompospec 23 мая 2021 в 14:28

Шаблон «drupal / *», указанный для обновления, не соответствует ни одному заблокированному пакету.

---- Всё таки оно хочет что-то заблокированное

Аватар пользователя kompospec kompospec 23 мая 2021 в 14:33

~/New_irs/web/core$ /opt/php74/bin/php /usr/local/bin/composer update drupal/core "drupal/core-*" --with-all-dependencies
Loading composer repositories with package information
Package "drupal/core" listed for update is not locked.
Pattern "drupal/core-*" listed for update does not match any locked packages.
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
39 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Аватар пользователя kompospec kompospec 23 мая 2021 в 17:50

О. Стал выдавать что-то другое.
Куча ошибок и в конце написано:

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Аватар пользователя kompospec kompospec 23 мая 2021 в 18:00
~/New_irs$ /opt/php74/bin/php /usr/local/bin/composer update drupal/core "drupal/core-*" --with-all-dependencies
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install drupal/block_id 1.2.0 (conflict analysis result)
    - drupal/core-recommended[9.0.0-beta3, ..., 9.0.0-rc1] require symfony/process v4.4.8 -> satisfiable by symfony/process[v4.4.8].
    - Conclusion: don'
t install symfony/process v4.4.8 (conflict analysis result)
    - drupal/core-recommended[9.0.0, ..., 9.0.12] require symfony/process v4.4.9 -> satisfiable by symfony/process[v4.4.9].
    - Conclusion: don't install symfony/process v4.4.9 (conflict analysis result)
    - Conclusion: don'
t install drupal/core-recommended 9.1.1 (conflict analysis result)
    - drupal/core-recommended 9.0.0-alpha1 requires composer/installers v1.7.0 -> found composer/installers[v1.7.0] but it conflicts with your root composer.json require (^1.9).
    - drupal/core-recommended[9.0.0-alpha2, ..., 9.0.0-beta2] require composer/installers v1.8.0 -> found composer/installers[v1.8.0] but it conflicts with your root composer.json require (^1.9).
    - drupal/core 8.0.0-beta6 requires doctrine/common dev-master#a45d110f71c323e29f41eb0696fa230e3fa1b1b5 -> found doctrine/common[2.1.3, ..., 2.13.x-dev, 3.0.0, ..., 3.2.x-dev] but it does not match the constraint.
    - drush/drush is locked to version 10.3.6 and an update of this package was not requested.
    - drupal/core-recommended 9.2.x-dev requires drupal/core 9.2.x-dev -> satisfiable by drupal/core[9.2.x-dev].
    - Conclusion: don't install drupal/core 9.2.x-dev (conflict analysis result)
    - drupal/core-recommended 9.3.x-dev requires drupal/core 9.3.x-dev -> satisfiable by drupal/core[9.3.x-dev].
    - Conclusion: don'
t install drupal/core 9.3.x-dev (conflict analysis result)
    - drupal/core-recommended 9.1.0-alpha1 requires drupal/core 9.1.0-alpha1 -> satisfiable by drupal/core[9.1.0-alpha1].
    - Conclusion: don't install drupal/core 9.1.0-alpha1 (conflict analysis result)
    - drupal/core-recommended 9.2.0-alpha1 requires drupal/core 9.2.0-alpha1 -> satisfiable by drupal/core[9.2.0-alpha1].
    - Conclusion: don'
t install drupal/core 9.2.0-alpha1 (conflict analysis result)
    - drupal/core-recommended 9.1.0-beta1 requires drupal/core 9.1.0-beta1 -> satisfiable by drupal/core[9.1.0-beta1].
    - Conclusion: don't install drupal/core 9.1.0-beta1 (conflict analysis result)
    - drupal/core-recommended 9.2.0-beta1 requires drupal/core 9.2.0-beta1 -> satisfiable by drupal/core[9.2.0-beta1].
    - Conclusion: don'
t install drupal/core 9.2.0-beta1 (conflict analysis result)
    - drupal/core-recommended 9.1.0-rc1 requires drupal/core 9.1.0-rc1 -> satisfiable by drupal/core[9.1.0-rc1].
    - Conclusion: don't install drupal/core 9.1.0-rc1 (conflict analysis result)
    - drupal/core-recommended 9.1.0-rc2 requires drupal/core 9.1.0-rc2 -> satisfiable by drupal/core[9.1.0-rc2].
    - Conclusion: don'
t install drupal/core 9.1.0-rc2 (conflict analysis result)
    - drupal/core-recommended 9.1.0-rc3 requires drupal/core 9.1.0-rc3 -> satisfiable by drupal/core[9.1.0-rc3].
    - Conclusion: don't install drupal/core 9.1.0-rc3 (conflict analysis result)
    - drupal/core-recommended 9.0.13 requires drupal/core 9.0.13 -> satisfiable by drupal/core[9.0.13].
    - Conclusion: don'
t install drupal/core 9.0.13 (conflict analysis result)
    - drupal/core-recommended 9.1.0 requires drupal/core 9.1.0 -> satisfiable by drupal/core[9.1.0].
    - Conclusion: don't install drupal/core 9.1.0 (conflict analysis result)
    - drupal/core-recommended 9.1.2 requires drupal/core 9.1.2 -> satisfiable by drupal/core[9.1.2].
    - Conclusion: don'
t install drupal/core 9.1.2 (conflict analysis result)
    - drupal/core-recommended 9.1.3 requires drupal/core 9.1.3 -> satisfiable by drupal/core[9.1.3].
    - Conclusion: don't install drupal/core 9.1.3 (conflict analysis result)
    - drupal/core-recommended 9.1.4 requires drupal/core 9.1.4 -> satisfiable by drupal/core[9.1.4].
    - Conclusion: don'
t install drupal/core 9.1.4 (conflict analysis result)
    - drupal/core-recommended 9.1.5 requires drupal/core 9.1.5 -> satisfiable by drupal/core[9.1.5].
    - Conclusion: don't install drupal/core 9.1.5 (conflict analysis result)
    - drupal/core-recommended 9.1.6 requires drupal/core 9.1.6 -> satisfiable by drupal/core[9.1.6].
    - Conclusion: don'
t install drupal/core 9.1.6 (conflict analysis result)
    - drupal/core-recommended 9.1.7 requires drupal/core 9.1.7 -> satisfiable by drupal/core[9.1.7].
    - Conclusion: don't install drupal/core 9.1.7 (conflict analysis result)
    - drupal/core-recommended 9.1.8 requires drupal/core 9.1.8 -> satisfiable by drupal/core[9.1.8].
    - Conclusion: don'
t install drupal/core 9.1.8 (conflict analysis result)
    - drupal/block_id 1.x-dev is an alias of drupal/block_id dev-1.x and thus requires it to be installed too.
    - Root composer.json requires drupal/block_id ^1.2 -> satisfiable by drupal/block_id[1.2.0, 1.x-dev (alias of dev-1.x)].
    - drupal/core-recommended 9.1.x-dev requires drupal/core 9.1.x-dev -> satisfiable by drupal/core[9.1.x-dev].
    - Conclusion: don't install drupal/core 9.1.x-dev (conflict analysis result)
    - drupal/block_id dev-1.x requires drupal/core ^8 -> satisfiable by drupal/core[8.0.0-beta6, ..., 8.9.x-dev].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.3.x-dev].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta12, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.3.x-dev].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta16, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.3.x-dev].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-rc3, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.3.x-dev].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.4.0-alpha1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.3.x-dev].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.4.0-rc1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.3.x-dev].
    - drupal/core-recommended 9.0.x-dev requires drupal/core 9.0.x-dev -> satisfiable by drupal/core[9.0.x-dev].
    - Root composer.json requires drupal/core-recommended ^9.0 -> satisfiable by drupal/core-recommended[9.0.0-alpha1, ..., 9.3.x-dev].

Аватар пользователя kompospec kompospec 23 мая 2021 в 18:02

Блин. 7-ка обновляется за 5 мин простым перетаскиванием из папки в папку.
А тут...
А может и тут можно просто перетащить новую версию?

Аватар пользователя kompospec kompospec 23 мая 2021 в 18:08

Сайт уже есть. Сайт неплохой. Даже - очень хороший. Большой и красивый.
Как определить как собран сайт? С Композером или нет?

Аватар пользователя ivnish ivnish 23 мая 2021 в 18:12
1

Как минимум наличие в корне проекта файлов composer.json и composer.lock

Ваш composer.json хотелось бы увидеть, а то надоело гадать на кофейной гуще

Аватар пользователя ivnish ivnish 23 мая 2021 в 18:13
1

Модуль block_id не может быть установлен на девятку, потому что не имеет её поддержки. Только восьмерка. Это написано на странице модуля

Аватар пользователя kompospec kompospec 23 мая 2021 в 18:18

ivnish wrote: Модуль block_id не может быть установлен на девятку, потому что не имеет её поддержки. Только восьмерка. Это написано на странице модуля

Я извиняюсь. А как же он сейчас установлен???
Я ведь в 9-ке?
И что делать? Отключать модуль?

Аватар пользователя kompospec kompospec 23 мая 2021 в 18:21

ivnish wrote: Ваш composer.json хотелось бы увидеть, а то надоело гадать на кофейной гуще

Сейчас выложу. Спасибо вам огромное за помощь.

Аватар пользователя kompospec kompospec 23 мая 2021 в 18:22
{
    "name": "drupal-composer/drupal-project",
    "description": "Project template for Drupal 9 projects with Composer",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "authors": [
        {
            "name": "",
            "role": ""
        }
    ],
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "php": ">=7.3",
        "composer/installers": "^1.9",
        "cweagans/composer-patches": "^1.7",
        "drupal/block_class": "^1.3",
        "drupal/block_id": "^1.2",
        "drupal/core-composer-scaffold": "^9.0",
        "drupal/core-recommended": "^9.0",
        "drupal/entity_clone": "^1.0@beta",
        "drupal/paragraphs": "^1.12",
        "drupal/svg_image": "^1.14",
        "drupal/twig_tweak": "^3.0",
        "drupal/webform": "^6.0",
        "drush/drush": "^10.3",
        "vlucas/phpdotenv": "^5.1",
        "webflo/drupal-finder": "^1.2"
    },
    "require-dev": {
        "drupal/core-dev": "^9.0",
        "zaporylie/composer-drupal-optimizations": "^1.2"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
                "platform-check": false,
        "discard-changes": true,
        "sort-packages": true
    },
    "autoload": {
        "classmap": [
            "scripts/composer/ScriptHandler.php"
        ],
        "files": ["load.environment.php"]
    },
    "scripts": {
        "pre-install-cmd": [
            "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
        ],
        "pre-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
        ],
        "post-install-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
        ],
        "post-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
        ]
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": ["type:drupal-core"],
            "web/libraries/{$name}": ["type:drupal-library"],
            "web/modules/contrib/{$name}": ["type:drupal-module"],
            "web/profiles/contrib/{$name}": ["type:drupal-profile"],
            "web/themes/contrib/{$name}": ["type:drupal-theme"],
            "drush/Commands/contrib/{$name}": ["type:drupal-drush"]
        },
        "composer-exit-on-patch-failure": true,
        "patchLevel": {
            "drupal/core": "-p2"
        },
        "patches": {
        }
    }
}
Аватар пользователя misterpronin misterpronin 23 мая 2021 в 19:11

Обновил Drupal 9 командой "composer update drupal/core "drupal/core-*" --with-all-dependencies".
Затем решил обновить модули. После команды "composer update" сайт перестал работать. Пришлось восстановить из бекапа.