Skip to content

Commit

Permalink
Add default packages and edit project info. Add Empty commands
Browse files Browse the repository at this point in the history
  • Loading branch information
danielebarbaro committed Nov 26, 2024
1 parent 237ee73 commit 753066f
Show file tree
Hide file tree
Showing 11 changed files with 628 additions and 106 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Fix Code Style

on: [ push ]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ 8.3 ]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, dom, curl, libxml, mbstring
coverage: none

- name: Install Pint
run: composer global require laravel/pint

- name: Run Pint
run: pint

- name: Commit linted files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "🎨Fixes coding style with Pint"
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,20 @@
/.vscode
/.vagrant
.phpunit.result.cache
.php-cs-fixer.cache
phpunit.xml
phpstan.neon
*.cache
*.log
builds/*
!builds/.gitignore

# Do not collect servers
openswoole-server.php
openswoole-server.php.bak
openswoole-server-test.php

# Do not collect openapi files
openapi.yml
openapi.yaml
openapi.json
34 changes: 34 additions & 0 deletions app/Commands/BrewCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace App\Commands;

use Illuminate\Console\Scheduling\Schedule;
use LaravelZero\Framework\Commands\Command;

class BrewCommand extends Command
{
protected $signature = 'brew
{spec : Path to your magical OpenAPI specification}
{--port=9501 : Which port to enchant}
{--host=127.0.0.1 : Which realm to bind to}
{--workers=4 : Number of worker processes}
{--output=openswoole-server.php : Output file for the generated server}';

protected $description = '🧙‍♂️ Brew a magical mock server from your OpenAPI specification';

/**
* Execute the console command.
*/
public function handle()
{
//
}

/**
* Define the command's schedule.
*/
public function schedule(Schedule $schedule): void
{
// $schedule->command(static::class)->everyMinute();
}
}
48 changes: 0 additions & 48 deletions app/Commands/InspireCommand.php

This file was deleted.

29 changes: 29 additions & 0 deletions app/Commands/ValidateCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace App\Commands;

use Illuminate\Console\Scheduling\Schedule;
use LaravelZero\Framework\Commands\Command;

class ValidateCommand extends Command
{
protected $signature = 'validate {spec : Path to your OpenAPI specification}';

protected $description = '🔍 Validate your OpenAPI specification';

/**
* Execute the console command.
*/
public function handle()
{
//
}

/**
* Define the command's schedule.
*/
public function schedule(Schedule $schedule): void
{
// $schedule->command(static::class)->everyMinute();
}
}
40 changes: 23 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
{
"name": "laravel-zero/laravel-zero",
"description": "The Laravel Zero Framework.",
"keywords": ["framework", "laravel", "laravel zero", "console", "cli"],
"homepage": "https://laravel-zero.com",
"name": "danielebarbaro/apiswookery",
"description": "🧙‍♂️ The magical Swoole API mocking tool - Transform your OpenAPI specs into mock servers with a wave of your wand!",
"keywords": ["swoole", "openapi", "mock", "api", "testing","openswoole-server", "mock-server", "swagger"],
"homepage": "https://github.com/danielebarbaro/apiswookery",
"type": "project",
"license": "MIT",
"support": {
"issues": "https://github.com/laravel-zero/laravel-zero/issues",
"source": "https://github.com/laravel-zero/laravel-zero"
},
"authors": [
{
"name": "Nuno Maduro",
"email": "enunomaduro@gmail.com"
"name": "Daniele Barbaro",
"email": "barbaro.daniele@gmail.com"
}
],
"require": {
"php": "^8.2.0",
"laravel-zero/framework": "^11.0.2"
"php": "^8.3",
"ext-openswoole": "*",
"fakerphp/faker": "^1.24",
"laravel-zero/framework": "^11.0.2",
"nette/php-generator": "*",
"nikic/php-parser": "^5.3",
"psr/log": "^3.0",
"symfony/validator": "^7.1",
"symfony/yaml": "^7.1"
},
"require-dev": {
"laravel/pint": "^1.18.1",
"mockery/mockery": "^1.6.12",
"pestphp/pest": "^3.5.1"
"pestphp/pest": "^3.5.1",
"openswoole/ide-helper": "^22.1"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
"App\\": "app/"
}
},
"autoload-dev": {
Expand All @@ -46,5 +48,9 @@
},
"minimum-stability": "stable",
"prefer-stable": true,
"bin": ["apiswookery"]
"bin": ["apiswookery"],
"scripts": {
"test": "pest",
"format": "pint"
}
}
Loading

0 comments on commit 753066f

Please sign in to comment.