Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer path repositories not working #2608

Closed
RicLeP opened this issue Sep 23, 2020 · 2 comments
Closed

Composer path repositories not working #2608

RicLeP opened this issue Sep 23, 2020 · 2 comments
Labels
bug Something aint working right! laravel Issues for the Laravel Plugin

Comments

@RicLeP
Copy link
Contributor

RicLeP commented Sep 23, 2020

Tell us about your setup

What is your lando version and operating system?

v3.0.11 on Windows 10 Professional WSL2

Tell us about your .lando.yml

name: members
recipe: laravel
config:
  webroot: public

Tell us about the command you were running

Paste in a series of commands that caused the bug.

Example:

lando composer update

Tell us about the error you got

....


Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-theseer$tokenizer.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-dflydev$markdown.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-naif$paypal.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-nikaia$nova-rating-field.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-nunomaduro$collision.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-paypal$paypal-checkout-sdk.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-predis$predis.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-spatie$laravel-newsletter.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-riclep$nova-mailchimp-field.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-saumini$count.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-illuminate$auth.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-illuminate$container.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-illuminate$database.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-spatie$laravel-permission.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-illuminate$queue.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-symfony$polyfill-php54.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-symfony$polyfill-php55.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-ircmaxell$password-compat.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-staudenmeir$belongs-to-through.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-illuminate$mail.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-themsaid$laravel-mail-preview.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-league$commonmark-ext-table.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-vink$nova-cache-card.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-zoxta$nova-cloudflare-card.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-laravel$laravel.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-fruitcake$laravel-cors.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-asm89$stack-cors.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-zendframework$zend-code.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-zendframework$zend-eventmanager.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-zendframework$zend-stdlib.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-zendframework$zend-hydrator.json from cache
Reading /var/www/.composer/cache/repo/https---repo.packagist.org/provider-cweagans$composer-patches.json from cache
Resolving dependencies through SAT
Looking at all rules.
Something's changed, looking at all rules again (pass #38)
Dependency resolution completed in 16.859 seconds
    1/1:        https://codeload.github.com/briannesbitt/Carbon/legacy.zip/d9a76d8b7eb0f97cf3a82529393245212f40ba3b
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Analyzed 26860 packages to resolve dependencies
Analyzed 1415374 rules to resolve dependencies
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.001 seconds
Package operations: 0 installs, 1 update, 0 removals
Updates: nesbot/carbon:2.40.1
  - Updating nesbot/carbon (2.40.0 => 2.40.1): Reading /var/www/.composer/cache/files/nesbot/carbon/1671884d786f69640d7af45788a48098935633a1.zip from cache
