-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENGCOM-6686: Github #26532: di:setup:compile fails with anonymous cla…
…sses #26533 - Merge Pull Request #26533 from joni-jones/magento2:G#26532 - Merged commits: 1. fd3f2a2 2. 136d559 3. 25fd925 4. e165d99
- Loading branch information
Showing
4 changed files
with
139 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...p/Test/Unit/Module/Di/_files/app/code/Magento/SomeModule/Model/StubWithAnonymousClass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\SomeModule\Model; | ||
|
||
use Magento\SomeModule\DummyFactory; | ||
|
||
class StubWithAnonymousClass | ||
{ | ||
/** | ||
* @var DummyFactory | ||
*/ | ||
private $factory; | ||
|
||
public function __construct(DummyFactory $factory) | ||
{ | ||
$this->factory = $factory; | ||
} | ||
|
||
public function getSerializable(): \JsonSerializable | ||
{ | ||
return new class() implements \JsonSerializable { | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function jsonSerialize() | ||
{ | ||
return [1, 2, 3]; | ||
} | ||
}; | ||
} | ||
} |