nostrver-se / nostr-php

PHP helper library for Nostr https://nostr-php.dev
https://nostr-php.dev
MIT License
53 stars 15 forks source link

Have this message appearing in a new repo, after composer command #61

Closed SilberWitch closed 2 months ago

SilberWitch commented 2 months ago

Screenshot of Terminal

I went ahead and said, "Yes," but I didn't know if it was significant.

Sebastix commented 2 months ago

The latest tag / release is 1.4.0 and is not a dev release. It should be added in the dependencies section in your composer.json

https://packagist.org/packages/swentel/nostr-php

Maybe try to reinstall it?

'composer remove swentel/nostr-php' 'composer require swentel/nostr-php'

SilberWitch commented 2 months ago

Hmm. Just did that and it asked the same question, again. Check "no", this time.

Sebastix commented 2 months ago

Can I view the composer.json file?

Sebastix commented 2 months ago

Found it and learned something new here after reading https://php.watch/articles/composer-prompt-require-dev-dev-packages.

Composer inspects the keywords section of the composer.json file being installed, and if it contains dev, testing, or static analysis as keywords, Composer prompts the user to install it with --dev flag if it is not passed.

I've added some keywords in the composer.json (cc4df692d773e32425165221e7ce23779ddd5f26) and also dev there as a value, so that's why the package is handled as a dev dependency (which is not). I didn't know that.

I just fixed it in a new release 1.4.1.

SilberWitch commented 2 months ago

Thanks! That's interesting. 🤔 Need to read that, tomorrow.

SilberWitch commented 2 months ago

Okay, seems to be fixed. :heart_hands: