Skip to content

Commit

Permalink
Merge pull request #1754 from hydephp/remove-global-unslash-function
Browse files Browse the repository at this point in the history
[2.x] Remove the deprecated global `unslash` function
  • Loading branch information
caendesilva authored Jun 28, 2024
2 parents f6f6c05 + 8a1e57f commit 5e0836d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
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
- 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

0 comments on commit 5e0836d

Please sign in to comment.