diff --git a/src/Composer/Command/RequireCommand.php b/src/Composer/Command/RequireCommand.php
index 5b4e1e3decef..6ce7a0c69a16 100644
--- a/src/Composer/Command/RequireCommand.php
+++ b/src/Composer/Command/RequireCommand.php
@@ -173,8 +173,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
/**
* @see https://github.com/composer/composer/pull/8313#issuecomment-532637955
*/
- if ($packageType !== 'project') {
- $io->writeError('The "--fixed" option is only allowed for packages with a "project" type to prevent possible misuses.');
+ if ($packageType !== 'project' && !$input->getOption('dev')) {
+ $io->writeError('The "--fixed" option is only allowed for packages with a "project" type or for dev dependencies to prevent possible misuses.');
if (!isset($config['type'])) {
$io->writeError('If your package is not a library, you can explicitly specify the "type" by using "composer config type project".');