Skip to content

Commit

Permalink
Remove StaticReflectionService
Browse files Browse the repository at this point in the history
Additionally, implementations of ReflectionService may no longer return
null for calls to getClass().
  • Loading branch information
greg0ire committed Jun 23, 2024
1 parent 1996fcd commit 26288e5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 120 deletions.
10 changes: 10 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ awareness about deprecated code.

# Upgrade to 4.0

## BC Break: Removed `StaticReflectionService`

The class `Doctrine\Persistence\Mapping\StaticReflectionService` is removed
without replacement.

## BC Break: Narrowed `ReflectionService::getClass()` return type

The return type of `ReflectionService::getClass()` has been narrowed so that
`null` is no longer a valid return value.

## BC Break: Added `ObjectManager::isUninitializedObject()`

Classes implementing `Doctrine\Persistence\ObjectManager` must implement this
Expand Down
4 changes: 2 additions & 2 deletions src/Persistence/Mapping/ReflectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public function getClassNamespace(string $class): string;
*
* @psalm-param class-string<T> $class
*
* @psalm-return ReflectionClass<T>|null
* @psalm-return ReflectionClass<T>
*
* @template T of object
*/
public function getClass(string $class): ReflectionClass|null;
public function getClass(string $class): ReflectionClass;

/**
* Returns an accessible property (setAccessible(true)) or null.
Expand Down
67 changes: 0 additions & 67 deletions src/Persistence/Mapping/StaticReflectionService.php

This file was deleted.

51 changes: 0 additions & 51 deletions tests/Persistence/Mapping/StaticReflectionServiceTest.php

This file was deleted.

0 comments on commit 26288e5

Please sign in to comment.