Answers.Body: <p>The <code>{$var}</code> thing is fixed in civi 5.71 but is unimportant. The important line is <code>Your Composer dependencies require a PHP version &quot;&gt;= 8.2.0&quot;. You are running 8.1.27</code></p>
  <p>You have something in your composer.json or installed that requires php 8.2 but you're using 8.1.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-08T22:20:12.373Z
Answers.Text: thanks for your answer. But to my regret I asked the question with a wrong place of the log parts.
  The site is running with PHP 8.2.15, using that version i get those deprecation errors. As a workarround I've tried to run the cron task against a lower PHP version. But this result in the Compose-PHP version mismatch. I edited my text to ask the question more correctly. best regards
Answers.UserDisplayName: Paul Van Leemput
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-10T06:34:28.780Z
Answers.Text: I don't think anything's changed though. The `$var` warning isn't important. Your install was based on 8.2, so it requires 8.2. Either remove the vendor folder and composer.lock and re-run `composer install` using 8.1 (not recommended), or if you don't like the log warnings then in php.ini change `error_reporting` to `error_reporting = 1`, or try `composer update pear/db:'~1.12.1'`.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-08T13:55:01.373Z
Answers.LastActivityDate: 2024-02-08T13:55:01.373Z
Answers.UserDisplayName: Demerit
Body: <p>on our staging environment we upgraded to
  Drupal 10.2.0 - CiviCRM 5.69.4 - PHP 8.2.15</p>
  <p>On the Plesk server for the domain there is a scheduled (cron) job created as:
  script path = httpdocs/vendor/bin/cv
  arguments = api job.execute --user=cronuser --cwd=/var/www/vhosts/staging.*<strong>.</strong>/httpdocs --quiet
  Use PHP version = 8.2.15
  on run we got errors in website logging:</p>
  <blockquote>
  <p>mod_fcgid: stderr: PHP Deprecated: Using ${var} in strings is
  deprecated, use {$var} instead in
  /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line
  474, referer: <a href="https://staging.x.x/admin/reports/status" rel="nofollow noreferrer">https://staging.x.x/admin/reports/status</a>    Apache
  error mod_fcgid: stderr: PHP Deprecated: Using ${var} in strings is
  deprecated, use {$var} instead in
  /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line
  547, referer: <a href="https://staging.x.x/admin/reports/status" rel="nofollow noreferrer">https://staging.x.x/admin/reports/status</a>    Apache
  error mod_fcgid: stderr: PHP Deprecated: Using ${var} in strings is
  deprecated, use {$var} instead in
  /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line
  549, referer: <a href="https://staging.x.x/admin/reports/status" rel="nofollow noreferrer">https://staging.x.x/admin/reports/status</a>    Apache
  error mod_fcgid: stderr: PHP Deprecated: Using ${var} in strings is
  deprecated, use {$var} instead in
  /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line
  552, referer: <a href="https://staging.x.x/admin/reports/status" rel="nofollow noreferrer">https://staging.x.x/admin/reports/status</a>    Apache
  error</p>
  </blockquote>
  <p>As a workarround I tried decreasing the Jobs PHP version to 8.1.27, but this results in:
  PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version &quot;&gt;= 8.2.0&quot;</p>
  <p>Task &quot;httpdocs/vendor/bin/cv&quot; completed with error in 0 seconds, output:</p>
  <blockquote>
  <p>PHP Fatal error: Composer detected issues in your platform: Your
  Composer dependencies require a PHP version &quot;&gt;= 8.2.0&quot;. You are
  running 8.1.27. in
  /var/www/vhosts/staging.x.x/httpdocs/vendor/composer/platform_check.php
  on line 28 Fatal error: Composer detected issues in your platform:
  Your Composer dependencies require a PHP version &quot;&gt;= 8.2.0&quot;. You are
  running 8.1.27. in
  /var/www/vhosts/staging.x.x/httpdocs/vendor/composer/platform_check.php
  on line 28</p>
  </blockquote>
  
Tags: <drupal><cron-job><php8><deprecated>
Title: cron breaks after upgrade 5.69.4 - php 8.2 (deprecated for ${var} in dp.php)
ThreadText: # cron breaks after upgrade 5.69.4 - php 8.2 (deprecated for ${var} in dp.php)
  
  (Asked by: username_0 on 2024-02-08)
  
  on our staging environment we upgraded to
  Drupal 10.2.0 - CiviCRM 5.69.4 - PHP 8.2.15
  
  On the Plesk server for the domain there is a scheduled (cron) job created as:
  script path = httpdocs/vendor/bin/cv
  arguments = api job.execute --user=cronuser --cwd=/var/www/vhosts/staging.\***.**/httpdocs --quiet
  Use PHP version = 8.2.15
  on run we got errors in website logging:
  
  > mod\_fcgid: stderr: PHP Deprecated: Using ${var} in strings is
  > deprecated, use {$var} instead in
  > /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line
  > 474, referer: <https://staging.x.x/admin/reports/status> Apache
  > error mod\_fcgid: stderr: PHP Deprecated: Using ${var} in strings is
  > deprecated, use {$var} instead in
  > /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line
  > 547, referer: <https://staging.x.x/admin/reports/status> Apache
  > error mod\_fcgid: stderr: PHP Deprecated: Using ${var} in strings is
  > deprecated, use {$var} instead in
  > /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line
  > 549, referer: <https://staging.x.x/admin/reports/status> Apache
  > error mod\_fcgid: stderr: PHP Deprecated: Using ${var} in strings is
  > deprecated, use {$var} instead in
  > /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line
  > 552, referer: <https://staging.x.x/admin/reports/status> Apache
  > error
  
  As a workarround I tried decreasing the Jobs PHP version to 8.1.27, but this results in:
  PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0"
  
  Task "httpdocs/vendor/bin/cv" completed with error in 0 seconds, output:
  
  > PHP Fatal error: Composer detected issues in your platform: Your
  > Composer dependencies require a PHP version ">= 8.2.0". You are
  > running 8.1.27. in
  > /var/www/vhosts/staging.x.x/httpdocs/vendor/composer/platform\_check.php
  > on line 28 Fatal error: Composer detected issues in your platform:
  > Your Composer dependencies require a PHP version ">= 8.2.0". You are
  > running 8.1.27. in
  > /var/www/vhosts/staging.x.x/httpdocs/vendor/composer/platform\_check.php
  > on line 28
  
  **Tags:** drupal, cron-job, php8, deprecated
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-02-08. Score: 2
  
  The `{$var}` thing is fixed in civi 5.71 but is unimportant. The important line is `Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.27`
  
  You have something in your composer.json or installed that requires php 8.2 but you're using 8.1.
  
  > **Comments:**
  > **username_0**: thanks for your answer. But to my regret I asked the question with a wrong place of the log parts. The site is running with PHP 8.2.15, using that version i get those deprecation errors. As a workarround I've tried to run the cron task against a lower PHP version. But this result in the Compose-PHP version mismatch. I edited my text to ask the question more correctly. best regards  
  > **username_1**: I don't think anything's changed though. The `$var` warning isn't important. Your install was based on 8.2, so it requires 8.2. Either remove the vendor folder and composer.lock and re-run `composer install` using 8.1 (not recommended), or if you don't like the log warnings then in php.ini change `error_reporting` to `error_reporting = 1`, or try `composer update pear/db:'~1.12.1'`.  
  
  ---
  
  