Skip to content

why module:composer-update removes registered namespaces ? #2104

@ctf0

Description

@ctf0

Versions:

  • laravel-modules Version: latest
  • Laravel Version: latest
  • PHP Version: 8.4

Description:

i have my modules as

Home
├── composer.json
├── module.json
├── package.json
├── src
│   ├── app
│   │   ├── Http
│   │   │   └── Controllers
│   │   └── Providers
│   ├── resources
│   │   ├── assets
│   │   │   ├── css
│   │   │   │   └── app.css
│   │   │   └── js
│   │   │       └── app.js
│   │   └── views
│   │       └── welcome.blade.php
│   └── routes
│       └── web.php
├── tests
│   ├── Feature
│   └── Unit
└── vite.config.js

and for this to work as expected i register 2 namespaces

"autoload": {
        "psr-4": {
            "Modules\\Home\\": "src/",
            "Modules\\Home\\App\\": "src/app/"
        }
    },

but for some reason when running module:composer-update the namespaces will become

"autoload": {
        "psr-4": {
            "Modules\\Home\\": "app/"
        }
    },

which is confusing.

so why the cmnd does that ? what is the usage of that cmnd ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions