Skip to content

Commit

Permalink
Merge pull request #1255 from hydephp/remove-deprecated-render-data-code
Browse files Browse the repository at this point in the history
Remove deprecated RenderData code
  • Loading branch information
caendesilva authored Mar 12, 2023
2 parents 10d0144 + f55e2ff commit 7b9b029
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ This serves two purposes:

### Removed
- Removed `RouteKey::normalize` method deprecated in v1.0.0-RC.2
- Removed `RenderData:.getCurrentPage` method deprecated in v1.0.0-RC.2
- Removed `RenderData:.getCurrentRoute` method deprecated in v1.0.0-RC.2

### Fixed
- for any bug fixes.
Expand Down
21 changes: 0 additions & 21 deletions packages/framework/src/Support/Models/RenderData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Facades\View;
use InvalidArgumentException;
use JetBrains\PhpStorm\Deprecated;

/**
* Contains data for the current page being rendered/compiled.
Expand Down Expand Up @@ -38,31 +37,11 @@ public function getPage(): ?HydePage
return $this->page ?? null;
}

/**
* @deprecated v1.0.0-RC.2 - Renamed to getRoute() to match renamed property. This method will be removed before version 1.0.
* @codeCoverageIgnore
*/
#[Deprecated(reason: 'Renamed to getRoute() to match renamed property. This method will be removed before version 1.0.', replacement: '%class%->getRoute()')]
public function getCurrentRoute(): ?Route
{
return $this->getRoute();
}

public function getRoute(): ?Route
{
return $this->route ?? null;
}

/**
* @deprecated v1.0.0-RC.2 - Renamed to getRouteKey() to match renamed property. This method will be removed before version 1.0.
* @codeCoverageIgnore
*/
#[Deprecated(reason: 'Renamed to getRoute() to match renamed property. This method will be removed before version 1.0.', replacement: '%class%->getRouteKey()')]
public function getCurrentPage(): ?string
{
return $this->getRouteKey();
}

public function getRouteKey(): ?string
{
return $this->routeKey ?? null;
Expand Down

0 comments on commit 7b9b029

Please sign in to comment.