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

Change case of name in composer.json #1824

Merged
merged 1 commit into from
Mar 24, 2019

Conversation

charlieartist
Copy link
Contributor

I'm looking to add Prism to a Drupal 8 project via Composer. In setting up a Packagist repository off master, I was hit with errors, since the name of the project in composer.json must be lowercase. I changed this line from: "name": "PrismJS/prism", to "name": "prismjs/prism",.

@RunDevelopment
Copy link
Member

RunDevelopment commented Mar 22, 2019

[...], since the name of the project in composer.json must be lowercase.

According to the docs, the package name "can contain any character, including white spaces, and it's case insensitive". Though, it is recommended to use lowercase names.

Point is, our current configuration should be perfectly valid, so I don't get why it doesn't work on your side.

Anyway, because the names are supposed to be case insensitive, it shouldn't be a problem to change it.
I'm not a PHP dev, so I definitely want a second opinion for this.

/cc @mAAdhaTTah

@charlieartist
Copy link
Contributor Author

charlieartist commented Mar 22, 2019

@RunDevelopment This isn't per Composer, but per Packagist.

Listed here:

Note that package names are case-insensitive, but it's encouraged to use a dash (-) as separator instead of CamelCased names.

Packagist_Message

When I attempted to add the repository to Packagist, I was blocked because of the naming.

@RunDevelopment
Copy link
Member

So package names are case-insensitive and can only contain lowercase characters.
Then what does case-insensitive even mean here? After all, it's meaningless to say that you don't care about the case when only one case is allowed...

Can we really change the package name without breaking the dependencies of people who are using the current name?

@charlieartist
Copy link
Contributor Author

@RunDevelopment I would agree. It is mystifying why it is listed as such. Ideally, Packagist would get it together. Now, I did check other Composer packages, and those all had lowercase names.

Copy link
Member

@mAAdhaTTah mAAdhaTTah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If PrismJS isn't currently in Packagist, then we're not likely to break too many people by fixing the package name. The people we'd break would have to setup Prism from as a vcs respository. That group would have a pretty minor change in their composer.json and I'm presuming have enough knowledge to fix it, if it breaks at all (Composer does say it should be case insensitive, even if Packagist doesn't agree).

I'm ok with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants