Jump to content

Using a sub-namespace with composer?


NotionCommotion

Recommended Posts

I've only seen composer packages using vendor name and package name namespace.

Is it possible to use deeper namespace such as the following?

For instance, package:

{
    "name": "notioncommotion/my-sub-namespace/my-package",
    "description": "MyPackage located in MySubNamespace.",
    ...
}

is used in some project:

{
    "require": {
        "notioncommotion/my-sub-namespace/my-package": "^1.2"
    }
}

If not, what do you think were the reasons composer does not allow?

Thanks

Link to comment
Share on other sites

21 hours ago, requinix said:

It isn't a namespace. It's a vendor name plus a slash plus a project name.

Bad terminology on my side, but ultimately it maps to a namespace.  And it seems that sometimes it is a vendor name +/+ project name and other times it is a vendor's project name +/+ sub-project.  For instance, react used with react/http-client and react/http seems to be more of a project or library than a vendor name.  Don't know where I am going with this, and guess it doesn't matter...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.