-
-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #995 from doctrine/3.4.x-merge-up-into-3.5.x_WbajvUjT
Merge release 3.4.3 into 3.5.x
- Loading branch information
Showing
17 changed files
with
599 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ jobs: | |
name: "PHPUnit" | ||
uses: "doctrine/.github/.github/workflows/[email protected]" | ||
with: | ||
php-versions: '["7.1", "7.2", "7.3", "7.4", "8.0", "8.1"]' | ||
php-versions: '["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
parameters: | ||
phpVersion: 80100 | ||
phpVersion: 80200 | ||
level: 3 | ||
paths: | ||
- src | ||
|
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
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
13 changes: 13 additions & 0 deletions
13
tests/Common/Proxy/LazyLoadableObjectWithPHP81IntersectionType.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Doctrine\Tests\Common\Proxy; | ||
|
||
class LazyLoadableObjectWithPHP81IntersectionType | ||
{ | ||
private \stdClass&\Stringable $identifierFieldIntersectionType; | ||
|
||
public function getIdentifierFieldIntersectionType(): \stdClass&\Stringable | ||
{ | ||
return $this->identifierFieldIntersectionType; | ||
} | ||
} |
156 changes: 156 additions & 0 deletions
156
tests/Common/Proxy/LazyLoadableObjectWithPHP81IntersectionTypeClassMetadata.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
<?php | ||
|
||
namespace Doctrine\Tests\Common\Proxy; | ||
|
||
use BadMethodCallException; | ||
use Doctrine\Persistence\Mapping\ClassMetadata; | ||
use ReflectionClass; | ||
use function array_keys; | ||
|
||
class LazyLoadableObjectWithPHP81IntersectionTypeClassMetadata implements ClassMetadata | ||
{ | ||
/** @var ReflectionClass */ | ||
protected $reflectionClass; | ||
|
||
/** @var array<string,bool> */ | ||
protected $identifier = [ | ||
'identifierFieldIntersectionType' => true, | ||
]; | ||
|
||
/** @var array<string,bool> */ | ||
protected $fields = [ | ||
'identifierFieldIntersectionType' => true, | ||
]; | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getName() | ||
{ | ||
return $this->getReflectionClass()->getName(); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getIdentifier() | ||
{ | ||
return array_keys($this->identifier); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getReflectionClass() | ||
{ | ||
if ($this->reflectionClass === null) { | ||
$this->reflectionClass = new ReflectionClass(__NAMESPACE__ . '\LazyLoadableObjectWithPHP81IntersectionType'); | ||
} | ||
|
||
return $this->reflectionClass; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function isIdentifier($fieldName) | ||
{ | ||
return isset($this->identifier[$fieldName]); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function hasField($fieldName) | ||
{ | ||
return isset($this->fields[$fieldName]); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function hasAssociation($fieldName) | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function isSingleValuedAssociation($fieldName) | ||
{ | ||
throw new BadMethodCallException('not implemented'); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function isCollectionValuedAssociation($fieldName) | ||
{ | ||
throw new BadMethodCallException('not implemented'); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getFieldNames() | ||
{ | ||
return array_keys($this->fields); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getIdentifierFieldNames() | ||
{ | ||
return $this->getIdentifier(); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getAssociationNames() | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getTypeOfField($fieldName) | ||
{ | ||
return 'string'; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getAssociationTargetClass($assocName) | ||
{ | ||
throw new BadMethodCallException('not implemented'); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function isAssociationInverseSide($assocName) | ||
{ | ||
throw new BadMethodCallException('not implemented'); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getAssociationMappedByTargetField($assocName) | ||
{ | ||
throw new BadMethodCallException('not implemented'); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getIdentifierValues($object) | ||
{ | ||
throw new BadMethodCallException('not implemented'); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
tests/Common/Proxy/LazyLoadableObjectWithPHP82UnionAndIntersectionType.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Doctrine\Tests\Common\Proxy; | ||
|
||
class LazyLoadableObjectWithPHP82UnionAndIntersectionType | ||
{ | ||
private (\stdClass&\Stringable)|null $identifierFieldUnionAndIntersectionType = null; | ||
|
||
public function getIdentifierFieldUnionAndIntersectionType(): (\stdClass&\Stringable)|null | ||
{ | ||
return $this->identifierFieldUnionAndIntersectionType; | ||
} | ||
} |
Oops, something went wrong.