If you are getting error like this PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes),

You will have to increase memory limit PHP can use. This can be done at php.ini

  1. Open you php.ini file
  2. Find setting memory_limit=128M
  3. Increase the memory limit until this issue is resolved.

If you are getting this error while running composer require command, try running composer require with additional flag like this

COMPOSER_MEMORY_LIMIT=-1 composer require vendor/package