Skip to content

Commit 562f658

Browse files
Merge pull request #15 from ARCANEDEV/update-laravel_6.0_support
Adding Laravel 6.0 support
2 parents 514ba2c + 6e05c81 commit 562f658

File tree

8 files changed

+25
-72
lines changed

8 files changed

+25
-72
lines changed

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ checks:
2121
tools:
2222
external_code_coverage:
2323
timeout: 600
24-
runs: 4
24+
runs: 2
2525
php_code_sniffer:
2626
enabled: true
2727
config:

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: php
22

33
php:
4-
- 7.1.3
5-
- 7.1
64
- 7.2
75
- 7.3
86
- nightly

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/Gravatar/rele
2020
### Features
2121

2222
* Framework-agnostic package.
23-
* Laravel `5.0` to `5.8` are Supported.
23+
* Laravel `5.0` to `6.0` are Supported.
2424
* Easy setup & configuration.
2525
* Well tested (100% code coverage with maximum code quality).
2626
* Made with :heart: & :coffee:.
@@ -48,7 +48,7 @@ Any ideas are welcome. Feel free to submit any issues or pull requests, please c
4848
[badge_insight]: https://img.shields.io/sensiolabs/i/b295ae87-bc10-4a43-9ca4-fbeab5c7fcda.svg?style=flat-square
4949
[badge_issues]: http://img.shields.io/github/issues/ARCANEDEV/Gravatar.svg?style=flat-square
5050
[badge_package]: https://img.shields.io/badge/package-arcanedev/gravatar-blue.svg?style=flat-square
51-
[badge_laravel]: https://img.shields.io/badge/Laravel%20Supported-5.x-orange.svg?style=flat-square
51+
[badge_laravel]: https://img.shields.io/badge/Laravel%20Supported-5.x%20&%206.0-orange.svg?style=flat-square
5252
[badge_release]: https://img.shields.io/packagist/v/arcanedev/gravatar.svg?style=flat-square
5353
[badge_downloads]: https://img.shields.io/packagist/dt/arcanedev/gravatar.svg?style=flat-square
5454

_docs/0-Home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/Gravatar/rele
77
### Features
88

99
* Framework-agnostic package.
10-
* Laravel `5.0` to `5.8` are Supported.
10+
* Laravel `5.0` to `6.0` are Supported.
1111
* Easy setup & configuration.
1212
* Well tested (100% code coverage with maximum code quality).
1313
* Made with :heart: & :coffee:.

_docs/1-Installation-and-Setup.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
1. [Installation and Setup](1-Installation-and-Setup.md)
66
2. [Configuration](2-Configuration.md)
77
3. [Usage](3-Usage.md)
8-
9-
## Server Requirements
10-
11-
The Gravatar package has a few system requirements:
12-
13-
- PHP >= 7.1.3
148

159
## Version Compatibility
1610

@@ -22,6 +16,7 @@ The Gravatar package has a few system requirements:
2216
| ![Gravatar v2.2.x][gravatar_2_2] | ![Laravel v5.6][laravel_5_6] |
2317
| ![Gravatar v2.3.x][gravatar_2_3] | ![Laravel v5.7][laravel_5_7] |
2418
| ![Gravatar v2.4.x][gravatar_2_4] | ![Laravel v5.8][laravel_5_8] |
19+
| ![Gravatar v3.0.x][gravatar_3_0] | ![Laravel v6.0][laravel_6_0] |
2520

2621
> **Note :** This is a framework-agnostic package, so you can use any version of this package in your PHP project.
2722
@@ -34,13 +29,15 @@ The Gravatar package has a few system requirements:
3429
[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6"
3530
[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7"
3631
[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8"
32+
[laravel_6_0]: https://img.shields.io/badge/v6.0-supported-brightgreen.svg?style=flat-square "Laravel v6.0"
3733

3834
[gravatar_1_x]: https://img.shields.io/badge/version-1.*-blue.svg?style=flat-square "Gravatar v1.*"
3935
[gravatar_2_0]: https://img.shields.io/badge/version-2.0.*-blue.svg?style=flat-square "Gravatar v2.0.*"
4036
[gravatar_2_1]: https://img.shields.io/badge/version-2.1.*-blue.svg?style=flat-square "Gravatar v2.1.*"
4137
[gravatar_2_2]: https://img.shields.io/badge/version-2.2.*-blue.svg?style=flat-square "Gravatar v2.2.*"
4238
[gravatar_2_3]: https://img.shields.io/badge/version-2.3.*-blue.svg?style=flat-square "Gravatar v2.3.*"
4339
[gravatar_2_4]: https://img.shields.io/badge/version-2.4.*-blue.svg?style=flat-square "Gravatar v2.4.*"
40+
[gravatar_3_0]: https://img.shields.io/badge/version-3.0.*-blue.svg?style=flat-square "Gravatar v3.0.*"
4441

4542
## Composer
4643

@@ -59,15 +56,6 @@ Once the package is installed, you can register the service provider in `config/
5956
],
6057
```
6158

62-
**Optional :** Alias the Gravatar facade by adding it to the aliases array in the `config/app.php` file.
63-
64-
```php
65-
'aliases' => [
66-
// ...
67-
'Gravatar' => Arcanedev\Gravatar\Facades\Gravatar::class,
68-
],
69-
```
70-
7159
### Artisan command
7260

7361
To publish the config file, run this command:

_docs/3-Usage.md

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,64 +59,51 @@ else {
5959
And last but not least, if you want to echo out the image:
6060

6161
```php
62-
echo gravatar()->image('your@email.com')->toHtml();
63-
echo gravatar()->image('your@email.com', 'Username')->toHtml();
64-
echo gravatar()->image('your@email.com', 'Username', ['class' => 'img-responsive'])->toHtml();
65-
echo gravatar()->image('your@email.com', 'Username', ['class' => 'img-responsive'], 'pg')->toHtml();
62+
echo $gravatar->image('your@email.com')->toHtml();
63+
echo $gravatar->image('your@email.com', 'Username')->toHtml();
64+
echo $gravatar->image('your@email.com', 'Username', ['class' => 'img-responsive'])->toHtml();
65+
echo $gravatar->image('your@email.com', 'Username', ['class' => 'img-responsive'], 'pg')->toHtml();
6666
```
6767

6868
### Laravel
6969

70-
#### Gravatar::exists($email)
70+
#### gravatar()->exists($email)
7171

7272
Returns a boolean telling if has a gravatar of the given `$email`.
7373

74-
#### Gravatar::src($email, $size = null, $rating = null)
74+
#### gravatar()->src($email, $size = null, $rating = null)
7575

7676
Returns the https URL for the Gravatar of the specified email address.
7777

7878
Can optionally pass in the size required as an integer (range between 1 - 512).
7979

8080
```html
8181
<!-- Show image with default dimensions -->
82-
<img src="{{ Gravatar::src('your@email.com') }}">
82+
<img src="{{ gravatar()->src('your@email.com') }}">
8383

8484
<!-- Show image at 256px -->
85-
<img src="{{ Gravatar::src('your@email.com', 256) }}">
85+
<img src="{{ gravatar()->src('your@email.com', 256) }}">
8686
```
8787

88-
#### Gravatar::image($email, $alt = null, $attributes = [], $rating = null)
88+
#### gravatar()->image($email, $alt = null, $attributes = [], $rating = null)
8989

9090
Returns the HTML for an `<img>` tag
9191

9292
```php
9393
<?php
9494

9595
// Show image with default dimensions
96-
echo Gravatar::image('your@email.com');
96+
echo gravatar()->image('your@email.com');
9797

9898
// Adding attributes
99-
echo Gravatar::image('your@email.com', 'Your username', ['class' => 'img-responsive']);
99+
echo gravatar()->image('your@email.com', 'Your username', ['class' => 'img-responsive']);
100100

101101
// Or
102-
echo Gravatar::image('your@email.com', 'Your username', ['width' => 200, 'height' => 200]);
102+
echo gravatar()->image('your@email.com', 'Your username', ['width' => 200, 'height' => 200]);
103103
```
104104

105105
> For the blade engine use `{!! ... !!}` to echo out the images.
106106
107-
#### gravatar() Helper
108-
109-
You can use the Gravatar Helper `gravatar()` instead of Facade, like this:
110-
111-
```php
112-
<?php
113-
114-
// Changing the default image and the size on the fly (You can do this also with the facade).
115-
gravatar()->setDefaultImage('mm')->setSize(128);
116-
117-
echo gravatar()->image('your@email.com', 'Username')->toHtml();
118-
```
119-
120107
### API
121108

122109
This is the list of all available gravatar methods:

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
"type": "library",
1717
"license": "MIT",
1818
"require": {
19-
"php" : ">=7.1.3",
19+
"php" : ">=7.2.0",
2020
"ext-curl": "*",
21-
"arcanedev/support": "~4.5.0",
22-
"arcanedev/php-html": "~2.0"
21+
"arcanedev/support": "~5.0.0",
22+
"arcanedev/php-html": "~3.0"
2323
},
2424
"require-dev": {
25-
"orchestra/testbench": "~3.8.0",
26-
"phpunit/phpcov": "~5.0|~6.0",
27-
"phpunit/phpunit": "~7.0|~8.0"
25+
"orchestra/testbench": "~4.0.0",
26+
"phpunit/phpcov": "~6.0",
27+
"phpunit/phpunit": "~8.0"
2828
},
2929
"autoload": {
3030
"psr-4": {

src/Facades/Gravatar.php

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)