Skip to content

Commit

Permalink
ACMS-1866: Supports PHP 8.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalkhode1 committed Jun 26, 2023
1 parent 50b547e commit 2fcb11e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/Config/SettingsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
*/
class SettingsConfig extends Config {

/**
* Holds the YamlExpander class object.
*
* @var \Grasmash\YamlExpander\YamlExpander
*/
protected $expander;

/**
* Config Constructor.
*
Expand All @@ -29,7 +36,7 @@ public function __construct(array $data = []) {
* @param string $filename
* The file in which placeholders should be expanded.
*/
public function expandFileProperties($filename) {
public function expandFileProperties(string $filename) {
$expanded_contents = $this->expander->expandArrayProperties(file($filename), $this->export());
file_put_contents($filename, implode("", $expanded_contents));
}
Expand Down
9 changes: 8 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ class Plugin implements PluginInterface, EventSubscriberInterface {
*/
protected $drsIncluded;

/**
* Stores this plugin package object.
*
* @var mixed|null
*/
protected $settingsPackage;

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -104,7 +111,7 @@ public function onPostPackageEvent(PackageEvent $event) {
*/
public function onPostCmdEvent() {
// Only install the template files if acquia/drupal-recommended-settings was installed.
if (isset($this->settingsPackage)) {
if ($this->settingsPackage) {
$settings = new Settings($this->composer, $this->io, $this->settingsPackage);
$settings->hashSalt();
$settings->generateSettings();
Expand Down

0 comments on commit 2fcb11e

Please sign in to comment.