Skip to content

Add "testing" keyword to composer.json#48

Merged
michalbundyra merged 1 commit intophp-mock:masterfrom
herndlm:patch-1
Jun 12, 2023
Merged

Add "testing" keyword to composer.json#48
michalbundyra merged 1 commit intophp-mock:masterfrom
herndlm:patch-1

Conversation

@herndlm
Copy link
Copy Markdown
Contributor

@herndlm herndlm commented Jun 12, 2023

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?

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?
@michalbundyra
Copy link
Copy Markdown
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 michalbundyra merged commit 6240b6f into php-mock:master Jun 12, 2023
@michalbundyra michalbundyra added this to the 2.4.1 milestone Jun 12, 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-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
@herndlm herndlm deleted the patch-1 branch June 13, 2023 08:04
@herndlm
Copy link
Copy Markdown
Contributor Author

herndlm commented Jun 13, 2023

thx for adding it to the others already. also: apparently I forgot that conventional commits style is used here :)

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.

2 participants