Skip to content

Commit

Permalink
Merge branch 'master' of github.com:patrykbaszak/ultra-mapper into fe…
Browse files Browse the repository at this point in the history
…at/discriminator-extender
  • Loading branch information
patrykbaszak committed Jul 25, 2024
2 parents 8ce5c57 + 039374d commit 75167fa
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 21 deletions.
2 changes: 2 additions & 0 deletions src/Blueprint/Application/Model/Assets/ClassBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class ClassBlueprint implements Normalizable
{
use GetAttributes;

public const OPTIONS_BUILD_CONTEXT = 'buildContext';

/** @var array<string, mixed> */
public array $options = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class PropertyBlueprint implements Normalizable

public const OPTIONS_NAME = 'name';
public const OPTIONS_PATH = 'path';
public const OPTIONS_BUILD_CONTEXT = 'buildContext';

/** @var array<string, mixed> */
public array $options = [];
Expand Down
9 changes: 9 additions & 0 deletions src/Build/Application/Model/ClassBuildContext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

namespace PBaszak\UltraMapper\Build\Application\Model;

class ClassBuildContext
{
}
3 changes: 1 addition & 2 deletions src/Build/Application/Model/PropertyBuildContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

namespace PBaszak\UltraMapper\Build\Application\Model;

use PBaszak\UltraMapper\Build\Application\Model\Enum\AccessOption;
use PBaszak\UltraMapper\Build\Application\Model\Enum\AccessType;

class PropertyBuildContext
{
public ?AccessType $accessType = null;
/** @var array<AccessOption, mixed> */
/** @var array<string, mixed> where the key is from AccessOption */
public array $accessOptions = [];
}
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/Accessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(
) {
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// todo implement
}
Expand Down
4 changes: 2 additions & 2 deletions src/Mapper/Application/Attribute/ApplyToCollectionItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function __construct(
) {
}

/** @param \ReflectionProperty $reflection */
public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
/** @param \ReflectionProperty $reflector */
public function validate(\Reflector $reflector): void
{
// $class = $reflection->getDeclaringClass();

Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function __construct(
) {
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// todo: update the list of available placeholders
// if (str_replace([
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/Discriminator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(
) {
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// todo implement
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
$this->groups = is_array($groups) ? $groups : [$groups];
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// todo implement
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/Ignore.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(
) {
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// todo implement
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/MaxDepth.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(
) {
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// todo implement
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/SimpleObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
) {
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// todo implement
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/TargetPropertyName.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
) {
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// there cannot be two target properties with the same processType
// todo implement
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Application/Attribute/TargetPropertyPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
) {
}

public function validate(\ReflectionProperty|\ReflectionParameter|\ReflectionClass $reflection): void
public function validate(\Reflector $reflector): void
{
// there cannot be two target properties with the same processType
// todo implement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ blueprints:
defaultValue: null
filesHashes:
/app/tests/Assets/DummySimpleWithAttribute.php: 5de157db33ad5536dfb49fe841a058a3
/app/src/Mapper/Application/Attribute/Callback.php: 7ba81d4a5d36143504c6bcc2909e6a1c
/app/src/Mapper/Application/Attribute/Ignore.php: 3ff46e0eb1d09e4a9d5b7c97302034de
/app/src/Mapper/Application/Attribute/Callback.php: a8b352f51ce806632b4d7754b7bf5e91
/app/src/Mapper/Application/Attribute/Ignore.php: d8e23944de7bbbf374804f401dbf8b9f
events:
- 'Blueprint created. Root class: PBaszak\UltraMapper\Tests\Assets\DummySimpleWithAttribute.'
- 'Class Blueprint PBaszak\UltraMapper\Tests\Assets\DummySimpleWithAttribute added. Blueprint name: pbaszak_ultramapper_tests_assets_dummysimplewithattribute.'
- 'File hash added. File: /app/tests/Assets/DummySimpleWithAttribute.php, hash: 5de157db33ad5536dfb49fe841a058a3.'
- 'File hash added. File: /app/src/Mapper/Application/Attribute/Callback.php, hash: 7ba81d4a5d36143504c6bcc2909e6a1c.'
- 'File hash already exists. File: /app/src/Mapper/Application/Attribute/Callback.php, hash: 7ba81d4a5d36143504c6bcc2909e6a1c.'
- 'File hash added. File: /app/src/Mapper/Application/Attribute/Ignore.php, hash: 3ff46e0eb1d09e4a9d5b7c97302034de.'
- 'File hash already exists. File: /app/src/Mapper/Application/Attribute/Callback.php, hash: 7ba81d4a5d36143504c6bcc2909e6a1c.'
- 'File hash already exists. File: /app/src/Mapper/Application/Attribute/Callback.php, hash: 7ba81d4a5d36143504c6bcc2909e6a1c.'
- 'File hash already exists. File: /app/src/Mapper/Application/Attribute/Ignore.php, hash: 3ff46e0eb1d09e4a9d5b7c97302034de.'
- 'File hash added. File: /app/src/Mapper/Application/Attribute/Callback.php, hash: a8b352f51ce806632b4d7754b7bf5e91.'
- 'File hash already exists. File: /app/src/Mapper/Application/Attribute/Callback.php, hash: a8b352f51ce806632b4d7754b7bf5e91.'
- 'File hash added. File: /app/src/Mapper/Application/Attribute/Ignore.php, hash: d8e23944de7bbbf374804f401dbf8b9f.'
- 'File hash already exists. File: /app/src/Mapper/Application/Attribute/Callback.php, hash: a8b352f51ce806632b4d7754b7bf5e91.'
- 'File hash already exists. File: /app/src/Mapper/Application/Attribute/Callback.php, hash: a8b352f51ce806632b4d7754b7bf5e91.'
- 'File hash already exists. File: /app/src/Mapper/Application/Attribute/Ignore.php, hash: d8e23944de7bbbf374804f401dbf8b9f.'

0 comments on commit 75167fa

Please sign in to comment.