Skip to content

Commit db64985

Browse files
author
Renato Marinho
committed
refactoring to middleware / new filter trimruls / tests
1 parent 6b39876 commit db64985

25 files changed

+1388
-348
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ You can install the package via composer:
1515
$ composer require renatomarinho/laravel-page-speed
1616
```
1717

18-
Next, the \RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class - middleware must be registered in the kernel:
18+
Next, the \RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class and others - middleware must be registered in the kernel:
1919

2020
```php
2121
//app/Http/Kernel.php
2222

2323
protected $middleware = [
2424
...
25-
\RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class
25+
\RenatoMarinho\LaravelPageSpeed\Middleware\CollapseWhitespace::class,
26+
\RenatoMarinho\LaravelPageSpeed\Middleware\RemoveComments::class,
27+
\RenatoMarinho\LaravelPageSpeed\Middleware\TrimUrls::class,
2628
]
2729
```
2830

@@ -37,6 +39,11 @@ protected $middleware = [
3739
## Roadmap : Filters
3840

3941
<table>
42+
<tr>
43+
<td>trim_urls</td>
44+
<td>Removes unnecessary prefixes from URLs</td>
45+
<td>YES</td>
46+
<tr>
4047
<tr>
4148
<td><strong>Name</strong></td>
4249
<td><strong>Description</strong></td>
@@ -237,11 +244,7 @@ protected $middleware = [
237244
<td>Sprites images</td>
238245
<td>NO</td>
239246
<tr>
240-
<tr>
241-
<td>trim_urls</td>
242-
<td>Removes unnecessary prefixes from URLs</td>
243-
<td>NO</td>
244-
<tr>
247+
245248
</table>
246249

247250
<hr />

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
"php": ">=5.6",
2020
"illuminate/support": "5.3.x|5.4.x|5.5.x"
2121
},
22+
"require-dev": {
23+
"phpunit/phpunit": "^6.2",
24+
"orchestra/testbench": "~3.2"
25+
},
2226
"autoload": {
2327
"psr-4": {
2428
"RenatoMarinho\\LaravelPageSpeed\\": "src/"
@@ -29,16 +33,11 @@
2933
"RenatoMarinho\\LaravelPageSpeed\\Test\\": "tests"
3034
}
3135
},
32-
"require-dev": {
33-
"phpunit/phpunit": "^4.8|^5.2",
34-
"orchestra/testbench": "3.x",
35-
"squizlabs/php_codesniffer": "^2.3"
36-
},
3736
"scripts": {
3837
"test": "phpunit",
3938
"check-style": "phpcs -p --standard=PSR2 src/",
4039
"fix-style": "phpcbf -p --standard=PSR2 src/"
4140
},
4241
"minimum-stability": "dev",
4342
"prefer-stable": true
44-
}
43+
}

0 commit comments

Comments
 (0)