Add "joomla/filter": "~4.0" to the require block in your composer.json and then run composer install.
{
"require": {
"joomla/filter": "~4.0"
}
}Alternatively, you can simply run the following from the command line:
composer require joomla/filter "~4.0"If you want to include the test sources, use
composer require --prefer-source joomla/filter "~4.0"Note that the Joomla\Language package is an optional dependency and is only required if the application requires the use of OutputFilter::stringURLSafe.