contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
85 stars 33 forks source link

Composer findet Pfad nicht bei lokalen repositories in vendor/vendorname/bundlename #634

Closed markocupic closed 2 years ago

markocupic commented 3 years ago

Hallo Beim Versuch mit dem Manager ein lokales Bundle zu installieren (composer.json: repositories->path), kommt es zu folgender Fehlermeldung. Die Fehlermeldung tritt nur im Manager auf. Ein php composer update, ausgeführt auf der Konsole, läuft sauber ohne Fehler durch.

> Resolving dependencies using Composer Cloud v3.0.0
!!! Current server is sponsored by: Contao Association !!!
[7.7MiB/0.24s] Loading composer repositories with package information
[8.1MiB/1.65s] [8.1MiB/2.08s] 
An error occurred during resolving process:
The `url` supplied for the path (vendor/markocupic/contao-test-bundle) repository does not exist`

root composer.json:

{
    "type": "project",
    "require": {
        "contao/calendar-bundle": "4.10.*",
        "contao/comments-bundle": "4.10.*",
        "contao/conflicts": "*@dev",
        "contao/faq-bundle": "4.10.*",
        "contao/listing-bundle": "4.10.*",
        "contao/manager-bundle": "4.10.*",
        "contao/news-bundle": "4.10.*",
        "contao/newsletter-bundle": "4.10.*",
        "markocupic/contao-test-bundle": "1.0"
    },
    "extra": {
        "contao-component-dir": "assets"
    },
    "scripts": {
        "post-install-cmd": [
            "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
        ],
        "post-update-cmd": [
            "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
        ]
    },
    "repositories": [
        {
            "type": "path",
            "url": "vendor/markocupic/contao-test-bundle"
        }
    ]
}

Auszug composer.json des zu installierenden Bundles:

{
    "name": "markocupic/contao-test-bundle",
    "description": "*****",
    "keywords": [
        //
    ],
    "type": "contao-bundle",
    "license": "GPL-3.0-or-later",
    "authors": [
        {
           //
        }
    ],
    "support": {
        "issues": "https://github.com/markocupic/contao-test-bundle/issues",
        "source": "https://github.com/markocupic/contao-test-bundle"
    },
    "version": "1.0",
    "require": {
        "contao/core-bundle": "^4.9"
    },
    "autoload": {
        "psr-4": {
            "Markocupic\\ContaoTestBundle\\": "src/"
        },
        "classmap": [
            "src/Resources/contao"
        ],
        "exclude-from-classmap": [
            "src/Resources/contao/config",
            "src/Resources/contao/dca",
            "src/Resources/contao/languages",
            "src/Resources/contao/templates"
        ]
    },
    "extra": {
        "contao-manager-plugin": "Markocupic\\ContaoTestBundle\\ContaoManager\\Plugin"
    }
}
fritzmg commented 3 years ago

May be repository paths that point to vendor/ aren't supported. Presumably the path you defined (vendor/markocupic/contao-test-bundle) is already the path that composer would install the package to. This is fine for initial development of a bundle but probably not recommended for a productive setup.

markocupic commented 3 years ago

Hi Fritz Development would be the usecase. ;-) See the dev documentation: https://docs.contao.org/dev/getting-started/extension/#installation

"When running a composer update, Composer will now symlink the given path into the vendor directory of the Contao 4 installation and everything is ready to go. You can now continue developing within vendor/somevendor/contao-example-bundle."

fritzmg commented 3 years ago

Yes, it should work when you use composer and not the Cloud Resolver via the Contao Manager.

markocupic commented 3 years ago

Yes, I noticed that too.

aschempp commented 2 years ago

I wonder if this is actually a cloud issue @Toflar? Since we convert the repository paths, maybe the cloud cannot have a dependency in /vendor?

Toflar commented 2 years ago

There's a lot of maybes in this world. If you can provide a log of what exactly is sent to the cloud, we can start reproducing and find the bug (if any).

aschempp commented 2 years ago

Here's the JSON I get when adding the package locally and retrieving the cloud data: 2022-03-04T091654.200.json.txt

markocupic commented 2 years ago

I tested this again with Contao Manager in version 1.5.0 and Contao 4.13. The problem no longer occurs.

I'm sorry that I'm only realizing it now. Thanks to Composer's speed update, I was no longer dependent on the Contao Manager.