Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies #54

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check & fix styling
name: Fix PHP code style issues

on: [push]

Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@ jobs:
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]
laravel: [10.*, 11.*]
laravel-data: [^3.0, ^4.0]
laravel: [11.*]
laravel-data: [^4.0]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 11.*
laravel-data: ^3.0

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

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# An opinionated package to generate classes in your Laravel project

[![Latest Version on Packagist](https://img.shields.io/packagist/v/soyhuce/laravel-somake.svg?style=flat-square)](https://packagist.org/packages/soyhuce/laravel-somake)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/soyhuce/laravel-somake/run-tests?label=tests)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/soyhuce/laravel-somake/Check%20&%20fix%20styling?label=code%20style)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain)
[![GitHub PHPStan Action Status](https://img.shields.io/github/workflow/status/soyhuce/laravel-somake/PHPStan?label=phpstan)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3APHPStan+branch%3Amain)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/soyhuce/laravel-somake/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/soyhuce/laravel-somake/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![GitHub PHPStan Action Status](https://img.shields.io/github/actions/workflow/status/soyhuce/laravel-somake/phpstan.yml?branch=main&label=PHPStan&style=flat-square)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3A"PHPStan"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/soyhuce/laravel-somake.svg?style=flat-square)](https://packagist.org/packages/soyhuce/laravel-somake)

A set of commands to easily generate classes on the right place.
Expand Down
24 changes: 12 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@
"require": {
"php": "^8.2",
"composer-runtime-api": "^2.0",
"illuminate/console": "^10.17.1 || ^11.0",
"illuminate/contracts": "^10.17.1 || ^11.0",
"illuminate/filesystem": "^10.17.1 || ^11.0",
"illuminate/support": "^10.17.1 || ^11.0",
"laravel/prompts": "^0.1.3",
"phpstan/phpdoc-parser": "^1.2.0",
"soyhuce/classmap-generator": "^1.0",
"composer/class-map-generator": "^1.4",
"illuminate/console": "^11.0",
"illuminate/contracts": "^11.0",
"illuminate/filesystem": "^11.0",
"illuminate/support": "^11.0",
"laravel/prompts": "^0.3.1",
"phpstan/phpdoc-parser": "^2.0",
"spatie/fork": "^1.1",
"spatie/laravel-package-tools": "^1.11"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.7",
"nunomaduro/collision": "^7.7 || ^8.0",
"larastan/larastan": "^2.6.4",
"orchestra/testbench": "^8.0 || ^9.0",
"nunomaduro/collision": "^8.0",
"larastan/larastan": "^3.0",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.12",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"spatie/laravel-data": "^3.0 || ^4.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"spatie/laravel-data": "^4.0",
"spatie/pest-plugin-snapshots": "^2.0.1",
"test-laravel/test-laravel": "*"
},
Expand Down
181 changes: 107 additions & 74 deletions phpstan-baseline.neon

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ parameters:
- config
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: true

1 change: 1 addition & 0 deletions src/Commands/TestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use function Laravel\Prompts\outro;
use function Laravel\Prompts\select;
use function Laravel\Prompts\text;
use function sprintf;

class TestCommand extends Command
{
Expand Down
10 changes: 7 additions & 3 deletions src/Domains/DocBlock/DocBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use PHPStan\PhpDocParser\Parser\PhpDocParser;
use PHPStan\PhpDocParser\Parser\TokenIterator;
use PHPStan\PhpDocParser\Parser\TypeParser;
use PHPStan\PhpDocParser\ParserConfig;
use ReflectionClass;
use function in_array;

Expand All @@ -21,9 +22,12 @@ class DocBlock

public function __construct()
{
$constExprParser = new ConstExprParser();
$this->lexer = new Lexer();
$this->phpDocParser = new PhpDocParser(new TypeParser($constExprParser), $constExprParser);
$config = new ParserConfig([]);
$constExprParser = new ConstExprParser($config);
$typeParser = new TypeParser($config, $constExprParser);

$this->lexer = new Lexer($config);
$this->phpDocParser = new PhpDocParser($config, $typeParser, $constExprParser);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/Domains/Test/TestNameGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Soyhuce\Somake\Domains\Test;

use Illuminate\Support\Str;
use function sprintf;

class TestNameGuesser
{
Expand Down
6 changes: 4 additions & 2 deletions src/Support/FileOpener.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
namespace Soyhuce\Somake\Support;

use Illuminate\Support\Collection;
use Illuminate\Support\Env;
use Spatie\Fork\Fork;
use Symfony\Component\Process\Process;
use function is_string;

class FileOpener
{
Expand All @@ -27,8 +29,8 @@ public function openFiles(): void
return;
}

$ide = env('IDE');
if ($ide === null) {
$ide = Env::get('IDE');
if (!is_string($ide)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Support/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Soyhuce\Somake\Support;

use Composer\ClassMapGenerator\ClassMapGenerator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
use Soyhuce\ClassMapGenerator\ClassMapGenerator;
use Spatie\LaravelData\Data;
use Throwable;

Expand Down
2 changes: 1 addition & 1 deletion test-laravel/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"php": "^8.2"
},
"require-dev": {
"spatie/laravel-data": "^3.0 || ^4.0"
"spatie/laravel-data": "^4.0"
},
"config": {
"optimize-autoloader": true,
Expand Down