20

I have previously installed mews/purifier package and it was working fine. Now I want to update packages using composer update, this is where I get this error:

 [RuntimeException]                                                                             
  Could not load package mews/purifier in http://repo.packagist.org: [UnexpectedValueException]  
   Could not parse version constraint ~4.*: Invalid version string "~4.*"

I already checked the package list and it has this package https://packagist.org/packages/mews/purifier

I tried to remove it from composer.json by removing this line:

"mews/purifier": "^3.2",

But the error persists. I also removed associated lines in the app.php file.

'providers' => [
Mews\Purifier\PurifierServiceProvider::class
],
'aliases' => [
'Purifier' => Mews\Purifier\Facades\Purifier::class
]

I really don't know what the problem is here. It all began when I wanted to install a package and I realized this issue.

0

1 Answer 1

35

Using this command solved the problem:

composer self-update

or if you don't have the permission:

sudo composer self-update
1
  • 2
    I had the same issue. This answer helped me. You get my upvote. Thanks. Sep 14, 2020 at 12:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.