Skip to content

Commit

Permalink
feat: drop php 8.1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
regnerisch committed Nov 30, 2023
1 parent 8c35350 commit e538300
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
php: ['8.1', '8.2', '8.3']
php: ['8.2', '8.3']

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
}
],
"require": {
"php": "^8.1",
"ext-fileinfo": "^8.1",
"php": "^8.2",
"ext-fileinfo": "^8.2",
"illuminate/support": "^10.0",
"illuminate/console": "^10.0",
"illuminate/filesystem": "^10.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Actions/NormalizePathAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class NormalizePathAction
{
/**
* @param array<string>|string $path
* @param array<string>|string $path
* @return array<string>|string
*/
public function execute(array|string $path): array|string
Expand Down
4 changes: 2 additions & 2 deletions src/NameResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ private function init(): void
);

$this->path = sprintf(
'%s'.DIRECTORY_SEPARATOR.$this->command->getFileNameTemplate(),
Str::lcfirst(Str::replace('\\', DIRECTORY_SEPARATOR, $this->namespace)),
'%s/'.$this->command->getFileNameTemplate(),
Str::lcfirst(Str::replace('\\', '/', $this->namespace)),
$this->className,
);
}
Expand Down
6 changes: 2 additions & 4 deletions src/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function beyond_path(): string
if (! function_exists('beyond_modules_path')) {
function beyond_modules_path(string $path = ''): string
{
return base_path('modules'.DIRECTORY_SEPARATOR.$path);
return base_path('modules/'.$path);
}
}

Expand Down Expand Up @@ -62,13 +62,11 @@ function beyond_get_choices(string $path): array

$fs->ensureDirectoryExists($path);

$directories = array_map(
return array_map(
function ($directory) {
return last(explode(DIRECTORY_SEPARATOR, $directory));
},
$fs->directories($path)
);

return $directories;
}
}
18 changes: 17 additions & 1 deletion stubs/deptrac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ deptrac:
-
type: className
value: .*\\App\\Controllers\\.*
-
name: Job
collectors:
-
type: className
value: .*\\App\\Jobs\\.*
-
name: Model
collectors:
Expand All @@ -46,9 +52,17 @@ deptrac:
-
type: className
value: .*\\App\\Processes\\.*
-
name: Query
collectors:
-
type: className
value: .*\\App\\Queries\\.*
ruleset:
Controller:
- Job
- Process
- Query
Process:
- Action
- DataObject
Expand All @@ -59,4 +73,6 @@ deptrac:
Model:
- Builder
- Collection
Builder: ~
Builder: ~
Query:
- Model

0 comments on commit e538300

Please sign in to comment.