Error while installing composer libs


I am getting the following error while trying to install composer for device detection.

php composer.phar install --no-dev
You are running composer with xdebug enabled. This has a major impact on runtime performance. See Troubleshooting - Composer

Fatal error: Class undefined: HH\Iterator\FileTypeFilterIterator in phar://composer.phar/bin/…/src/…/vendor/symfony/finder/Finder.php on line 211

did you tried?
composer --selfupgrade