Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpstan Exception Rules Laravel Package

pepakriz/phpstan-exception-rules

PHPStan extension that adds custom rules for analyzing exceptions. It helps catch improper throwing/catching, missing @throws annotations, and other exception-related issues to improve correctness and maintainability in PHP codebases.

View on GitHub
Deep Wiki
Context7
v0.12.0
v0.11.7
v0.11.6

Add SimpleXMLElementExtension

v0.11.5

Add DateIntervalExtension

v0.11.2
v0.11.1

Fixed

Fixed multiple DOMDocument signature (https://github.com/pepakriz/phpstan-exception-rules/pull/128)

v0.11.0

Changed

  • Remove ignoreDescriptiveUncheckedExceptions option (#119): uncheckedExceptions are now fully ignored so this option is not necessary.

FIxed

  • Handle [@throws](https://github.com/throws) void (#123)
v0.10.1

Improvements:

  • Extension for SplFileObject #112

Fixes:

  • ThrowsPhpDocRule: whitelisted method should not report Missing [@throws](https://github.com/throws) #107
  • ThrowsPhpDocRule: rule should not change AST #114
v0.10.0

PHPStan 0.12 support

v0.9.0

New features:

  • Unused [@throws](https://github.com/throws) reporting is disabled by default for subtypes without phpdoc. It can be enabled again by reportUnusedCheckedThrowsInSubtypes: true. What does it mean? You can remove all unnecessary [@throws](https://github.com/throws) void phpdoc when you preserve the default value. #95, #97, thanks @marcospassos

  • Error reporting can be disabled as per class basis. It's useful for TestCase methods etc. #93, thanks @marcospassos

  • New rule DeadCatchUnion which reports redundant types in catch statement. #96

Improvements:

  • Improved annotation reader to traverse class hierarchy #94, thanks @marcospassos
v0.8.3

Fixes:

  • Fixed nette DI deprecations (db16cb7b14e637cec8844b7d870727132fecc5ec)
v0.8.2

Improvements:

  • Added schema for configuration (421a6ffe113cab1291244d7eeda1b1ee234220b6), thanks @solcik
v0.8.1

Improvements:

  • Dependency on PHPStan\DependencyInjection\Container instead of Nette Container. It should fix compatibility with shim version. (a8eaa1ee4628aa589f243248a4c191887183a163)
v0.8.0

New features:

  • Allow [@throws](https://github.com/throws) void in annotation inheritance (702688c127a8b86e4f9c19feae25dc86f6135ec6)
  • Extension installer support (4180572568d1fcd8d8392233bd8f1aa4a2b48545)

Fixes:

  • Compatibility with the latest phpstan (b502e74c23e78e3a72e8d47f3ffaa3bdcb87163f)
v0.7.2

Improvements:

  • Added support for processing ArithmeticErrors with some native math operators (d15eba3400fe2665b634ac6c55f6c64ed1e7b408)
  • Added support for intdiv function (93aeda661111e5563271ca4d046745ffd7281791)
  • Internal: DI compiler extension is replaced by DynamicThrowTypeServiceFactory (5a90197f5f950783c85679c9b1331563d3f73f7c)
v0.7.1

Fixes:

  • Improved compatibility with bleeding-edge phpstan rules (7608f8f714b9f4fa5c29e4d847e8255b4cd9bd77)
v0.7.0

New features:

  • Report useless throws annotations (b478b965237f350f81d177070ac78e4a80e24d23)
  • reportCheckedThrowsInGlobalScope is enabled by default (c3be204a405c7273cd8eaaf7050199493185ad72)
v0.6.3

Fixes:

  • Fix crash reading annotations of anonymous classes (4a0f561b79e6fe5758074ad3ee228e2fe96ed11f), thanks @marcospassos
v0.6.2

Improvements:

  • Global scope support (1314ff56d65d53e2ba77f43025819a2e82d97b3c)
  • New config option reportCheckedThrowsInGlobalScope. It'll be enabled by default in next major release, so if you want to use it now, you must enable it in config. See readme. (1314ff56d65d53e2ba77f43025819a2e82d97b3c)
v0.6.1

Improvements:

  • Workaround for static::class in ReflectionExtension (53ebd083ab82a7b9c7e44bead34041a437b865cf)
v0.6.0

New features:

  • Add support for detecting exceptions thrown by magic methods (f5fdbcd5efd3630eb6c9157075b82cef59fef3bd), thanks @marcospassos
  • Add support for detecting exceptions thrown by static magic methods (2300a6783b32940bcef932401e9f1215aae83441), thanks @marcospassos
  • Add support for ignoring descriptive exceptions (138e5d15f2170f4db15d9b78fc2d75f71ba93f82), thanks @marcospassos
  • Consider default exceptions as possibly thrown exceptions (b8b93b8b8a5fde9c07c31cbd7097e831ea29fc87), thanks @marcospassos

Fixes:

  • Check unused [@throws](https://github.com/throws) annotations on functions (7e8629bc2c953ccc883871a5e8fe645f38d0c559), thanks @marcospassos
v0.5.0

Improvements:

  • Compatibility with phpstan 0.11 (c721804f81945ed82997c05a9aad3a45631051da), thanks @jakzal
v0.4.4

Improvements:

  • Add support for ReflectionObject and fix ReflectionZendExtension logic (69ec05cdbb198e38869e4027e64d6c944aae5eee), thanks @marcospassos
v0.4.3

Fixes:

  • Fixed DynamicThrowTypeService cache (83fd9a4cdd39a2721c01b27cbf92a1aff423fbd3)
v0.4.2

Fixes:

  • Detect thrown exceptions in functions (3ad10a52e520f6404e1279427aba74676d9ab8a7)
v0.4.1

Improvements:

  • Official PHP 7.3 support (a1cb24d0e6fc3dffdfcd7a1afccf34140895b9f1)

Fixes:

  • Composer branch alias (7a842fe0368480c1f5629cb10cf8f4796e6282e9)
  • Fixed double creation of virtual node when a trait is used (9d41e605f5437ad8f0508a59997c9fda4ecccfea)

New features:

  • Dynamic extension for json_encode and json_decode functions (b1c7fa5260b150d9a233b5f97ab1a3f4b2969db0)
v0.4.0

Improvements:

  • PHPStan 0.10.5 compatibility (66e821a797c58ddb2894154a4e48d9b13266dae0)

New features:

  • Anonymous classes support (49cb50a589a977ef743a4e536f7f8b7a1eaaacfa)
  • Dynamic extension for DateTime and DateTimeImmutable (fdac83b5cf27b7b1df048086ed8a463f077dc127)
  • Dynamic extension for Reflection classes (e7d1ef635f378d91abf62346718c5109600b5e62, a904c8ee4c7cd279e8ab9890594bdc40dd1f67e8)
v0.3.3

Fixes:

  • Methods of unknown classes are skipped from analysis (fd96c8737c7597ec4c9acf43aa34462272629b69)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport