I was wondering why Travis is still using the default 1G memory limit while I was trying to override it.
The problem is that PHP loads custom ini files in alphabetical order, so travis.ini was loading after my memory.ini, overriding whatever I had there regarding memory_limit.
So the solution would be to prepend your custom ini files with a letter after t.
.travis.yml
before_install:
- phpenv config-add ci/x_apcu.ini