Getting this error when using civix to generate a module or an entity:

Fatal error: Array and string offset access syntax with curly braces is no longer supported in phar:///usr/local/bin/civix/vendor/civicrm/cv/src/BuildkitReader.php on line 38

Can anyone explain what could be causing this and what I could do?

2 Answers 2


I thought I downloaded the latest version but my local PHP was 8.0. Switched to 7.2 (which is the one my local apache is using) and it works again.


UPDATE 2: The PR was merged so now the latest civix phar download supports php 7.4 (insert emoji yay! here)

UPDATE: PR submitted to update civix to update its version of cv: https://github.com/totten/civix/pull/200

Are you on php 7.4? You have an old version of cv within your civix phar. I'd download a new copy of civix.

i.e. https://github.com/civicrm/cv/commit/018c667429653ca06bc1dff6a93fdec87d9171bc

  • Hmm I think I have the latest, if I do civix --version I get: civix version v20.09.0-5-g68860ca Oct 31, 2020 at 18:07
  • 1
    Oh I see - civix is only requiring v.2 of cv but the fix is in v.3. Civix itself needs its composer.json updated and a new download compiled.
    – Demerit
    Oct 31, 2020 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.