🔧 Upgrade dependencies and framework components

-  Update `composer.lock` and `.junie/guidelines.md` to include new versions for Pest v4, PHPUnit v12, Laravel framework (v12.51.0), and other dependencies.
- 📚 Add Pest v4 specific rules for browser testing, smoke testing, and visual regression tests to documentation.
- 🛠 Refactor related configs for upgraded dependency compatibility, ensuring cleaner and faster development debugging.
This commit is contained in:
HolgerHatGarKeineNode
2026-02-11 19:47:11 +01:00
parent eb9285d601
commit 04e7d87af6
5 changed files with 905 additions and 803 deletions

View File

@@ -19,8 +19,8 @@ This application is a Laravel application and its main Laravel ecosystems packag
- livewire/volt (VOLT) - v1 - livewire/volt (VOLT) - v1
- laravel/mcp (MCP) - v0 - laravel/mcp (MCP) - v0
- laravel/pint (PINT) - v1 - laravel/pint (PINT) - v1
- pestphp/pest (PEST) - v3 - pestphp/pest (PEST) - v4
- phpunit/phpunit (PHPUNIT) - v11 - phpunit/phpunit (PHPUNIT) - v12
- laravel-echo (ECHO) - v2 - laravel-echo (ECHO) - v2
- tailwindcss (TAILWINDCSS) - v4 - tailwindcss (TAILWINDCSS) - v4
@@ -438,6 +438,50 @@ it('has emails', function (string $email) {
]); ]);
</code-snippet> </code-snippet>
=== pest/v4 rules ===
## Pest 4
- Pest 4 is a huge upgrade to Pest and offers: browser testing, smoke testing, visual regression testing, test sharding, and faster type coverage.
- Browser testing is incredibly powerful and useful for this project.
- Browser tests should live in `tests/Browser/`.
- Use the `search-docs` tool for detailed guidance on utilizing these features.
### Browser Testing
- You can use Laravel features like `Event::fake()`, `assertAuthenticated()`, and model factories within Pest 4 browser tests, as well as `RefreshDatabase` (when needed) to ensure a clean state for each test.
- Interact with the page (click, type, scroll, select, submit, drag-and-drop, touch gestures, etc.) when appropriate to complete the test.
- If requested, test on multiple browsers (Chrome, Firefox, Safari).
- If requested, test on different devices and viewports (like iPhone 14 Pro, tablets, or custom breakpoints).
- Switch color schemes (light/dark mode) when appropriate.
- Take screenshots or pause tests for debugging when appropriate.
### Example Tests
<code-snippet name="Pest Browser Test Example" lang="php">
it('may reset the password', function () {
Notification::fake();
$this->actingAs(User::factory()->create());
$page = visit('/sign-in'); // Visit on a real browser...
$page->assertSee('Sign In')
->assertNoJavascriptErrors() // or ->assertNoConsoleLogs()
->click('Forgot Password?')
->fill('email', 'nuno@laravel.com')
->click('Send Reset Link')
->assertSee('We have emailed your password reset link!')
Notification::assertSent(ResetPassword::class);
});
</code-snippet>
<code-snippet name="Pest Smoke Testing Example" lang="php">
$pages = visit(['/', '/about', '/contact']);
$pages->assertNoJavascriptErrors()->assertNoConsoleLogs();
</code-snippet>
=== tailwindcss/core rules === === tailwindcss/core rules ===
## Tailwind CSS ## Tailwind CSS

View File

