-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes necessary for compatibility with ORM 3 #373
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
* | ||
* @return ReflectionClass<T> | ||
*/ | ||
public function getReflectionClass(): ReflectionClass; | ||
public function getReflectionClass(); | ||
Check failure on line 38 in src/Persistence/Mapping/ClassMetadata.php GitHub Actions / Coding Standards / Coding Standards (8.3)
|
||
|
||
/** Checks if the given field name is a mapped identifier for this class. */ | ||
public function isIdentifier(string $fieldName): bool; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ | |
* | ||
* @throws MappingException | ||
*/ | ||
public function getElement(string $className): ClassMetadata | ||
public function getElement(string $className) | ||
Check failure on line 74 in src/Persistence/Mapping/Driver/FileDriver.php GitHub Actions / Coding Standards / Coding Standards (8.3)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When running the ORM 3 test suite, line 95 causes lots of issues:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to me, this looks like invalid tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, actually, it might be that the new types don't match the actual usages. The XmlDriver of the orm returns My guess is that the types added for this method are totally wrong, as it looks like each FileDriver child class is free to choose the format of the data they want to cache per class anyway (as the implementation of the public API |
||
{ | ||
if ($this->classCache === null) { | ||
$this->initialize(); | ||
|
@@ -139,7 +139,7 @@ | |
* @return ClassMetadata[] | ||
* @psalm-return array<class-string, ClassMetadata<object>> | ||
*/ | ||
abstract protected function loadMappingFile(string $file): array; | ||
abstract protected function loadMappingFile(string $file); | ||
Check failure on line 142 in src/Persistence/Mapping/Driver/FileDriver.php GitHub Actions / Coding Standards / Coding Standards (8.3)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The type declaration was simply not updated in ORM 3 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does the ORM need to return something else than an array here ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it's just that the return type declaration was not added in ORM 3 (it was forgotten) |
||
|
||
/** | ||
* Initializes the class cache from all the global files. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ORM 3, the return type is
ReflectionClass|null