Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] Remove the deprecated global unslash function #1754

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ This serves two purposes:
### Removed
- Breaking: Removed the build task `\Hyde\Framework\Actions\PostBuildTasks\GenerateSearch` (see upgrade guide below)
- Breaking: Removed the deprecated `\Hyde\Framework\Services\BuildService::transferMediaAssets()` method (see upgrade guide below)
- Internal: Removed the deprecated global`unslash()` function, replaced with the namespaced `\Hyde\unslash()` function in https://github.com/hydephp/develop/pull/1754
caendesilva marked this conversation as resolved.
Show resolved Hide resolved
- Internal: Removed the internal `DocumentationSearchPage::generate()` method as it was unused in https://github.com/hydephp/develop/pull/1569

### Fixed
Expand Down
16 changes: 0 additions & 16 deletions packages/framework/src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace {
use Hyde\Foundation\HydeKernel;
use JetBrains\PhpStorm\Deprecated;

if (! function_exists('hyde')) {
/**
Expand All @@ -16,21 +15,6 @@ function hyde(): HydeKernel
}
}

if (! function_exists('unslash')) {
/**
* Remove trailing slashes from the start and end of a string.
*
* @deprecated This function will be replaced by {@see \Hyde\unslash()} in v2.0
*
* @codeCoverageIgnore This function is deprecated and will be removed in a future release.
*/
#[Deprecated(reason: 'Replaced by the \Hyde\unslash() function', replacement: '\Hyde\unslash(%parametersList%)', since: '1.7.0')]
function unslash(string $string): string
{
return \Hyde\unslash($string);
}
}

if (defined('HYDE_COMPATIBILITY_MODE') && HYDE_COMPATIBILITY_MODE === true) {
// Don't declare these functions when running in compatibility mode.
} else {
Expand Down