(Update) Add OPCache Artisan Commands

NOTE: This is only for those using OPCache!!!

- requires `composer update` to be ran.

-Clear OPcache:
`php artisan opcache:clear`

-Show OPcache config:
`php artisan opcache:config`

-Show OPcache status:
`php artisan opcache:status`

Pre-compile your application code:
`php artisan opcache:optimize`
This commit is contained in:
HDVinnie
2018-08-07 17:41:51 -04:00
parent 31999316f9
commit d618f99a6b
3 changed files with 184 additions and 42 deletions

View File

@@ -9,6 +9,7 @@
"type": "project",
"require": {
"php": ">=7.2",
"appstract/laravel-opcache": "^2.0",
"arcanedev/log-viewer": "^4.3",
"bepsvpt/secure-headers": "^3.0",
"brian2694/laravel-toastr": "^1.0",

207
composer.lock generated
View File

@@ -4,8 +4,128 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d5bd3645f48587a477b83d50ac5afcc0",
"content-hash": "2d67e055b9efaecd961bc8841f9726ae",
"packages": [
{
"name": "appstract/laravel-opcache",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/appstract/laravel-opcache.git",
"reference": "ef41a0f5e6d717317d5434b39add6e17152b620b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appstract/laravel-opcache/zipball/ef41a0f5e6d717317d5434b39add6e17152b620b",
"reference": "ef41a0f5e6d717317d5434b39add6e17152b620b",
"shasum": ""
},
"require": {
"appstract/lush-http": "^0.5",
"illuminate/console": ">=5.5",
"illuminate/filesystem": ">=5.5",
"illuminate/routing": ">=5.5",
"illuminate/support": ">=5.5",
"php": ">=5.6"
},
"require-dev": {
"orchestra/testbench": "^3.3",
"phpunit/phpunit": "5.*"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Appstract\\Opcache\\OpcacheServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Appstract\\Opcache\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Olav van Schie",
"email": "hello@appstract.team",
"homepage": "https://appstract.team",
"role": "Developer"
}
],
"description": "OPcache helper for Laravel.",
"homepage": "https://github.com/appstract/laravel-opcache",
"keywords": [
"Opcache",
"appstract",
"laravel",
"php"
],
"time": "2018-07-19T12:41:58+00:00"
},
{
"name": "appstract/lush-http",
"version": "0.5.4",
"source": {
"type": "git",
"url": "https://github.com/appstract/lush-http.git",
"reference": "771c501e1ea6a16b6c33917f595a04e5e37ad9b7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appstract/lush-http/zipball/771c501e1ea6a16b6c33917f595a04e5e37ad9b7",
"reference": "771c501e1ea6a16b6c33917f595a04e5e37ad9b7",
"shasum": ""
},
"require": {
"illuminate/support": ">=5.4",
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"type": "library",
"extra": {
"laravel": {
"aliases": {
"Lush": "Appstract\\LushHttp\\LushFacade"
}
}
},
"autoload": {
"psr-4": {
"Appstract\\LushHttp\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Olav van Schie",
"email": "hello@appstract.team",
"homepage": "https://appstract.team",
"role": "Developer"
}
],
"description": "Smart Http Client for PHP.",
"homepage": "https://github.com/appstract/lush-http",
"keywords": [
"appstract",
"client",
"curl",
"http",
"lush",
"lush-http",
"php"
],
"time": "2018-05-28T08:35:31+00:00"
},
{
"name": "arcanedev/log-viewer",
"version": "4.5.2",
@@ -698,16 +818,16 @@
},
{
"name": "google/recaptcha",
"version": "1.2",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/google/recaptcha.git",
"reference": "3875d025d0465f36f32452f614e7ffc1462c889f"
"reference": "e7add3be59211482ecdb942288f52da64a35f61a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/google/recaptcha/zipball/3875d025d0465f36f32452f614e7ffc1462c889f",
"reference": "3875d025d0465f36f32452f614e7ffc1462c889f",
"url": "https://api.github.com/repos/google/recaptcha/zipball/e7add3be59211482ecdb942288f52da64a35f61a",
"reference": "e7add3be59211482ecdb942288f52da64a35f61a",
"shasum": ""
},
"require": {
@@ -741,7 +861,7 @@
"recaptcha",
"spam"
],
"time": "2018-08-01T11:58:31+00:00"
"time": "2018-08-05T09:31:53+00:00"
},
{
"name": "gstt/laravel-achievements",
@@ -3576,25 +3696,28 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.8.0",
"version": "v1.9.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
"dev-master": "1.9-dev"
}
},
"autoload": {
@@ -3627,20 +3750,20 @@
"polyfill",
"portable"
],
"time": "2018-04-30T19:57:29+00:00"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.8.0",
"version": "v1.9.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "3296adf6a6454a050679cde90f95350ad604b171"
"reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
"reference": "3296adf6a6454a050679cde90f95350ad604b171",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
"reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
"shasum": ""
},
"require": {
@@ -3652,7 +3775,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
"dev-master": "1.9-dev"
}
},
"autoload": {
@@ -3686,20 +3809,20 @@
"portable",
"shim"
],
"time": "2018-04-26T10:06:28+00:00"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.8.0",
"version": "v1.9.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46"
"reference": "95c50420b0baed23852452a7f0c7b527303ed5ae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46",
"reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/95c50420b0baed23852452a7f0c7b527303ed5ae",
"reference": "95c50420b0baed23852452a7f0c7b527303ed5ae",
"shasum": ""
},
"require": {
@@ -3708,7 +3831,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
"dev-master": "1.9-dev"
}
},
"autoload": {
@@ -3741,7 +3864,7 @@
"portable",
"shim"
],
"time": "2018-04-26T10:06:28+00:00"
"time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/process",
@@ -5016,16 +5139,16 @@
},
{
"name": "phpspec/prophecy",
"version": "1.7.6",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712"
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
"reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
"shasum": ""
},
"require": {
@@ -5037,12 +5160,12 @@
},
"require-dev": {
"phpspec/phpspec": "^2.5|^3.2",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.7.x-dev"
"dev-master": "1.8.x-dev"
}
},
"autoload": {
@@ -5075,7 +5198,7 @@
"spy",
"stub"
],
"time": "2018-04-18T13:57:24+00:00"
"time": "2018-08-05T17:53:17+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -5328,16 +5451,16 @@
},
{
"name": "phpunit/phpunit",
"version": "6.5.10",
"version": "6.5.11",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "5744955af9c0a2de74a5eb5287c50bf025100d39"
"reference": "7bab54cb366076023bbf457a2a0d513332cd40f2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5744955af9c0a2de74a5eb5287c50bf025100d39",
"reference": "5744955af9c0a2de74a5eb5287c50bf025100d39",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7bab54cb366076023bbf457a2a0d513332cd40f2",
"reference": "7bab54cb366076023bbf457a2a0d513332cd40f2",
"shasum": ""
},
"require": {
@@ -5355,7 +5478,7 @@
"phpunit/php-file-iterator": "^1.4.3",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-timer": "^1.0.9",
"phpunit/phpunit-mock-objects": "^5.0.8",
"phpunit/phpunit-mock-objects": "^5.0.9",
"sebastian/comparator": "^2.1",
"sebastian/diff": "^2.0",
"sebastian/environment": "^3.1",
@@ -5408,20 +5531,20 @@
"testing",
"xunit"
],
"time": "2018-08-03T05:27:14+00:00"
"time": "2018-08-07T07:05:35+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "5.0.8",
"version": "5.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "6f9a3c8bf34188a2b53ce2ae7a126089c53e0a9f"
"reference": "141129c578f58f38f55eccf15a1039bd413ea57c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/6f9a3c8bf34188a2b53ce2ae7a126089c53e0a9f",
"reference": "6f9a3c8bf34188a2b53ce2ae7a126089c53e0a9f",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/141129c578f58f38f55eccf15a1039bd413ea57c",
"reference": "141129c578f58f38f55eccf15a1039bd413ea57c",
"shasum": ""
},
"require": {
@@ -5467,7 +5590,7 @@
"mock",
"xunit"
],
"time": "2018-07-13T03:27:23+00:00"
"time": "2018-08-07T07:02:44+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",

18
config/opcache.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
return [
'url' => env('OPCACHE_URL', config('app.url')),
'verify_ssl' => true,
'headers' => [],
'directories' => [
base_path('app'),
base_path('bootstrap'),
base_path('public'),
base_path('resources/lang'),
base_path('routes'),
base_path('storage/framework/views'),
base_path('vendor/appstract'),
base_path('vendor/composer'),
base_path('vendor/laravel/framework'),
],
];