@@ -19,8 +19,8 @@ This application is a Laravel application and its main Laravel ecosystems packag
- livewire/volt (VOLT) - v1 - livewire/volt (VOLT) - v1
- laravel/mcp (MCP) - v0 - laravel/mcp (MCP) - v0
- laravel/pint (PINT) - v1 - laravel/pint (PINT) - v1
- pestphp/pest (PEST) - v3 - pestphp/pest (PEST) - v4
- phpunit/phpunit (PHPUNIT) - v11 - phpunit/phpunit (PHPUNIT) - v12
- laravel-echo (ECHO) - v2 - laravel-echo (ECHO) - v2
- tailwindcss (TAILWINDCSS) - v4 - tailwindcss (TAILWINDCSS) - v4
@@ -438,6 +438,50 @@ it('has emails', function (string $email) {
]); ]);
</code-snippet> </code-snippet>
=== pest/v4 rules ===
## Pest 4
- Pest 4 is a huge upgrade to Pest and offers: browser testing, smoke testing, visual regression testing, test sharding, and faster type coverage.
- Browser testing is incredibly powerful and useful for this project.
- Browser tests should live in `tests/Browser/`.
- Use the `search-docs` tool for detailed guidance on utilizing these features.
### Browser Testing
- You can use Laravel features like `Event::fake()`, `assertAuthenticated()`, and model factories within Pest 4 browser tests, as well as `RefreshDatabase` (when needed) to ensure a clean state for each test.
- Interact with the page (click, type, scroll, select, submit, drag-and-drop, touch gestures, etc.) when appropriate to complete the test.
- If requested, test on multiple browsers (Chrome, Firefox, Safari).
- If requested, test on different devices and viewports (like iPhone 14 Pro, tablets, or custom breakpoints).
- Switch color schemes (light/dark mode) when appropriate.
- Take screenshots or pause tests for debugging when appropriate.
### Example Tests
<code-snippet name="Pest Browser Test Example" lang="php">
it('may reset the password', function () {
Notification::fake();
$this->actingAs(User::factory()->create());
$page = visit('/sign-in'); // Visit on a real browser...
$page->assertSee('Sign In')
->assertNoJavascriptErrors() // or ->assertNoConsoleLogs()
->click('Forgot Password?')
->fill('email', 'nuno@laravel.com')
->click('Send Reset Link')
->assertSee('We have emailed your password reset link!')
Notification::assertSent(ResetPassword::class);
});
</code-snippet>
<code-snippet name="Pest Smoke Testing Example" lang="php">
$pages = visit(['/', '/about', '/contact']);
$pages->assertNoJavascriptErrors()->assertNoConsoleLogs();
</code-snippet>
=== tailwindcss/core rules === === tailwindcss/core rules ===
## Tailwind CSS ## Tailwind CSS

View File

@@ -19,8 +19,8 @@ This application is a Laravel application and its main Laravel ecosystems packag
- livewire/volt (VOLT) - v1 - livewire/volt (VOLT) - v1
- laravel/mcp (MCP) - v0 - laravel/mcp (MCP) - v0
- laravel/pint (PINT) - v1 - laravel/pint (PINT) - v1
- pestphp/pest (PEST) - v3 - pestphp/pest (PEST) - v4
- phpunit/phpunit (PHPUNIT) - v11 - phpunit/phpunit (PHPUNIT) - v12
- laravel-echo (ECHO) - v2 - laravel-echo (ECHO) - v2
- tailwindcss (TAILWINDCSS) - v4 - tailwindcss (TAILWINDCSS) - v4
@@ -438,6 +438,50 @@ it('has emails', function (string $email) {
]); ]);
</code-snippet> </code-snippet>
=== pest/v4 rules ===
## Pest 4
- Pest 4 is a huge upgrade to Pest and offers: browser testing, smoke testing, visual regression testing, test sharding, and faster type coverage.
- Browser testing is incredibly powerful and useful for this project.
- Browser tests should live in `tests/Browser/`.
- Use the `search-docs` tool for detailed guidance on utilizing these features.
### Browser Testing
- You can use Laravel features like `Event::fake()`, `assertAuthenticated()`, and model factories within Pest 4 browser tests, as well as `RefreshDatabase` (when needed) to ensure a clean state for each test.
- Interact with the page (click, type, scroll, select, submit, drag-and-drop, touch gestures, etc.) when appropriate to complete the test.
- If requested, test on multiple browsers (Chrome, Firefox, Safari).
- If requested, test on different devices and viewports (like iPhone 14 Pro, tablets, or custom breakpoints).
- Switch color schemes (light/dark mode) when appropriate.
- Take screenshots or pause tests for debugging when appropriate.
### Example Tests
<code-snippet name="Pest Browser Test Example" lang="php">
it('may reset the password', function () {
Notification::fake();
$this->actingAs(User::factory()->create());
$page = visit('/sign-in'); // Visit on a real browser...
$page->assertSee('Sign In')
->assertNoJavascriptErrors() // or ->assertNoConsoleLogs()
->click('Forgot Password?')
->fill('email', 'nuno@laravel.com')
->click('Send Reset Link')
->assertSee('We have emailed your password reset link!')
Notification::assertSent(ResetPassword::class);
});
</code-snippet>
<code-snippet name="Pest Smoke Testing Example" lang="php">
$pages = visit(['/', '/about', '/contact']);
$pages->assertNoJavascriptErrors()->assertNoConsoleLogs();
</code-snippet>
=== tailwindcss/core rules === === tailwindcss/core rules ===
## Tailwind CSS ## Tailwind CSS

View File

@@ -44,8 +44,8 @@
"laravel/pint": "^1.13", "laravel/pint": "^1.13",
"mockery/mockery": "^1.6", "mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.8.2", "nunomaduro/collision": "^8.8.2",
"pestphp/pest": "^3.0", "pestphp/pest": "^4.3",
"pestphp/pest-plugin-laravel": "^3.0" "pestphp/pest-plugin-laravel": "^4.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

1560
composer.lock generated

File diff suppressed because it is too large Load Diff