Skip to content

Commit a513014

Browse files
authored
Add Laravel 9 support using Symfony Mailer (#173)
* Add Laravel 9 support using Symfony Mailer * Fix file namming issues
1 parent 285036b commit a513014

File tree

7 files changed

+2471
-1039
lines changed

7 files changed

+2471
-1039
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
name: CI
2-
on: [push]
2+
on: [push, pull_request]
33
jobs:
44
test:
5-
runs-on: ubuntu-latest
5+
runs-on: [ubuntu-latest, windows-latest]
66
strategy:
77
fail-fast: false
88
matrix:
9-
php-versions: ['7.3', '7.4']
9+
php-versions: ['8.1', '8.0']
1010
steps:
1111
- uses: actions/checkout@v1
1212
- name: Setup PHP
1313
uses: shivammathur/setup-php@v1
1414
with:
1515
php-version: ${{ matrix.php-versions }}
16-
extensions: mbstring, intl, xml
16+
extensions: dom, libxml, mbstring, intl, xml, fileinfo, zip
1717
coverage: xdebug
1818
tools: prestissimo
1919
- name: Get composer cache directory

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@ Laravel Mail CSS Inliner
1212
Most email clients won't render CSS (on a `<link>` or a `<style>`). The solution is inline your CSS directly on the HTML. Doing this by hand easily turns into unmantainable templates.
1313
The goal of this package is to automate the process of inlining that CSS before sending the emails.
1414

15+
## Instalation and compatability
16+
17+
Starting with version 5 this package requires PHP 8.0 and Laravel 9.0 or higher.
18+
19+
## Using an older version of PHP / Laravel?
20+
21+
If you are on a PHP version below 8.0 or a Laravel version below 9.0 just use version 4.* of this package.
22+
1523
## How?
16-
Using a wonderful [CSS inliner package](https://github.com/tijsverkoyen/CssToInlineStyles) wrapped in a SwiftMailer plugin and served as a Service Provider it just works without any configuration.
17-
Since this is a SwiftMailer plugin, it will automatically inline your css when parsing an email template. You don't have to do anything!
24+
Using a wonderful [CSS inliner package](https://github.com/tijsverkoyen/CssToInlineStyles) wrapped in a Symfony Mailer plugin and served as a Service Provider it just works without any configuration.
25+
Since this is a Symfony Mailer plugin, it will automatically inline your css when parsing an email template. You don't have to do anything!
1826

1927
Turns style tag:
2028
```html
@@ -62,7 +70,7 @@ Into this:
6270
```
6371

6472
## Installation
65-
This package needs Laravel 7.x.
73+
This package needs Laravel 9.x.
6674

6775
Begin by installing this package through Composer. Require it directly from the Terminal to take the last stable version:
6876
```bash

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^7.2|^8.0",
17+
"php": "^8.0.2",
1818
"ext-dom": "*",
19-
"illuminate/mail": "^7.4 || ^8.0",
20-
"illuminate/support": "^7.4 || ^8.0",
21-
"tijsverkoyen/css-to-inline-styles": "~2.0"
19+
"illuminate/mail": "^9.0",
20+
"illuminate/support": "^9.0",
21+
"tijsverkoyen/css-to-inline-styles": "~2.2"
2222
},
2323
"require-dev": {
24-
"phpunit/phpunit": "^8.5",
25-
"swiftmailer/swiftmailer": "^6.0"
24+
"phpunit/phpunit": "^9.0",
25+
"symfony/mailer": "^6.0"
2626
},
2727
"config": {
2828
"sort-packages": true

0 commit comments

Comments
 (0)