Skip to content

Commit 81e0ed4

Browse files
authored
Use major.minor PHP version in guidelines instead of full version (#657)
1 parent dc4a78a commit 81e0ed4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.ai/foundation.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
## Foundational Context
99
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.
1010

11-
- php - {{ PHP_VERSION }}
11+
- php - {{ PHP_MAJOR_VERSION }}.{{ PHP_MINOR_VERSION }}
1212
@foreach (app(\Laravel\Roster\Roster::class)->packages()->unique(fn ($package) => $package->rawName()) as $package)
1313
- {{ $package->rawName() }} ({{ $package->name() }}) - v{{ $package->majorVersion() }}
1414
@endforeach

src/Mcp/Tools/ApplicationInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(protected Roster $roster, protected GuidelineAssist
3131
public function handle(Request $request): Response
3232
{
3333
return Response::json([
34-
'php_version' => PHP_VERSION,
34+
'php_version' => PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION,
3535
'laravel_version' => app()->version(),
3636
'database_engine' => config('database.default'),
3737
'packages' => $this->roster->packages()->map(fn (Package $package): array => ['roster_name' => $package->name(), 'version' => $package->version(), 'package_name' => $package->rawName()]),

tests/Feature/Mcp/Tools/ApplicationInfoTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
expect($response)->isToolResult()
3232
->toolHasNoError()
3333
->toolJsonContentToMatchArray([
34-
'php_version' => PHP_VERSION,
34+
'php_version' => PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION,
3535
'laravel_version' => app()->version(),
3636
'database_engine' => config('database.default'),
3737
'packages' => [
@@ -66,7 +66,7 @@
6666
expect($response)->isToolResult()
6767
->toolHasNoError()
6868
->toolJsonContentToMatchArray([
69-
'php_version' => PHP_VERSION,
69+
'php_version' => PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION,
7070
'laravel_version' => app()->version(),
7171
'database_engine' => config('database.default'),
7272
'packages' => [],

0 commit comments

Comments
 (0)