Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* next: add missing use statement update readme use ramsey/composer-install remove old way to create instances and extract values add simple way to extract values from an object add simple class to instanciate a new object give access to properties attributes add ReflectionType and ReflectionProperty remove roavs bc check use more precise types make constructors private pass the properties at build time instead of keeping then in memory update dependencies update psalm only use reflection by default to inject/extract properties avoid keeping objects in memory remove unnecessary annotation use CS 2 change email
- Loading branch information
Showing
59 changed files
with
880 additions
and
3,030 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
File renamed without changes.
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
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 | ||
declare(strict_types = 1); | ||
|
||
namespace Fixtures\Innmind\Reflection; | ||
|
||
#[\Attribute(\Attribute::TARGET_PROPERTY)] | ||
final class Attr | ||
{ | ||
public function __construct( | ||
public string $value, | ||
) { | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,38 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
namespace Fixtures\Innmind\Reflection; | ||
|
||
final class ManyTypes | ||
{ | ||
#[Attr('foo')] | ||
private int $a; | ||
#[Attr('bar')] | ||
private float $b; | ||
private string $c; | ||
private bool $d; | ||
private array $e; | ||
private object $f; | ||
private \Closure $g; | ||
private NoConstructor $h; | ||
private mixed $i; | ||
private $j; | ||
private ?NoConstructor $k; | ||
private int|string $union; | ||
private \Countable&\ArrayAccess $intersection; | ||
|
||
public function a(): int | ||
{ | ||
return $this->a; | ||
} | ||
|
||
public function b(): float | ||
{ | ||
return $this->b; | ||
} | ||
|
||
public function d(): bool | ||
{ | ||
return $this->d; | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.