Skip to content

Commit 91cd07b

Browse files
committed
Options: remove no longer used withProcessedClass() and getProcessedClass()
1 parent b83d56d commit 91cd07b

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111

1212
- PHPStan generics
1313

14+
### Removed
15+
16+
- `Options` - `withProcessedClass()`, `getProcessedClass()` - no longer used
17+
1418
## [0.3.0](https://github.com/orisai/object-mapper/compare/0.2.0...0.3.0) - 2025-01-21
1519

1620
### Added

src/Processing/DefaultProcessor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ private function processBase($data, string $class, ?Options $options, bool $init
114114
$meta = $this->metaCache[$class] ??= $this->metaLoader->load($class);
115115

116116
$options ??= new Options();
117-
$options = $options->withProcessedClass($class);
118117

119118
$dynamic = new DynamicContext($options, $initializeObjects);
120119
$call = new ProcessorCallContext(

src/Processing/Options.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
namespace Orisai\ObjectMapper\Processing;
44

55
use Orisai\Exceptions\Logic\InvalidState;
6-
use Orisai\ObjectMapper\MappedObject;
7-
use function array_keys;
86
use function get_class;
97
use function sprintf;
108

@@ -22,9 +20,6 @@ final class Options
2220
/** @var array<class-string, object> */
2321
private array $dynamicContexts = [];
2422

25-
/** @var array<class-string<MappedObject>, true> */
26-
private array $processedClasses = [];
27-
2823
public function __construct()
2924
{
3025
$this->requiredFields = RequiredFields::nonDefault();
@@ -109,25 +104,6 @@ public function getDynamicContext(string $class): object
109104
return $this->dynamicContexts[$class];
110105
}
111106

112-
/**
113-
* @param class-string<MappedObject> $class
114-
*/
115-
public function withProcessedClass(string $class): self
116-
{
117-
$self = clone $this;
118-
$self->processedClasses[$class] = true;
119-
120-
return $self;
121-
}
122-
123-
/**
124-
* @return list<class-string<MappedObject>>
125-
*/
126-
public function getProcessedClasses(): array
127-
{
128-
return array_keys($this->processedClasses);
129-
}
130-
131107
/**
132108
* @return static
133109
*/

0 commit comments

Comments
 (0)