Loading from cacheExecuting command (CWD): unzip -qq  '/app/vendor/nesbot/carbon/64ddd5c077b9420e37ffbc0beb6cc856' -d '/app/vendor/composer/3e2e0da1'

    REASON: laravel/framework v5.8.38 requires nesbot/carbon ^1.26.3 || ^2.0 -> satisfiable by nesbot/carbon[2.40.0, 1.26.3, 1.26.4, 1.26.5, 1.26.6, 1.27.0, 1.28.0, 1.29.0, 1.29.1, 1.29.2, 1.30.0, 1.31.0, 1.31.1, 1.32.0, 1.33.0, 1.34.0, 1.34.1, 1.34.2, 1.34.3, 1.34.4, 1.35.0, 1.35.1, 1.36.0, 1.36.1, 1.36.2, 1.37.0, 1.37.1, 1.38.0, 1.38.1, 1.38.2, 1.38.3, 1.38.4, 1.39.0, 1.39.1, 2.0.0, 2.0.0-beta.1, 2.0.0-beta.2, 2.0.0-beta.3, 2.0.0-beta.4, 2.0.0-beta.5, 2.0.0-beta.6, 2.0.1, 2.1.0, 2.1.1, 2.10.0, 2.10.1, 2.11.0, 2.12.0, 2.13.0, 2.14.0, 2.14.1, 2.14.2, 2.15.0, 2.16.0, 2.16.1, 2.16.2, 2.16.3, 2.17.0, 2.17.1, 2.18.0, 2.19.0, 2.19.1, 2.19.2, 2.2.0, 2.2.1, 2.20.0, 2.21.0, 2.21.1, 2.21.2, 2.21.3, 2.22.0, 2.22.0-beta.1, 2.22.0-beta.2, 2.22.0-beta.3, 2.22.1, 2.22.2, 2.22.3, 2.23.0, 2.23.0-beta.1, 2.23.0-beta.2, 2.23.0-beta.3, 2.23.0-beta.4, 2.23.1, 2.24.0, 2.24.0-beta.1, 2.24.0-beta.2, 2.24.0-beta.3, 2.24.0-beta.4, 2.25.0, 2.25.0-beta.1, 2.25.0-beta.2, 2.25.0-beta.3, 2.25.1, 2.25.2, 2.25.3, 2.26.0, 2.27.0, 2.28.0, 2.28.0-beta.1, 2.29.0, 2.29.1, 2.3.0, 2.3.1, 2.30.0, 2.31.0, 2.32.0, 2.32.1, 2.32.2, 2.33.0, 2.34.0, 2.34.1, 2.34.2, 2.35.0, 2.36.0, 2.36.1, 2.37.0, 2.38.0, 2.39.0, 2.39.1, 2.39.2, 2.4.0, 2.4.1, 2.40.1, 2.40.x-dev, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.6.1, 2.7.0, 2.8.0, 2.9.0, 2.9.1, 2.x-dev].

  - Marking laravel/nova (2.0.x-dev) as uninstalled, alias of laravel/nova (dev-master)
Package braintree/braintreehttp is abandoned, you should avoid using it. No replacement was suggested.
Package fourstacks/nova-repeatable-fields is abandoned, you should avoid using it. No replacement was suggested.
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package riclep/nova-mailchimp-field is abandoned, you should avoid using it. No replacement was suggested.
Reading /app/vendor/composer/installed.json
Reading ./composer.lock
Writing lock file
Generating optimized autoload files
Deprecation Notice: Class Zoxta\NovaCloudflareCard\Http\Controllers\CloudflareController located in ./vendor/zoxta/nova-cloudflare-card/src/Controllers/CloudflareController.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Stack trace:
 phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:116
 phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:355
 phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:341
 phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:264
 phar:///usr/local/bin/composer/src/Composer/Installer.php:307
 phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:163
 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
 phar:///usr/local/bin/composer/src/Composer/Console/Application.php:281
 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
 phar:///usr/local/bin/composer/src/Composer/Console/Application.php:113
 phar:///usr/local/bin/composer/bin/composer:61
 /usr/local/bin/composer:24
Deprecation Notice: Class Naif\Paypal\Http\Controllers\PayPalController located in ./vendor/naif/paypal/src/Http/Controllers/PaypalController.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Stack trace:
 phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:116
 phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:355
 phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:341
 phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:264
 phar:///usr/local/bin/composer/src/Composer/Installer.php:307
 phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:163
 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
 phar:///usr/local/bin/composer/src/Composer/Console/Application.php:281
 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
 phar:///usr/local/bin/composer/src/Composer/Console/Application.php:113
 phar:///usr/local/bin/composer/bin/composer:61
 /usr/local/bin/composer:24
> post-autoload-dump: Illuminate\Foundation\ComposerScripts::postAutoloadDump
> post-autoload-dump: @php artisan package:discover
Executing command (CWD): '/usr/local/bin/php' -d allow_url_fopen='1' -d disable_functions='' -d memory_limit='-1' artisan package:discover

