Merge pull request #5 from comes/upgrade-10

This commit is contained in:
Jeremias Wolff
2023-04-18 20:45:10 +02:00
committed by GitHub
10 changed files with 3125 additions and 1544 deletions

View File

@@ -12,5 +12,4 @@ trim_trailing_whitespace = true
trim_trailing_whitespace = false trim_trailing_whitespace = false
[*.yml] [*.yml]
indent_style = space
indent_size = 2 indent_size = 2

View File

@@ -8,20 +8,16 @@ class AppServiceProvider extends ServiceProvider
{ {
/** /**
* Bootstrap any application services. * Bootstrap any application services.
*
* @return void
*/ */
public function boot() public function boot(): void
{ {
// //
} }
/** /**
* Register any application services. * Register any application services.
*
* @return void
*/ */
public function register() public function register(): void
{ {
// //
} }

View File

@@ -5,6 +5,10 @@
"homepage": "https://github.com/comes/ecowitt2weewx", "homepage": "https://github.com/comes/ecowitt2weewx",
"type": "project", "type": "project",
"license": "MIT", "license": "MIT",
"support": {
"issues": "https://github.com/comes/ecowitt2weewx/issues",
"source": "https://github.com/comes/ecowitt2weewx"
},
"authors": [ "authors": [
{ {
"name": "Jeremias Wolff", "name": "Jeremias Wolff",
@@ -12,15 +16,20 @@
} }
], ],
"require": { "require": {
"php": "^8.0", "php": "^8.1",
"guzzlehttp/guzzle": "^7.5", "laravel-zero/framework": "^10.0.2",
"illuminate/http": "^9.47", "nunomaduro/termwind": "^1.15.1"
"laravel-zero/framework": "^9.2", },
"nesbot/carbon": "^2.65" "require-dev": {
"laravel/pint": "^1.8",
"mockery/mockery": "^1.5.1",
"pestphp/pest": "^2.5"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"App\\": "app/" "App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
} }
}, },
"autoload-dev": { "autoload-dev": {
@@ -36,7 +45,7 @@
"pestphp/pest-plugin": true "pestphp/pest-plugin": true
} }
}, },
"minimum-stability": "dev", "minimum-stability": "stable",
"prefer-stable": true, "prefer-stable": true,
"bin": ["ecowitt2weewx"] "bin": ["ecowitt2weewx"]
} }

4553
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -42,6 +42,19 @@ return [
'env' => 'development', 'env' => 'development',
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'UTC',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Autoloaded Service Providers | Autoloaded Service Providers

View File

@@ -56,10 +56,13 @@ return [
'hidden' => [ 'hidden' => [
NunoMaduro\LaravelConsoleSummary\SummaryCommand::class, NunoMaduro\LaravelConsoleSummary\SummaryCommand::class,
Symfony\Component\Console\Command\DumpCompletionCommand::class,
Symfony\Component\Console\Command\HelpCommand::class, Symfony\Component\Console\Command\HelpCommand::class,
Illuminate\Console\Scheduling\ScheduleRunCommand::class, Illuminate\Console\Scheduling\ScheduleRunCommand::class,
Illuminate\Console\Scheduling\ScheduleListCommand::class,
Illuminate\Console\Scheduling\ScheduleFinishCommand::class, Illuminate\Console\Scheduling\ScheduleFinishCommand::class,
Illuminate\Foundation\Console\VendorPublishCommand::class, Illuminate\Foundation\Console\VendorPublishCommand::class,
LaravelZero\Framework\Commands\StubPublishCommand::class,
], ],
/* /*

View File

@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupStaticAttributes="false" xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php" bootstrap="vendor/autoload.php"
colors="true" colors="true"
convertErrorsToExceptions="true" >
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites> <testsuites>
<testsuite name="Feature"> <testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory> <directory suffix="Test.php">./tests/Feature</directory>
@@ -16,9 +12,9 @@
<directory suffix="Test.php">./tests/Unit</directory> <directory suffix="Test.php">./tests/Unit</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<coverage processUncoveredFiles="true"> <source>
<include> <include>
<directory suffix=".php">./app</directory> <directory suffix=".php">./app</directory>
</include> </include>
</coverage> </source>
</phpunit> </phpunit>

View File

@@ -3,15 +3,14 @@
namespace Tests; namespace Tests;
use Illuminate\Contracts\Console\Kernel; use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Application;
trait CreatesApplication trait CreatesApplication
{ {
/** /**
* Creates the application. * Creates the application.
*
* @return \Illuminate\Foundation\Application
*/ */
public function createApplication() public function createApplication(): Application
{ {
$app = require __DIR__.'/../bootstrap/app.php'; $app = require __DIR__.'/../bootstrap/app.php';

View File

@@ -1,7 +0,0 @@
<?php
test('inspiring command', function () {
$this->artisan('inspiring')
->expectsOutput('Simplicity is the ultimate sophistication.')
->assertExitCode(0);
});

View File

@@ -1,3 +1,45 @@
<?php <?php
/*
|--------------------------------------------------------------------------
| Test Case
|--------------------------------------------------------------------------
|
| The closure you provide to your test functions is always bound to a specific PHPUnit test
| case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
| need to change it using the "uses()" function to bind a different classes or traits.
|
*/
uses(Tests\TestCase::class)->in('Feature'); uses(Tests\TestCase::class)->in('Feature');
/*
|--------------------------------------------------------------------------
| Expectations
|--------------------------------------------------------------------------
|
| When you're writing tests, you often need to check that values meet certain conditions. The
| "expect()" function gives you access to a set of "expectations" methods that you can use
| to assert different things. Of course, you may extend the Expectation API at any time.
|
*/
expect()->extend('toBeOne', function () {
return $this->toBe(1);
});
/*
|--------------------------------------------------------------------------
| Functions
|--------------------------------------------------------------------------
|
| While Pest is very powerful out-of-the-box, you may have some testing code specific to your
| project that you don't want to repeat in every file. Here you can also expose helpers as
| global functions to help you to reduce the number of lines of code in your test files.
|
*/
function something(): void
{
// ..
}