Skip to content

Commit

Permalink
More posters
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed May 18, 2024
1 parent 8671aa1 commit 3cb6d59
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ What if you could snap your fingers and all of these comments magically turned i

PHPStan Pro introduces a **migration wizard** that's going to do this for you! Let's run PHPStan with `--pro` CLI option and see it in action:

<video class="w-full aspect-[1680/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline>
<video class="w-full aspect-[1680/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline poster="/tmp/images/ignore-line-wizard-poster.jpg">
<source src="/tmp/images/ignore-line-wizard.mp4" type="video/mp4">
</video>

Expand All @@ -120,15 +120,15 @@ I could continue down this unending embarassing list of shortcomings of the prev

The new version you'll get once you update to PHPStan 1.11 and launch Pro with `--pro` is much better. Let's have a look:

<video class="w-full aspect-[1652/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline>
<video class="w-full aspect-[1652/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline poster="/tmp/images/phpstan-pro-browsing-poster.jpg">
<source src="/tmp/images/phpstan-pro-browsing.mp4" type="video/mp4">
</video>

The layout is more natural and resembles an IDE. Each file is rendered just once and errors are attached to lines where they are reported. You can expand hidden lines to see more context around an error. Docker paths can be remapped so that editor links lead to the correct file.

PHPStan lets you see ignored errors too. If you've inherited a project and want to see what errors the previous team ignored, or if you want to check the errors lurking in your huge baseline, PHPStan Pro lets you do that with ease. By default it will show a small pill button you can use to see ignored errors near normally reported errors, but you can also change the setting to show and browse all ignored errors:

<video class="w-full aspect-[1656/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline>
<video class="w-full aspect-[1656/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline poster="/tmp/images/phpstan-pro-ignored-errors-poster.jpg">
<source src="/tmp/images/phpstan-pro-ignored-errors.mp4" type="video/mp4">
</video>

Expand Down
Binary file added website/src/images/ignore-line-wizard-poster.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion website/src/user-guide/baseline.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Viewing the baselined errors

Did you know [PHPStan Pro](https://phpstan.org/blog/introducing-phpstan-pro){.phpstan-pro-label} lets you browse ignored errors in a beautiful web UI, including those in your baseline? It shows the errors right on the line where they'd be reported if they weren't ignored:

<video class="w-full aspect-[1656/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline>
<video class="w-full aspect-[1656/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline poster="/tmp/images/phpstan-pro-ignored-errors-poster.jpg">
<source src="/tmp/images/phpstan-pro-ignored-errors.mp4" type="video/mp4">
</video>

Expand Down
2 changes: 1 addition & 1 deletion website/src/user-guide/command-line-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ By default PHPStan will not generate an empty baseline. However you can pass `--

Launches [PHPStan Pro](https://phpstan.org/blog/introducing-phpstan-pro){.phpstan-pro-label} which lets you browse errors (including ignored errors) in a beautiful web UI. Try it out by running PHPStan with `--pro` or by going to [account.phpstan.com](https://account.phpstan.com/) and creating an account.

<video class="w-full aspect-[1652/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline>
<video class="w-full aspect-[1652/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline poster="/tmp/images/phpstan-pro-browsing-poster.jpg">
<source src="/tmp/images/phpstan-pro-browsing.mp4" type="video/mp4">
</video>

Expand Down
4 changes: 2 additions & 2 deletions website/src/user-guide/ignoring-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ echo $foo;

If your codebase is currently full of `@phpstan-ignore-line` & `@phpstan-ignore-next-line` and you'd like to switch to identifier-specific `@phpstan-ignore`, you can use automatic migration wizard in [PHPStan Pro](https://phpstan.org/blog/introducing-phpstan-pro){.phpstan-pro-label} that will do it for you:

<video class="w-full aspect-[1680/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline>
<video class="w-full aspect-[1680/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline poster="/tmp/images/ignore-line-wizard-poster.jpg">
<source src="/tmp/images/ignore-line-wizard.mp4" type="video/mp4">
</video>

Expand Down Expand Up @@ -160,7 +160,7 @@ Viewing ignored errors

Did you know [PHPStan Pro](https://phpstan.org/blog/introducing-phpstan-pro){.phpstan-pro-label} lets you browse ignored errors in a beautiful web UI? It shows the errors right on the line where they'd be reported if they weren't ignored:

<video class="w-full aspect-[1656/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline>
<video class="w-full aspect-[1656/1080] mb-8 border border-gray-200 rounded-lg overflow-hidden" autoplay muted loop playsinline poster="/tmp/images/phpstan-pro-ignored-errors-poster.jpg">
<source src="/tmp/images/phpstan-pro-ignored-errors.mp4" type="video/mp4">
</video>

Expand Down

0 comments on commit 3cb6d59

Please sign in to comment.