File tree 6 files changed +53
-17
lines changed
6 files changed +53
-17
lines changed Original file line number Diff line number Diff line change 9
9
build :
10
10
strategy :
11
11
matrix :
12
- php : [ "8.0", "8.1" ]
12
+ php : [ "8.0", "8.1", "8.2" ]
13
13
runs-on : ubuntu-latest
14
14
15
15
steps :
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ coverage.xml
6
6
.php_cs.cache
7
7
examples /lumen-app /vendor
8
8
.phpunit.cache
9
+ .phpunit.result.cache
Original file line number Diff line number Diff line change 1
1
# Laravel (and Lumen) Prometheus Exporter
2
2
3
+ ## Version Compatibility
4
+
5
+ | Releases | PHP |
6
+ | :---------| :-------|
7
+ | 3.x | ^8.1; |
8
+ | 4.x | ^8.2; |
9
+
3
10
A prometheus exporter package for Laravel and Lumen.
4
11
5
12
[ ![ Software License] ( https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square )] ( LICENSE )
@@ -23,6 +30,34 @@ library's functionality and the way it's intended to be used.
23
30
24
31
## Installation
25
32
33
+ ### Laravel 10
34
+
35
+ #### Install via composer
36
+ Run the following command:
37
+ ``` bash
38
+ composer require arquivei/laravel-prometheus-exporter
39
+ ```
40
+
41
+ #### Add service provider
42
+ Add the service provider to the ` providers ` array in the ` config/app.php ` config file as follows:
43
+ ``` bash
44
+ ' providers' => [
45
+
46
+ ...
47
+
48
+ Arquivei\L aravelPrometheusExporter\P rometheusServiceProvider::class,
49
+ ]
50
+ ```
51
+
52
+ #### Publish the config
53
+ Run the following command:
54
+ ``` bash
55
+ php artisan vendor:publish --provider=" Arquivei\LaravelPrometheusExporter\PrometheusServiceProvider"
56
+ ```
57
+ You should now have a ` config/prometheus.php ` .
58
+
59
+
60
+ ### Laravel 9 or below
26
61
Add the repository to composer.json
27
62
``` composer.json
28
63
"repositories" : [
Original file line number Diff line number Diff line change 8
8
}
9
9
],
10
10
"require" : {
11
- "php" : " ^8.0 || ^8.1" ,
11
+ "php" : " ^8.0 || ^8.1 || ^8.2 " ,
12
12
"guzzlehttp/guzzle" : " ^7.4.2" ,
13
- "illuminate/routing" : " ^9.0" ,
14
- "illuminate/support" : " ^9.0" ,
13
+ "illuminate/routing" : " ^9.0 || ^10.0 " ,
14
+ "illuminate/support" : " ^9.0 || ^10.0 " ,
15
15
"promphp/prometheus_client_php" : " ^2.6.0"
16
16
},
17
17
"require-dev" : {
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
- xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.5/phpunit.xsd"
4
- bootstrap =" vendor/autoload.php"
5
- cacheResultFile =" .phpunit.cache/test-results"
6
- executionOrder =" depends,defects"
7
- beStrictAboutOutputDuringTests =" true"
8
- beStrictAboutTodoAnnotatedTests =" true"
9
- failOnRisky =" true"
10
- failOnWarning =" true"
11
- verbose =" true"
12
- colors =" true" >
13
-
2
+ <phpunit
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.0/phpunit.xsd"
5
+ bootstrap =" vendor/autoload.php"
6
+ executionOrder =" depends,defects"
7
+ beStrictAboutOutputDuringTests =" true"
8
+ failOnRisky =" true"
9
+ failOnWarning =" true"
10
+ displayDetailsOnTestsThatTriggerNotices =" true"
11
+ colors =" true"
12
+ cacheDirectory =" .phpunit.cache" >
14
13
<testsuites >
15
14
<testsuite name =" default" >
16
15
<directory suffix =" Test.php" >tests</directory >
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ private function loadRoutes()
104
104
105
105
private function configPath ($ path ) : string
106
106
{
107
- return $ this ->app ->basePath () . ($ path ? DIRECTORY_SEPARATOR . $ path : '' );
107
+ $ basePath = sprintf ('%s/%s ' , $ this ->app ->basePath (), 'config ' );
108
+ return $ basePath . ($ path ? DIRECTORY_SEPARATOR . $ path : '' );
108
109
}
109
110
}
You can’t perform that action at this time.
0 commit comments