Skip to content

Commit

Permalink
TASK: Reintroduce methods and prefer to deprecate them :)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Nov 8, 2024
1 parent 563c8f8 commit 3b38dff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Neos.Fusion/Classes/Core/FusionSourceCodeCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ public static function tryFromFilePath(string $filePath): self
return self::fromFilePath($filePath);
}

/**
* @deprecated with Neos 9, remove me :)
*/
public static function tryFromPackageRootFusion(string $packageKey): self
{
$fusionPathAndFilename = sprintf('resource://%s/Private/Fusion/Root.fusion', $packageKey);
return self::tryFromFilePath($fusionPathAndFilename);
}

public static function empty(): self
{
return new self();
Expand Down
8 changes: 8 additions & 0 deletions Neos.Neos/Classes/Domain/Service/FusionSourceCodeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ public function createFromAutoIncludes(): FusionSourceCodeCollection
return $sourcecode;
}

/**
* @deprecated with Neos 9 - YAGNI from the start :)
*/
public function createFromSite(Site $site): FusionSourceCodeCollection
{
return FusionSourceCodeCollection::tryFromPackageRootFusion($site->getSiteResourcesPackageKey());
}

/**
* Generate Fusion prototype definitions for all node types
*
Expand Down

0 comments on commit 3b38dff

Please sign in to comment.