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 302c37a
Show file tree
Hide file tree
Showing 2 changed files with 27 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
23 changes: 21 additions & 2 deletions settings/site/default.local.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,27 @@
*
* @see https://wiki.php.net/rfc/expectations
*/
assert_options(ASSERT_ACTIVE, TRUE);
Handle::register();
/*
* 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
*/
if (phpversion() >= 8.3 && \Drupal::VERSION >= 10.2) {
ini_set('zend.assertions', 1);
}
else {
assert_options(ASSERT_ACTIVE, TRUE);
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 302c37a

Please sign in to comment.