tag:github.com,2008:https://github.com/php-enspired/exceptable/releasesRelease notes from exceptable2024-03-20T01:50:21Ztag:github.com,2008:Repository/75152217/v5.02024-03-20T01:51:42ZVersion 5<h2>What's Changed</h2>
<ul>
<li>Version 5 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/adrian-enspired/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/adrian-enspired">@adrian-enspired</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2185235124" data-permission-text="Title is private" data-url="https://github.com/php-enspired/exceptable/issues/36" data-hovercard-type="pull_request" data-hovercard-url="/php-enspired/exceptable/pull/36/hovercard" href="https://github.com/php-enspired/exceptable/pull/36">#36</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a class="commit-link" href="https://github.com/php-enspired/exceptable/compare/v4.0...v5.0"><tt>v4.0...v5.0</tt></a></p>adrian-enspiredtag:github.com,2008:Repository/75152217/v4.02023-01-01T16:37:00Zv4.0<p>support for PHP 7.4, 8.0+</p>adrian-enspiredtag:github.com,2008:Repository/75152217/v3.22021-09-13T02:20:54Zv3.2<p>Fixes case where non-string values were being sent to message formatting functions.</p>adrian-enspiredtag:github.com,2008:Repository/75152217/v3.12020-11-11T01:41:24Zv3.1<h2>Functionality</h2>
<h3>clear handler hierarchy based on the exception's class and code</h3>
<p><code>Handler::handleException</code> now tries registered exception handlers in the following order:</p>
<ul>
<li>try handlers for concrete exception class + code</li>
<li>try handlers for concrete exception class catch-all</li>
<li>try handlers for parent exception class catch-all; iterate up inheritance chain</li>
<li>try handlers for <code>Throwable</code></li>
</ul>
<p>Notes:</p>
<ul>
<li>When a handler returns true, no further handlers will be tried.</li>
<li>Within each step, handlers will be tried in the order they were added.</li>
<li>A "catch-all" handler is one set to handle code <code>0</code>.</li>
</ul>
<p>Previously, invocation order for exception handlers was considered undefined, so this should have no/minimal backwards compatibility impact.</p>
<h2>Tests</h2>
<ul>
<li>added a few more tests</li>
</ul>
<h2>Documentation Fixes</h2>
<ul>
<li>corrected readme example</li>
</ul>adrian-enspiredtag:github.com,2008:Repository/75152217/3.02020-10-11T15:04:52ZVersion 3<ul>
<li>Support* for ICU locales, message formats, and resource bundles (optional; requires the intl extension)</li>
<li>Ready-to-extend (or just use) <code>Exceptable</code> classes based on the built-in SPL Exception classes</li>
<li>The generic <code>Exceptable</code> Exception base class has been removed</li>
<li>Introduces a "debug mode" for Handlers</li>
<li>Handlers are now Logger (e.g., Monolog)-aware</li>
</ul>adrian-enspiredtag:github.com,2008:Repository/75152217/2.02018-12-02T23:31:57Z2.0<ul>
<li>Abstracts base implementation as a Trait, so it can be used as a "mixin" for any Throwable subclass.</li>
<li>Improvements to the Handler class.</li>
<li>Removes support for php 7.0.</li>
</ul>adrian-enspiredtag:github.com,2008:Repository/75152217/1.2.22018-10-25T01:24:25Z1.2.2<p>Handler::throw() now respects @ error control operator</p>adrian-enspiredtag:github.com,2008:Repository/75152217/v1.2.12018-05-16T14:27:04Z1.2.1<p>bug fixes for Handler</p>adrian-enspiredtag:github.com,2008:Repository/75152217/v1.2.02018-04-19T00:55:07Z1.2.0<p>bugfixes: constructor was doing things in a subtly wrong order</p>adrian-enspiredtag:github.com,2008:Repository/75152217/1.1.12018-02-18T23:59:50Z1.1.1<p>corrected license identifier in composer.json.</p>adrian-enspired