Skip to content

[JsonStreamer] Remove nikic/php-parser dependency #60544

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

Merged
merged 1 commit into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Symfony/Component/JsonStreamer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

7.4
---

* Remove `nikic/php-parser` dependency

7.3
---

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Component\JsonStreamer\DataModel\Read;

use Symfony\Component\JsonStreamer\DataModel\DataAccessorInterface;
use Symfony\Component\TypeInfo\Type\ObjectType;
use Symfony\Component\TypeInfo\Type\UnionType;

Expand All @@ -25,7 +24,7 @@
final class ObjectNode implements DataModelNodeInterface
{
/**
* @param array<string, array{name: string, value: DataModelNodeInterface, accessor: callable(DataAccessorInterface): DataAccessorInterface}> $properties
* @param array<string, array{name: string, value: DataModelNodeInterface, accessor: callable(string): string}> $properties
*/
public function __construct(
private ObjectType $type,
Expand All @@ -50,7 +49,7 @@ public function getType(): ObjectType
}

/**
* @return array<string, array{name: string, value: DataModelNodeInterface, accessor: callable(DataAccessorInterface): DataAccessorInterface}>
* @return array<string, array{name: string, value: DataModelNodeInterface, accessor: callable(string): string}>
*/
public function getProperties(): array
{
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Component\JsonStreamer\DataModel\Write;

use Symfony\Component\JsonStreamer\DataModel\DataAccessorInterface;
use Symfony\Component\TypeInfo\Type\BackedEnumType;

/**
Expand All @@ -26,12 +25,12 @@
final class BackedEnumNode implements DataModelNodeInterface
{
public function __construct(
private DataAccessorInterface $accessor,
private string $accessor,
private BackedEnumType $type,
) {
}

public function withAccessor(DataAccessorInterface $accessor): self
public function withAccessor(string $accessor): self
{
return new self($accessor, $this->type);
}
Expand All @@ -41,7 +40,7 @@ public function getIdentifier(): string
return (string) $this->getType();
}

public function getAccessor(): DataAccessorInterface
public function getAccessor(): string
{
return $this->accessor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Component\JsonStreamer\DataModel\Write;

use Symfony\Component\JsonStreamer\DataModel\DataAccessorInterface;
use Symfony\Component\TypeInfo\Type\CollectionType;

/**
Expand All @@ -24,13 +23,13 @@
final class CollectionNode implements DataModelNodeInterface
{
public function __construct(
private DataAccessorInterface $accessor,
private string $accessor,
private CollectionType $type,
private DataModelNodeInterface $item,
) {
}

public function withAccessor(DataAccessorInterface $accessor): self
public function withAccessor(string $accessor): self
{
return new self($accessor, $this->type, $this->item);
}
Expand All @@ -40,7 +39,7 @@ public function getIdentifier(): string
return (string) $this->getType();
}

public function getAccessor(): DataAccessorInterface
public function getAccessor(): string
{
return $this->accessor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Component\JsonStreamer\DataModel\Write;

use Symfony\Component\JsonStreamer\DataModel\DataAccessorInterface;
use Symfony\Component\JsonStreamer\Exception\InvalidArgumentException;
use Symfony\Component\TypeInfo\Type;
use Symfony\Component\TypeInfo\Type\UnionType;
Expand Down Expand Up @@ -43,7 +42,7 @@ final class CompositeNode implements DataModelNodeInterface
* @param list<DataModelNodeInterface> $nodes
*/
public function __construct(
private DataAccessorInterface $accessor,
private string $accessor,
array $nodes,
) {
if (\count($nodes) < 2) {
Expand All @@ -60,7 +59,7 @@ public function __construct(
$this->nodes = $nodes;
}

public function withAccessor(DataAccessorInterface $accessor): self
public function withAccessor(string $accessor): self
{
return new self($accessor, array_map(static fn (DataModelNodeInterface $n): DataModelNodeInterface => $n->withAccessor($accessor), $this->nodes));
}
Expand All @@ -70,7 +69,7 @@ public function getIdentifier(): string
return (string) $this->getType();
}

public function getAccessor(): DataAccessorInterface
public function getAccessor(): string
{
return $this->accessor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Component\JsonStreamer\DataModel\Write;

use Symfony\Component\JsonStreamer\DataModel\DataAccessorInterface;
use Symfony\Component\TypeInfo\Type;

/**
Expand All @@ -27,7 +26,7 @@ public function getIdentifier(): string;

public function getType(): Type;

public function getAccessor(): DataAccessorInterface;
public function getAccessor(): string;

public function withAccessor(DataAccessorInterface $accessor): self;
public function withAccessor(string $accessor): self;
}
Loading