Skip to content

Commit

Permalink
Remove the @web alias check
Browse files Browse the repository at this point in the history
Resolves raftcms/cms#15739
  • Loading branch information
brandonkelly committed Sep 16, 2024
1 parent c86e8ae commit a24b916
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for Craft CMS Server Check

## 2.1.9 - 2024-09-16
- Removed check for relying on the default `@web` alias. ([craftcms/cms#15739](https://github.com/craftcms/cms/issues/15739))

## 2.1.8 - 2023-09-25
- Reverted “The `@web` alias check now checks `Craft::$aliases;` instead of `Craft::$app->getConfig()->getGeneral()->aliases;`”.

Expand Down
22 changes: 0 additions & 22 deletions server/requirements/RequirementsChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -519,28 +519,6 @@ function memoryLimitRequirement()
);
}

/**
* @return array
*/
function webAliasRequirement()
{
$aliases = Craft::$app->getConfig()->getGeneral()->aliases;
$memo = 'We recommend explicitly overriding the <a rel="noopener" target="_blank" href="https://craftcms.com/docs/4.x/config/#aliases">@web alias</a>.';
$pass = false;

if (isset($aliases['web']) || isset($aliases['@web'])) {
$memo = 'Your @web alias is set correctly';
$pass = true;
}

return array(
'name' => 'Ensure @web alias is explicitly overridden',
'mandatory' => false,
'condition' => $pass,
'memo' => $memo,
);
}

/**
* @return array
*/
Expand Down
1 change: 0 additions & 1 deletion server/requirements/requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
// Only run this requirement check if we're running in the context of Craft.
if (class_exists('Craft')) {
$requirements[] = $this->webrootRequirement();
$requirements[] = $this->webAliasRequirement();
}

$requirements = array_merge($requirements, array_filter(array(
Expand Down

0 comments on commit a24b916

Please sign in to comment.