-
-
Couldn't load subscription status.
- Fork 9.7k
[JsonStreamer] Add synthetic properties support #62069
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 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 |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <?php | ||
|
|
||
| /* | ||
| * This file is part of the Symfony package. | ||
| * | ||
| * (c) Fabien Potencier <fabien@symfony.com> | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
| namespace Symfony\Component\JsonStreamer\Tests\Fixtures\Mapping; | ||
|
|
||
| use Symfony\Component\JsonStreamer\Mapping\PropertyMetadata; | ||
| use Symfony\Component\JsonStreamer\Mapping\PropertyMetadataLoaderInterface; | ||
| use Symfony\Component\TypeInfo\Type; | ||
|
|
||
| final class SyntheticPropertyMetadataLoader implements PropertyMetadataLoaderInterface | ||
| { | ||
| public function load(string $className, array $options = [], array $context = []): array | ||
| { | ||
| return [ | ||
| 'synthetic' => PropertyMetadata::createSynthetic(Type::true(), [ | ||
| self::true(...), | ||
| ]), | ||
| ]; | ||
| } | ||
|
|
||
| public static function true(): true | ||
| { | ||
| return true; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?php | ||
|
|
||
| namespace Symfony\Component\JsonStreamer\Tests\Fixtures\Model; | ||
|
|
||
| class DummyWithSyntheticProperties | ||
| { | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.