How to install gettext extension for php on Heroku?
Firstly you need to use the ext- prefix to apply extensions.
{ "require": { "ext-gettext": "*" }, "require-dev": { "heroku/heroku-buildpack-php": "*" }}
Run composer update
If you still get error it means composer cannot update your vendor files for gettext. I had same issue and think it's a composer problem.
For true parity you should try and obtain the the lib required but you could just ignore the lack of a local gettext with:
composer update --ignore-platform-reqs
Composer will then run without error and you can then push that up to Heroku.Heroku will then build PHP with gettext enabled.