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
<?php | |
… | |
class MyBatchHandler implements BatchHandlerInterface | |
{ | |
use BatchHandlerTrait; | |
public function __invoke(MyMessage $message, Acknowledger $ack = null) | |
{ | |
return $this->handle($message, $ack); | |
} |
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
<?php | |
… | |
$documents = []; | |
foreach ($jobs as [$job, $ack]) { | |
try { | |
$documents[] = $this->solrService->createDocument($job->something()); | |
$ack->ack($job); | |
} catch (\Exception $e) { | |
$ack->nack($e); | |
} |
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
<?php | |
… | |
/** @var AckStamp $ackStamp */ | |
if ($batchHandler && $ackStamp = $envelope->last(AckStamp::class)) { | |
$ack = new Acknowledger(get_debug_type($batchHandler), static function (\Throwable $e = null, $result = null) use ($envelope, $ackStamp, $handlerDescriptor) { | |
if (null !== $e) { | |
$e = new HandlerFailedException($envelope, [$e]); | |
} else { | |
$envelope = $envelope->with(HandledStamp::fromDescriptor($handlerDescriptor, $result)); |
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
<?php | |
declare(strict_types=1); | |
namespace App\Something\Infrastructure\Doctrine\EventSubscriber; | |
use App\Something\Domain\Contracts\ContainsNullableEmbeddable; | |
use App\Something\Domain\Contracts\NullableEmbeddable as NullableEmbeddableInterface; | |
use Doctrine\Common\EventSubscriber; | |
use Doctrine\ORM\Event\LifecycleEventArgs; |
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
<?php | |
declare(strict_types=1); | |
namespace App\Something\Domain\Entity; | |
/** | |
* @ORM\Entity | |
*/ | |
class Person extends DomainEntity implements ContainsNullableEmbeddable |
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
<?php | |
declare(strict_types=1); | |
namespace App\Something\Domain\ValueObject; | |
use Webmozart\Assert\Assert; | |
/** | |
* @Embeddable |
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
<?php | |
declare(strict_types=1); | |
namespace App\Something\Domain\Contracts; | |
interface ContainsNullableEmbeddable | |
{ | |
} |
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
<?php | |
declare(strict_types=1); | |
namespace App\Something\Domain\Contracts; | |
interface NullableEmbeddable | |
{ | |
} |
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
<?php | |
declare(strict_types=1); | |
namespace App\Something\Domain\Entity; | |
/** | |
* @ORM\Entity | |
*/ | |
class Person extends DomainEntity |
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
<f:section name="LanguageMenu"> | |
<f:if condition="({menu.0.active} && {menu.1.available} && {n:translationAvailable(languageId: 1)}) || ({menu.1.active} && {menu.0.available} && {n:translationAvailable(languageId: 0)})"> | |
<div class="language-switch"> | |
<ul> | |
… |
NewerOlder