Answers.Body: <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-31T18:13:11.373Z
Answers.LastActivityDate: 2020-10-31T18:13:11.373Z
Answers.UserDisplayName: ErikH - CiviCooP
Answers.Body: <p><strong>UPDATE 2</strong>: The PR was merged so now the latest civix phar download supports php 7.4 (insert emoji yay! here)</p>
  <hr />
  <p><strong>UPDATE</strong>: PR submitted to update civix to update its version of cv: <a href="https://github.com/totten/civix/pull/200" rel="nofollow noreferrer">https://github.com/totten/civix/pull/200</a></p>
  <hr />
  <p>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.</p>
  <p>i.e. <a href="https://github.com/civicrm/cv/commit/018c667429653ca06bc1dff6a93fdec87d9171bc" rel="nofollow noreferrer">https://github.com/civicrm/cv/commit/018c667429653ca06bc1dff6a93fdec87d9171bc</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-31T18:07:59.717Z
Answers.Text: Hmm I think I have the latest, if I do civix --version I get: civix version v20.09.0-5-g68860ca
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-31T18:14:30.757Z
Answers.Text: 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.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-30T18:35:44.173Z
Answers.LastActivityDate: 2021-04-23T04:21:47.263Z
Answers.LastEditDate: 2021-04-23T04:21:47.263Z
Answers.UserDisplayName: Demerit
Body: <p>Getting this error when using civix to generate a module or an entity:</p>
  <pre><code>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
  </code></pre>
  <p>Can anyone explain what could be causing this and what I could do?</p>
  
Tags: <civix>
Title: Getting error when using civix generate:module or civix generate:entity curly braces no longer supported in phar
ThreadText: # Getting error when using civix generate:module or civix generate:entity curly braces no longer supported in phar
  
  (Asked by: username_0 on 2020-10-30)
  
  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?
  
  **Tags:** civix
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2020-10-31. Score: 1
  
  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.
  
  
  ---
  
  ### Answer by username_1 on 2020-10-30. Score: 1
  
  **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>
  
  > **Comments:**
  > **username_0**: Hmm I think I have the latest, if I do civix --version I get: civix version v20.09.0-5-g68860ca  
  > **username_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.  
  
  ---
  
  