Skip to content

Commit

Permalink
ACMS-1896: fix drs deprectaion.
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakmishra2 committed Jan 2, 2024
1 parent 9ab9562 commit d893074
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
"issues": "https://github.com/acquia/drupal-recommended-settings/issues",
"docs": "https://docs.acquia.com/drupal-recommended-settings/"
},
"repositories": {
"acquia_global_commands": {
"type": "vcs",
"url": "[email protected]:vishalkhode1/acquia_global_commands.git"
}
},
"require": {
"php": ">=8.1",
"composer-plugin-api": "^2",
Expand Down
24 changes: 22 additions & 2 deletions settings/site/default.local.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,29 @@
* or runtime) on development machines and to 0 in production.
*
* @see https://wiki.php.net/rfc/expectations
*
* If you are using php 8.3 and above assertions options
* usage is deprecated.
* @see https://www.drupal.org/node/3391611
*
* if you are using php 8.3 and less
* Drupal\Component\Assertion\Handle is deprecated.
* @see https://www.drupal.org/node/3105918
*/
assert_options(ASSERT_ACTIVE, TRUE);
Handle::register();
// Assertions options usage is deprecated in PHP 8.3 and Drupal 10.2.0
if(phpversion() >= 8.3 && \Drupal::VERSION >= 10.2) {
ini_set('zend.assertions', 1);
}
else {
assert_options(ASSERT_ACTIVE, TRUE);
// Handle is deprecated in Drupal 10.1.0
if(\Drupal::VERSION >= 10.1) {
assert_options(ASSERT_EXCEPTION, TRUE);
}
else {
Handle::register();
}
}

/**
* Show all error messages, with backtrace information.
Expand Down

0 comments on commit d893074

Please sign in to comment.