Skip to content

Commit

Permalink
Update v0.1.1 (#7)
Browse files Browse the repository at this point in the history
* Update v0.1.1 (#6)

* Update composer.json

* Update dependabot.yml

* Update phpstan.yml

* Update default stub dir

* Update stub dir, base path

* Fix typo

* Update Pest(TestCase)

* Update GitHub Actions

* Update run-tests.yml

* Fix typo

* Fix versions

* Update run-tests.yml

* Remove php 8.1 testing

* Fix typo

* Fix typo

* Update composer.json

* Update run-tests.yml

* Update run-tests.yml

* Fix typo

* Fix typo

* Bump ramsey/composer-install from 2 to 3 (#2)

Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3.
- [Release notes](https://github.com/ramsey/composer-install/releases)
- [Commits](ramsey/composer-install@v2...v3)

---
updated-dependencies:
- dependency-name: ramsey/composer-install
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kimchanhyung98 <[email protected]>

* Bump aglipanci/laravel-pint-action from 2.3.1 to 2.4 (#4)

Bumps [aglipanci/laravel-pint-action](https://github.com/aglipanci/laravel-pint-action) from 2.3.1 to 2.4.
- [Release notes](https://github.com/aglipanci/laravel-pint-action/releases)
- [Commits](aglipanci/laravel-pint-action@2.3.1...2.4)

---
updated-dependencies:
- dependency-name: aglipanci/laravel-pint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kimchanhyung98 <[email protected]>

* Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 (#5)

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.6.0 to 2.1.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](dependabot/fetch-metadata@v1.6.0...v2.1.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kimchanhyung98 <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
kimchanhyung98 and dependabot[bot] authored May 21, 2024
1 parent 73d2ae1 commit df2fe1e
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 50 deletions.
5 changes: 2 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
labels:
- "dependencies"

- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
labels:
- "dependencies"
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@2.3.1
uses: aglipanci/laravel-pint-action@2.4

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
paths:
- '**.php'
- 'phpstan.neon.dist'
- '.github/workflows/phpstan.yml'

jobs:
phpstan:
Expand All @@ -22,7 +21,7 @@ jobs:
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
18 changes: 9 additions & 9 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2, 8.1]
laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
carbon: ^2.63
os: [ ubuntu-latest, macos-latest ]
stability: [ prefer-stable ]
php: [ 8.1, 8.2, 8.3 ]
laravel: [ 10.*, 11.* ]
carbon: [ '^2.67' ]
exclude:
- php: 8.1
laravel: 11.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand All @@ -45,7 +45,7 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.laravel == '11.*' && '9.*' || '8.*' }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Update Changelog"

on:
release:
types: [released]
types: [ released ]

permissions:
contents: write
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ composer.lock
coverage
docs
phpunit.xml
phpstan.neon
testbench.yaml
vendor
node_modules
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
],
"require": {
"php": "^8.1",
"spatie/laravel-package-tools": "^1.14.0",
"illuminate/contracts": "^10.0"
"spatie/laravel-package-tools": "^1.14.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.8",
"larastan/larastan": "^2.0.1",
"orchestra/testbench": "^8.8",
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.0|^8.0",
"orchestra/testbench": "^8.0|^9.0",
"pestphp/pest": "^2.20",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"roave/security-advisories": "dev-latest",
"spatie/laravel-ray": "^1.26"
},
"autoload": {
Expand Down
5 changes: 3 additions & 2 deletions config/maker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
return [
'action' => [
'namespace' => 'App\Actions',
'stub' => __DIR__.'/../stubs/action.stub',
'stub' => __DIR__.'/../src/Stubs/action.stub',
],
'service' => [
'namespace' => 'App\Services',
'stub' => __DIR__.'/../stubs/service.stub',
'stub' => __DIR__.'/../src/Stubs/service.stub',
// 'stub' => __DIR__.'/../Stubs/service.stub',
],
];
Empty file removed phpstan-baseline.neon
Empty file.
9 changes: 9 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
parameters:
level: 5
paths:
- src
- config
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false
33 changes: 9 additions & 24 deletions tests/MakeTest.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
<?php

namespace Kimchanhyung98\LaravelMaker\Tests;
use function Pest\Laravel\artisan;

use Kimchanhyung98\LaravelMaker\MakerServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;
it('executed artisan make:action command', function () {
artisan('make:action', ['name' => 'SampleAction'])->assertExitCode(0);
expect(file_exists(app_path('Actions/SampleAction.php')))->toBeTrue();
});

class MakeTest extends Orchestra
{
protected function getPackageProviders($app): array
{
return [
MakerServiceProvider::class,
];
}

public function test_artisan_make_action_command(): void
{
$this->artisan('make:action SampleAction')->assertSuccessful();
$this->assertFileExists(app_path('Actions/SampleAction.php'));
}

public function test_artisan_make_service_command(): void
{
$this->artisan('make:service SampleService')->assertSuccessful();
$this->assertFileExists(app_path('Services/SampleService.php'));
}
}
it('executed artisan make:service command', function () {
artisan('make:service', ['name' => 'SampleService'])->assertExitCode(0);
expect(file_exists(app_path('Services/SampleService.php')))->toBeTrue();
});
5 changes: 5 additions & 0 deletions tests/Pest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

use Kimchanhyung98\LaravelMaker\Tests\TestCase;

uses(TestCase::class)->in(__DIR__);
16 changes: 16 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Kimchanhyung98\LaravelMaker\Tests;

use Kimchanhyung98\LaravelMaker\MakerServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;

class TestCase extends Orchestra
{
protected function getPackageProviders($app): array
{
return [
MakerServiceProvider::class,
];
}
}

0 comments on commit df2fe1e

Please sign in to comment.