Answers.Body: <p>There was a problem with <code>cli.php</code> and <code>cv</code> in 5.57.0 on Joomla.  That is fixed in 5.57.1 just released.</p>
  <p>For php versions, see the notes at <a href="https://docs.civicrm.org/installation/en/latest/general/requirements/#php" rel="nofollow noreferrer">https://docs.civicrm.org/installation/en/latest/general/requirements/#php</a>  You're probably better sticking with 7.4 for now.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-13T14:02:37.407Z
Answers.Text: I upgraded to 5.57.1 and I get these warnings:
  WARNING: Class Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
  Same for classes:
   Civi\Api4\Event\Subscriber\ContributionPreSaveSubscriber was...
   Civi\Api4\Event\Subscriber\CustomGroupPreCreationSubscriber was ...
   Class Civi\Api4\Event\Subscriber\OptionValuePreCreationSubscriber was ...
  PHP Deprecated:  Non-static method JApplication::getMenu() should not be called statically in .../civicrm.php on line 305
Answers.UserDisplayName: Francesco Potortì
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-13T15:07:39.213Z
Answers.Text: Are you on J4?  I don't think that's officially [supported](https://docs.civicrm.org/installation/en/latest/general/requirements/#joomla) yet although work has gone into making it work.  Do log those warnings at https://lab.civicrm.org/dev/joomla/-/issues
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-14T12:56:34.980Z
Answers.Text: No, it's J3. I posted a bug report at https://lab.civicrm.org/dev/joomla/-/issues/44
Answers.UserDisplayName: Francesco Potortì
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-12T14:07:10.910Z
Answers.LastActivityDate: 2023-01-12T14:07:10.910Z
Answers.UserDisplayName: Aidan
Body: <p>This happens on Civicrm for Joomla. It prevents both upgrading to Php 8 and upgrading to latest Civicrm, as doing any of these stops the cron job.</p>
  <p>This is what I see with Civicrm 5.49.3:</p>
  <pre><code>$ php74 domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php -s figg.org -u cronjob -p DeveFarl0 -e Job -a execute
  PHP Deprecated:  Non-static method JApplication::getMenu() should not be called statically in /home/usiako1s/domains/figg.org/public_html/plugins/authentication/civicrm/civicrm.php on line 305
  
  $ php81 domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php --help
  PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /home/usiako1s/domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php on line 265
  </code></pre>
  <p>Using the latest Civicrm, the first example (with php74) generates the string &quot;Error&quot;, and I was not able to pinpoint where it fails (I don't speak Php).</p>
  
Tags: <cron><php8>
Title: Cron: cli.php does not work in the latest Civicrm
ThreadText: # Cron: cli.php does not work in the latest Civicrm
  
  (Asked by: username_0 on 2023-01-11)
  
  This happens on Civicrm for Joomla. It prevents both upgrading to Php 8 and upgrading to latest Civicrm, as doing any of these stops the cron job.
  
  This is what I see with Civicrm 5.49.3:
  
  ```
  $ php74 domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php -s figg.org -u cronjob -p DeveFarl0 -e Job -a execute
  PHP Deprecated:  Non-static method JApplication::getMenu() should not be called statically in /home/usiako1s/domains/figg.org/public_html/plugins/authentication/civicrm/civicrm.php on line 305
  
  $ php81 domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php --help
  PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /home/usiako1s/domains/figg.org/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php on line 265
  
  ```
  
  Using the latest Civicrm, the first example (with php74) generates the string "Error", and I was not able to pinpoint where it fails (I don't speak Php).
  
  **Tags:** cron, php8
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-01-12. Score: 1 | Accepted answer
  
  There was a problem with `cli.php` and `cv` in 5.57.0 on Joomla. That is fixed in 5.57.1 just released.
  
  For php versions, see the notes at <https://docs.civicrm.org/installation/en/latest/general/requirements/#php> You're probably better sticking with 7.4 for now.
  
  > **Comments:**
  > **username_0**: I upgraded to 5.57.1 and I get these warnings: WARNING: Class Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name. Same for classes:  Civi\Api4\Event\Subscriber\ContributionPreSaveSubscriber was...  Civi\Api4\Event\Subscriber\CustomGroupPreCreationSubscriber was ...  Class Civi\Api4\Event\Subscriber\OptionValuePreCreationSubscriber was ... PHP Deprecated:  Non-static method JApplication::getMenu() should not be called statically in .../civicrm.php on line 305  
  > **username_1**: Are you on J4?  I don't think that's officially [supported](https://docs.civicrm.org/installation/en/latest/general/requirements/#joomla) yet although work has gone into making it work.  Do log those warnings at https://lab.civicrm.org/dev/joomla/-/issues  
  > **username_0**: No, it's J3. I posted a bug report at https://lab.civicrm.org/dev/joomla/-/issues/44  
  
  ---
  
  