Skip to content

Commit

Permalink
Merge pull request #74 from emachiels/feature/php-8-support
Browse files Browse the repository at this point in the history
Changed minimal php version to 8
  • Loading branch information
christophrumpel committed Apr 4, 2022
2 parents da285fc + b488b3d commit 873dc87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.4]
php: [8.0]
laravel: [8.*]
dependency-version: [prefer-stable]
include:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
}
],
"require": {
"php": "^7.4",
"php": "^8.0",
"christophrumpel/laravel-command-file-picker": "^1.1",
"illuminate/support": "^8.0",
"laravel/framework": "^8.0",
"nikic/php-parser": "^4.3",
"roave/better-reflection": "^4.9"
"roave/better-reflection": "^5.3"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
Expand Down
8 changes: 4 additions & 4 deletions src/LaravelFactoryExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public function getUses(): string

public function getDefinitions(): string
{
$classInfo = (new BetterReflection())->classReflector()
->reflect(get_class($this->factory));
$classInfo = (new BetterReflection())->reflector()
->reflectClass(get_class($this->factory));

return $classInfo->getMethod('definition')
->getBodyCode();
Expand Down Expand Up @@ -227,8 +227,8 @@ protected function parseUseStatements(ReflectionFunction $reflection): void

public function getStates(): string
{
$factoryReflection = (new BetterReflection())->classReflector()
->reflect(get_class($this->factory));
$factoryReflection = (new BetterReflection())->reflector()
->reflectClass(get_class($this->factory));

$factoryFileName = $factoryReflection->getFileName();
$factoryMethods = $factoryReflection->getMethods();
Expand Down

0 comments on commit 873dc87

Please sign in to comment.