Skip to content

Commit

Permalink
11.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Sep 7, 2024
1 parent 97ad9b2 commit 375df72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
10 changes: 1 addition & 9 deletions Core/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,5 @@ protected function prev():T {return $this->getPrevious();}
* @used-by df_error_create()
* @used-by \Df\Qa\Failure\Exception::i()
*/
final static function wrap(T $r, array $d = []):self {
if (!$r instanceof self) {
$r = new self($r);
}
# 2024-05-20 "Provide an ability to specify a context for a `Df\Core\Exception` instance":
# https://github.com/mage2pro/core/issues/375
$r->context($d);
return $r;
}
final static function wrap(T $r):self {return $r instanceof self ? $r : new self($r);}
}
3 changes: 2 additions & 1 deletion Qa/lib/validation/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ function df_error_create(...$a):DFE {/** @var DFE $r */
$context = !$hasContext ? [] : df_eta($a1); /** @var array(string => mixed) $context */
if (df_is_th($a0)) {
df_assert($hasContext);
$r = DFE::wrap($a0, $context);
$r = DFE::wrap($a0);
$r->context($context);
}
else {
if (is_array($a0)) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/core"
,"version": "11.3.9"
,"version": "11.4.0"
,"description": "Mage2.PRO core package."
,"type": "magento2-module"
,"homepage": "https://mage2.pro"
Expand Down

0 comments on commit 375df72

Please sign in to comment.