Skip to content
Snippets Groups Projects
Commit c565ab36 authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3274273: Fix deprecation errors on PHP 8.1

parent 42ad7d56
No related branches found
No related tags found
1 merge request!259Issue #3274273: fix core 8.1 deprecation errors
......@@ -114,7 +114,7 @@ class ExcludedPathsSubscriber implements EventSubscriberInterface {
foreach ($paths as $path) {
// Make absolute paths relative to the project root.
$path = str_replace($project_root, NULL, $path);
$path = str_replace($project_root, '', $path);
$path = ltrim($path, '/');
$event->excludePath($path);
}
......
......@@ -60,7 +60,7 @@ class PathLocator {
* project root and Drupal root are the same.
*/
public function getWebRoot(): string {
$web_root = str_replace($this->getProjectRoot(), NULL, $this->appRoot);
$web_root = str_replace($this->getProjectRoot(), '', $this->appRoot);
return trim($web_root, DIRECTORY_SEPARATOR);
}
......
......@@ -170,7 +170,7 @@ class CoreUpdateTest extends UpdateTestBase {
$workspace_dir = $this->getWorkspaceDirectory();
// Loop through core's metapackages and plugins, and alter them as needed.
$packages = str_replace("$workspace_dir/", NULL, $this->getCorePackages());
$packages = str_replace("$workspace_dir/", '', $this->getCorePackages());
foreach ($packages as $path) {
// Assign the new upstream version.
$this->runComposer("composer config version $version", $path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment