Skip to content

Commit

Permalink
update to emojione 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
christofferok committed Sep 6, 2018
1 parent e8500ad commit 5a0bcb9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
# laravel-emojione <img alt="❤️" width="30" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/128/2764.png">
# laravel-emojione <img alt="❤️" width="30" src="https://cdn.jsdelivr.net/emojione/assets/4.0/png/128/2764.png">

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Total Downloads][ico-downloads]][link-downloads]
[![Software License][ico-license]](LICENSE.md)

<img alt="😀" width="50" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/128/1f600.png"> <img alt="🏋🏼" width="50" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/128/1f3cb-1f3fc.png"> <img alt="❤️" width="50" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/128/2764.png"> <img alt="" width="50" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/128/262e.png">
<img alt="😀" width="50" src="https://cdn.jsdelivr.net/emojione/assets/4.0/png/128/1f600.png"> <img alt="🏋🏼" width="50" src="https://cdn.jsdelivr.net/emojione/assets/4.0/png/128/1f3cb-1f3fc.png"> <img alt="❤️" width="50" src="https://cdn.jsdelivr.net/emojione/assets/4.0/png/128/2764.png"> <img alt="" width="50" src="https://cdn.jsdelivr.net/emojione/assets/4.0/png/128/262e.png">


Laravel package to make it easier working with the gorgeous emojis from [EmojiOne](https://emojione.com/).

Remember to read the [EmojiOne Free License](https://www.emojione.com/developers/free-license) and provide the appropriate attribution. Or buy a [premium license](https://www.emojione.com/developers/premium-license)
Remember to read the [EmojiOne Free License](https://www.emojione.com/licenses/free) and provide the appropriate attribution. Or buy a [premium license](https://www.emojione.com/licenses/premium)

## Upgrading from 3.x to 4.x

1. Update your composer dependency to: `"christofferok/laravel-emojione": "^4.0"` and run `composer update`
2. Update `config/emojione.php` (if you have one) with `'emojiVersion' => '4.0'`

If you are serving the assets yourself then you need to do the following things:

1. Update your emojione/assets composer dependency to: `"emojione/assets": "^4.0"` and run `composer update`
2. Update `config/emojione.php` with the correct paths and versions
3. Publish the assets again. See "Assets" section further down

## EmojiOne 3.x vs 2.0
## EmojiOne 4.x/3.x vs 2.0
EmojiOne made a lot of changes in their licensing and which resources are provided in the free license. v2 code is still available in the [emojione-v2](https://github.com/christofferok/laravel-emojione/tree/emojione-v2) branch. If you are upgrading this package, be aware that the SVG assets are not available anymore.

## Install
Expand Down Expand Up @@ -52,9 +63,9 @@ LaravelEmojiOne::toImage($str); // - native unicode + shortnames -> images (mixe

Blade (equivalent to `LaravelEmojiOne::toImage($str)`):

`@emojione(':smile:')` -> <img alt="😀" width="20" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/64/1f600.png">
`@emojione(':smile:')` -> <img alt="😀" width="20" src="https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f600.png">

`@emojione(':smile: ❤️')` -> <img alt="😀" width="20" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/128/1f600.png"><img alt="❤️" width="20" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/128/2764.png">
`@emojione(':smile: ❤️')` -> <img alt="😀" width="20" src="https://cdn.jsdelivr.net/emojione/assets/4.0/png/128/1f600.png"><img alt="❤️" width="20" src="https://cdn.jsdelivr.net/emojione/assets/4.0/png/128/2764.png">

🚨 The output is not escaped so be careful with what you pass into `@emojione`.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"require": {
"php": "~5.6|~7.0",
"emojione/emojione": "^3.1.0",
"emojione/emojione": "^4.0.0",
"illuminate/support": "~5.1"
},
"suggest": {
Expand Down
2 changes: 1 addition & 1 deletion config/emojione.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

// If you are using the cdn, then you can change these values to get different sizes
'emojiSize' => 64, // 32/64/128
'emojiVersion' => '3.1',
'emojiVersion' => '4.0',
];

0 comments on commit 5a0bcb9

Please sign in to comment.