Add "testing" keyword to composer.json#48
Merged
michalbundyra merged 1 commit intophp-mock:masterfrom Jun 12, 2023
Merged
Conversation
A colleague recently made a mistake a required one of the packages from php-mock/ as a non-dev dependency. Since composer is checking for a couple of keywords and suggests to install them as dev dependency then, I suggest to add "testing" here to trigger that feature and avoid the mistake my colleague did :) See https://github.com/composer/composer/blob/2.5.8/src/Composer/Command/RequireCommand.php#L235 If you like this, I would just add the same to all other packages too. WDYT?
Member
|
@herndlm that's great, let's do it also in other repos. Thanks a lot! BTW It is also mentioned in the composer docs :) - just for ref: https://getcomposer.org/doc/04-schema.md#keywords |
michalbundyra
added a commit
to php-mock/php-mock-mockery
that referenced
this pull request
Jun 13, 2023
michalbundyra
added a commit
to php-mock/php-mock-phpunit
that referenced
this pull request
Jun 13, 2023
michalbundyra
added a commit
to php-mock/php-mock-prophecy
that referenced
this pull request
Jun 13, 2023
michalbundyra
added a commit
to php-mock/php-mock-phpunit
that referenced
this pull request
Jun 13, 2023
michalbundyra
added a commit
to php-mock/php-mock-mockery
that referenced
this pull request
Jun 13, 2023
michalbundyra
added a commit
to php-mock/php-mock-prophecy
that referenced
this pull request
Jun 13, 2023
Contributor
Author
|
thx for adding it to the others already. also: apparently I forgot that conventional commits style is used here :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A colleague recently made a mistake and required one of the packages from php-mock/ as a non-dev dependency.
Since composer is checking for existence of a couple of specific keywords and, when found, suggests to install the package as dev dependency instead then, I suggest to add "testing" here to trigger that feature and avoid that other people make the mistake my colleague did :)
See https://github.com/composer/composer/blob/2.5.8/src/Composer/Command/RequireCommand.php#L235
If you like this, I would just add the same to all other packages too. WDYT?