Skip to content

Commit ca26d66

Browse files
committed
Changed package name
1 parent 2a56f8a commit ca26d66

File tree

6 files changed

+24
-23
lines changed

6 files changed

+24
-23
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<p align="center">
2-
<img src="https://raw.githubusercontent.com/aneeskhan47/php-cloudflare-image/main/art/banner.png" height="300" alt="PHP Cloudflare Image">
2+
<img src="https://raw.githubusercontent.com/aneeskhan47/php-cloudflare-image-resizing/main/art/banner.png" height="300" alt="PHP Cloudflare Image">
33
<p align="center">
4-
<a href="https://github.com/aneeskhan47/php-cloudflare-image/actions"><img alt="GitHub Workflow Status (master)" src="https://github.com/aneeskhan47/php-cloudflare-image/actions/workflows/tests.yml/badge.svg"></a>
5-
<a href="https://packagist.org/packages/aneeskhan47/php-cloudflare-image"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/aneeskhan47/php-cloudflare-image"></a>
6-
<a href="https://packagist.org/packages/aneeskhan47/php-cloudflare-image"><img alt="Latest Version" src="https://img.shields.io/packagist/v/aneeskhan47/php-cloudflare-image"></a>
7-
<a href="https://packagist.org/packages/aneeskhan47/php-cloudflare-image"><img alt="License" src="https://img.shields.io/packagist/l/aneeskhan47/php-cloudflare-image"></a>
4+
<a href="https://github.com/aneeskhan47/php-cloudflare-image-resizing/actions"><img alt="GitHub Workflow Status (master)" src="https://github.com/aneeskhan47/php-cloudflare-image-resizing/actions/workflows/tests.yml/badge.svg"></a>
5+
<a href="https://packagist.org/packages/aneeskhan47/php-cloudflare-image-resizing"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/aneeskhan47/php-cloudflare-image-resizing"></a>
6+
<a href="https://packagist.org/packages/aneeskhan47/php-cloudflare-image-resizing"><img alt="Latest Version" src="https://img.shields.io/packagist/v/aneeskhan47/php-cloudflare-image-resizing"></a>
7+
<a href="https://packagist.org/packages/aneeskhan47/php-cloudflare-image-resizing"><img alt="License" src="https://img.shields.io/packagist/l/aneeskhan47/php-cloudflare-image-resizing"></a>
88
</p>
99
</p>
1010

1111
------
1212

13-
A PHP package to generate Cloudflare Image URLs. based on [Cloudflare Image Resizing](https://developers.cloudflare.com/images/url-format).
13+
A PHP package to generate Cloudflare Image Resizing URLs. based on [Cloudflare Image Resizing](https://developers.cloudflare.com/images/url-format).
1414

1515
> [!IMPORTANT]
1616
> Your domain/website must be on Cloudflare to use this package.
@@ -19,7 +19,7 @@ A PHP package to generate Cloudflare Image URLs. based on [Cloudflare Image Resi
1919
> **Requires [PHP 8.2+](https://php.net/releases/)**
2020
2121
```bash
22-
composer require aneeskhan47/php-cloudflare-image
22+
composer require aneeskhan47/php-cloudflare-image-resizing
2323
```
2424

2525
------
@@ -39,11 +39,11 @@ This package provides a fluent API to generate Cloudflare Image Resizing URLs.
3939
### 🚀 Usage
4040

4141
```php
42-
use AneesKhan47\CloudflareImage\CFImage;
42+
use AneesKhan47\CloudflareImageResizing\CFImageResizing;
4343

4444
$url = 'https://example.com/uploads/2023/image.jpg';
4545

46-
$image = CFImage::make($url)
46+
$image = CFImageResizing::make($url)
4747
->width(300)
4848
->height(300)
4949
->webp()

art/banner.png

-83.6 KB
Loading

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"name": "aneeskhan47/php-cloudflare-image",
3-
"description": "A PHP package to generate Cloudflare Image URLs",
2+
"name": "aneeskhan47/php-cloudflare-image-resizing",
3+
"description": "A PHP package to generate Cloudflare Image Resizing URLs",
44
"keywords": [
55
"php",
66
"cloudflare",
77
"image",
8+
"resizing",
89
"url",
910
"cdn"
1011
],
@@ -27,7 +28,7 @@
2728
},
2829
"autoload": {
2930
"psr-4": {
30-
"AneesKhan47\\CloudflareImage\\": "src/"
31+
"AneesKhan47\\CloudflareImageResizing\\": "src/"
3132
},
3233
"files": [
3334
"src/helpers.php"

src/CFImage.php renamed to src/CFImageResizing.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
declare(strict_types=1);
44

5-
namespace AneesKhan47\CloudflareImage;
5+
namespace AneesKhan47\CloudflareImageResizing;
66

7-
use AneesKhan47\CloudflareImage\Concerns\HasOptions;
7+
use AneesKhan47\CloudflareImageResizing\Concerns\HasOptions;
88
use Exception;
99

10-
final class CFImage
10+
final class CFImageResizing
1111
{
1212
use HasOptions;
1313

1414
/**
15-
* Create a new CFImage instance.
15+
* Create a new CFImageResizing instance.
1616
*
1717
* @param string|null $url The image URL.
1818
* @return void
@@ -23,7 +23,7 @@ public function __construct(string $url = null)
2323
}
2424

2525
/**
26-
* Make a new CFImage instance.
26+
* Make a new CFImageResizing instance.
2727
*
2828
* @param string|null $url The image URL.
2929
*/

src/Concerns/HasOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace AneesKhan47\CloudflareImage\Concerns;
5+
namespace AneesKhan47\CloudflareImageResizing\Concerns;
66

77
trait HasOptions
88
{

tests/CFImageTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<?php
22

3-
use AneesKhan47\CloudflareImage\CFImage;
3+
use AneesKhan47\CloudflareImageResizing\CFImageResizing;
44

55
it('will modify the image url to have /cdn-cgi/image', function () {
66
$url = 'https://example.com/image.jpg';
77

8-
$cfImage = CFImage::make($url);
8+
$cfImage = CFImageResizing::make($url);
99

1010
expect($cfImage->build())->toBe('https://example.com/cdn-cgi/image/image.jpg');
1111
});
1212

1313
it('will modify the image url to have /cdn-cgi/image if the url has a path', function () {
1414
$url = 'https://example.com/uploads/2023/image.jpg';
1515

16-
$cfImage = CFImage::make($url);
16+
$cfImage = CFImageResizing::make($url);
1717

1818
expect($cfImage->build())->toBe('https://example.com/cdn-cgi/image/uploads/2023/image.jpg');
1919
});
2020

2121
it('will modify the image url to have /cdn-cgi/image with options', function () {
2222
$url = 'https://example.com/image.jpg';
2323

24-
$cfImage = CFImage::make($url)
24+
$cfImage = CFImageResizing::make($url)
2525
->width(300)
2626
->height(300)
2727
->jpeg()
@@ -33,7 +33,7 @@
3333
it('will not modify the image url if it already has /cdn-cgi/image', function () {
3434
$url = 'https://example.com/cdn-cgi/image/image.jpg';
3535

36-
$cfImage = CFImage::make($url);
36+
$cfImage = CFImageResizing::make($url);
3737

3838
expect($cfImage->build())->toBe('https://example.com/cdn-cgi/image/image.jpg');
3939
});

0 commit comments

Comments
 (0)