Skip to content

Commit 5436de5

Browse files
authored
Merge branch 'dev' into master
2 parents eeeceff + f046142 commit 5436de5

27 files changed

+405
-138
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ composer.lock
33
docs
44
vendor
55
coverage
6-
.idea
6+
.idea
7+
.phpunit.result.cache
8+
.phpunit.cache
9+
.vscode

.scrutinizer.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.styleci.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Perform Self-Diagnosis Tests On Your Laravel Application
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/beyondcode/laravel-self-diagnosis.svg?style=flat-square)](https://packagist.org/packages/beyondcode/laravel-self-diagnosis)
4-
[![Build Status](https://img.shields.io/travis/beyondcode/laravel-self-diagnosis/master.svg?style=flat-square)](https://travis-ci.org/beyondcode/laravel-self-diagnosis)
5-
[![Quality Score](https://img.shields.io/scrutinizer/g/beyondcode/laravel-self-diagnosis.svg?style=flat-square)](https://scrutinizer-ci.com/g/beyondcode/laravel-self-diagnosis)
64
[![Total Downloads](https://img.shields.io/packagist/dt/beyondcode/laravel-self-diagnosis.svg?style=flat-square)](https://packagist.org/packages/beyondcode/laravel-self-diagnosis)
75

86
This package allows you to run self-diagnosis tests on your Laravel application. It comes with multiple checks out of the box and allows you to add custom checks yourself.
@@ -13,8 +11,8 @@ Here is an example output of the command:
1311

1412
## Included checks
1513

16-
- Is the APP_KEY set?
17-
- Are your composer dependencies up to date with the composer.lock file?
14+
- Is the `APP_KEY` set?
15+
- Are your composer dependencies up to date with the `composer.lock` file?
1816
- Do you have the correct PHP version installed?
1917
- Do you have the correct PHP extensions installed?
2018
- Can a connection to the database be established?
@@ -50,8 +48,6 @@ You can install the package via composer:
5048
composer require beyondcode/laravel-self-diagnosis
5149
```
5250

53-
If you're using Laravel 5.5+ the `SelfDiagnosisServiceProvider` will be automatically registered for you.
54-
5551
## Usage
5652

5753
Just call the artisan command to start the checks:

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.1",
20-
"composer/semver": "^1.4",
19+
"php": "^8.2",
20+
"composer/semver": "^1.4|^3.0",
2121
"geerlingguy/ping": "^1.1",
22-
"illuminate/support": "5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*",
23-
"vlucas/phpdotenv": "~2.5|~3.3"
22+
"illuminate/support": "^9.0|^10.0|^11.0|^12.0",
23+
"vlucas/phpdotenv": "^5.0"
2424
},
2525
"require-dev": {
2626
"larapack/dd": "^1.0",
2727
"mockery/mockery": "^1.0",
28-
"orchestra/testbench": "~3.5|~3.8",
29-
"phpunit/phpunit": "^7.0",
30-
"predis/predis": "^1.1",
28+
"orchestra/testbench": "^7.0|^8.0|^10.0",
29+
"phpunit/phpunit": "^9.5.10|^11.5.3",
30+
"predis/predis": "^1.1|^2.3",
3131
"scrutinizer/ocular": "^1.5"
3232
},
3333
"autoload": {

config/config.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
\BeyondCode\SelfDiagnosis\Checks\LocalesAreInstalled::class => [
3939
'required_locales' => [
4040
'en_US',
41-
'en_US.utf8',
41+
PHP_OS === 'Darwin' ? 'en_US.UTF-8' : 'en_US.utf8',
4242
],
4343
],
4444
\BeyondCode\SelfDiagnosis\Checks\MaintenanceModeNotEnabled::class,
@@ -97,6 +97,7 @@
9797
// ],
9898
// 'restarted_within' => 300,
9999
//],
100+
//\BeyondCode\SelfDiagnosis\Checks\HorizonIsRunning::class,
100101
],
101102
],
102103

phpunit.xml.dist

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
verbose="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnFailure="false">
12-
<testsuites>
13-
<testsuite name="BeyondCode Test Suite">
14-
<directory>tests</directory>
15-
</testsuite>
16-
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix=".php">src/</directory>
20-
</whitelist>
21-
</filter>
22-
<logging>
23-
<log type="tap" target="build/report.tap"/>
24-
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage"/>
26-
<log type="coverage-text" target="build/coverage.txt"/>
27-
<log type="coverage-clover" target="build/logs/clover.xml"/>
28-
</logging>
29-
<php>
30-
<env name="FILLED" value="filled" force="true" />
31-
<env name="GET_FILLED" value="filled" force="true" />
32-
<env name="NOT_FILLED" value="" force="true" />
33-
<env name="FILLED_WITH_FALSE" value="false" force="true" />
34-
</php>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd">
3+
<coverage>
4+
<report>
5+
<clover outputFile="build/logs/clover.xml"/>
6+
<html outputDirectory="build/coverage"/>
7+
<text outputFile="build/coverage.txt"/>
8+
</report>
9+
</coverage>
10+
<testsuites>
11+
<testsuite name="BeyondCode Test Suite">
12+
<directory>tests</directory>
13+
</testsuite>
14+
</testsuites>
15+
<logging>
16+
<junit outputFile="build/report.junit.xml"/>
17+
</logging>
3518
</phpunit>

phpunit.xml.dist.bak

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
verbose="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false">
12+
<testsuites>
13+
<testsuite name="BeyondCode Test Suite">
14+
<directory>tests</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory suffix=".php">src/</directory>
20+
</whitelist>
21+
</filter>
22+
<logging>
23+
<log type="tap" target="build/report.tap"/>
24+
<log type="junit" target="build/report.junit.xml"/>
25+
<log type="coverage-html" target="build/coverage"/>
26+
<log type="coverage-text" target="build/coverage.txt"/>
27+
<log type="coverage-clover" target="build/logs/clover.xml"/>
28+
</logging>
29+
</phpunit>

src/Checks/ComposerWithDevDependenciesIsUpToDate.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use BeyondCode\SelfDiagnosis\Composer;
66
use Illuminate\Support\Arr;
7+
use Illuminate\Support\Str;
78

89
class ComposerWithDevDependenciesIsUpToDate implements Check
910
{
@@ -42,7 +43,11 @@ public function check(array $config): bool
4243

4344
$this->output = $this->composer->installDryRun($additionalOptions);
4445

45-
return str_contains($this->output, 'Nothing to install or update');
46+
return Str::contains($this->output, [
47+
'Nothing to install or update',
48+
'Nothing to install, update or remove',
49+
'Package operations: 0 installs, 0 updates, 0 removals'
50+
]);
4651
}
4752

4853
/**

0 commit comments

Comments
 (0)