Skip to content

Commit 26db09c

Browse files
authored
Merge pull request #1883 from hydephp/remove-deprecated-method
[2.x] Remove deprecated method `FeaturedImage::isRemote()`
2 parents da5ef06 + 5867369 commit 26db09c

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

RELEASE_NOTES.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ This serves two purposes:
6262
- Removed the deprecated `BaseUrlNotSetException` class, with the `Hyde::url()` helper now returning `null` if no base URL is set in https://github.com/hydephp/develop/pull/1760
6363
- Removed: The deprecated `PostAuthor::getName()` method is now removed (use `$author->name`) in https://github.com/hydephp/develop/pull/1782
6464
- Internal: Removed the internal `DocumentationSearchPage::generate()` method as it was unused in https://github.com/hydephp/develop/pull/1569
65+
- Removed the deprecated `FeaturedImage::isRemote()` method in https://github.com/hydephp/develop/pull/1883. Use `Hyperlinks::isRemote()` instead.
6566

6667
### Fixed
6768
- Added missing collection key types in Hyde facade method annotations in https://github.com/hydephp/develop/pull/1784
@@ -342,6 +343,26 @@ For example, an empty or malformed JSON file will now throw an exception like th
342343
In order to normalize the thrown exceptions, we now rethrow the `ParseException` from `Symfony/Yaml` as our custom `ParseException` to match the JSON and Markdown validation.
343344
Additionally, an exception will be thrown if a data file is empty, as this is unlikely to be intentional. Markdown files can have an empty body if front matter is present.
344345

346+
### Removal of `FeaturedImage::isRemote()` method
347+
348+
The `FeaturedImage::isRemote()` method has been removed in v2.0. This method was deprecated in v1.8.0 and has now been completely removed.
349+
350+
#### Upgrade guide
351+
352+
If you were using `FeaturedImage::isRemote()` in your code, you should replace it with `Hyperlinks::isRemote()`. Here's how to update your code:
353+
354+
```php
355+
// Old code
356+
FeaturedImage::isRemote($source);
357+
358+
// New code
359+
use Hyde\Foundation\Kernel\Hyperlinks;
360+
361+
Hyperlinks::isRemote($source);
362+
```
363+
364+
This change was implemented in https://github.com/hydephp/develop/pull/1883. Make sure to update any instances of `FeaturedImage::isRemote()` in your codebase to ensure compatibility with HydePHP v2.0.
365+
345366
## New features
346367

347368
<!-- Editors note: Todo: Maybe move to the relevant docs... -->

packages/framework/src/Framework/Features/Blogging/Models/FeaturedImage.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Hyde\Facades\Config;
1010
use Illuminate\Support\Str;
1111
use Hyde\Support\BuildWarnings;
12-
use JetBrains\PhpStorm\Deprecated;
1312
use Illuminate\Support\Facades\Http;
1413
use Hyde\Foundation\Kernel\Hyperlinks;
1514
use Hyde\Framework\Exceptions\FileNotFoundException;
@@ -241,15 +240,4 @@ protected function getContentLengthForRemoteImage(): int
241240

242241
return 0;
243242
}
244-
245-
/**
246-
* @codeCoverageIgnore Deprecated method.
247-
*
248-
* @deprecated This method will be removed in v2.0. Please use `Hyperlinks::isRemote` instead.
249-
*/
250-
#[Deprecated(reason: 'Replaced by the \Hyde\Foundation\Kernel\Hyperlinks::isRemote method', replacement: '\Hyde\Foundation\Kernel\Hyperlinks::isRemote(%parametersList%)', since: '1.8.0')]
251-
public static function isRemote(string $source): bool
252-
{
253-
return Hyperlinks::isRemote($source);
254-
}
255243
}

0 commit comments

Comments
 (0)