In ProviderRepository.php line 208:

  Class 'Jscca\BookDinner\ToolServiceProvider' not found


Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
lando 09:58:19 DEBUG ==> process pid2 finished with exit code 1
lando 09:58:19 DEBUG ==> engine is up.
lando 09:58:19 VERBOSE ==> reporting error action to report=true, url=https://metrics.lando.dev, report=true, url=https://metrics.lando.dev
lando 09:58:19 DEBUG ==> reported data command=lando composer,update, context=local, devMode=false, instance=dd548a96fc08f395a4550cb4a96d0a793c6d80e6, nodeVersion=v12.13.1, mode=cli, type=Windows_NT, platform=win32, release=10.0.20215, arch=x64, product=lando, version=3.0.11, message=Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1, stack=Error: Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
    at C:\snapshot\lando\build\cli\lib\shell.js
From previous event:
    at Shell.sh (shell.js)
    at Object.dockerExec (utils.js)
    at C:\snapshot\lando\build\cli\plugins\lando-tooling\lib\build.js
From previous event:
    at Object.run (build.js)
From previous event:
    at C:\snapshot\lando\build\cli\lib\bootstrap.js
From previous event:
    at C:\snapshot\lando\build\cli\lib\cli.js
From previous event:
    at Object.handler (cli.js)
    at Object.runCommand (command.js:238:44)
    at Object.parseArgs [as _parseArgs] (yargs.js:1063:30)
    at Function.get [as argv] (yargs.js:1004:21)
    at Cli.init (cli.js)
    at Cli.run (cli.js)
    at Object.<anonymous> (lando.js)
    at Module._compile (pkg/prelude/bootstrap.js:1324:22)
    at Function.Module.runMain (pkg/prelude/bootstrap.js:1379:12)
    at internal/main/run_main_module.js:17:11, action=error, created=2020-09-23T08:58:19.598Z

Tell us generally about your bug

I tried running a Laravel project in Lando (I think it used to work with Lando). The project has not been touched for a while but a change was required. When doing a composer update it failed to find certain files. It seems all the files it can’t find are those from composer path repositories.

In ProviderRepository.php line 208:

Class 'Jscca\BookDinner\ToolServiceProvider' not found

....
       {
            "type": "path",
            "url": "./nova-components/Theme"
        },
        {
            "type": "path",
            "url": "./nova-components/BookEvent"
        },
        {
            "type": "path",
            "url": "./nova-components/BookDinner"
        }
...

The project uses Laravel Nova with custom fields and cards created using the Artisan CLI. These should be regular path repos and use Laravel’s auto registration within each packages composer.json.

All the path repos sit in the the root of the app in a nova-components folder.

{
    "name": "jscca/book-dinner",
    "description": "A Laravel Nova tool.",
    "keywords": [
        "laravel",
        "nova"
    ],
    "license": "MIT",
    "require": {
        "php": ">=7.1.0"
    },
    "autoload": {
        "psr-4": {
            "Jscca\\BookDinner\\": "src/"
        }
    },
    "extra": {
        "laravel": {
            "providers": [
                "Jscca\\BookDinner\\ToolServiceProvider"
            ]
        }
    },
    "config": {
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}
@RicLeP RicLeP added the bug Something aint working right! label Sep 23, 2020
@pirog pirog added this to Catch All in External Plugins Dec 28, 2020
@pirog pirog moved this from Other to PHP-y in External Plugins Dec 28, 2020
@stale
Copy link

stale bot commented Apr 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

@stale stale bot added the stale Issue has been auto-flagged as stale label Apr 27, 2021
@stale stale bot removed the stale Issue has been auto-flagged as stale label Nov 23, 2021
@reynoldsalec reynoldsalec added the laravel Issues for the Laravel Plugin label Nov 23, 2021
@reynoldsalec
Copy link
Sponsor Member

OP should feel free to reopen or to join the Lando Slack for more help: https://launchpass.com/devwithlando

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something aint working right! laravel Issues for the Laravel Plugin
Projects
External Plugins
PHP Recipes or Services
Development

No branches or pull requests

2 participants