Skip to content

Conversation

@alexandre-daubois
Copy link
Member

Q A
Branch? 7.3
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

#61517 introduces custom functions mechanism. For consistency, RFC built-in functions will also use the new functions mechanism. In order to fully work, functions must be able to return the special nothing value defined by the RFC. This PR exposes the Nothing enum to the public API instead of storing it internally in the JsonCrawler with stdClass.

Context: #61517 (comment)

@carsonbot

This comment was marked as resolved.

@carsonbot carsonbot added this to the 7.4 milestone Sep 15, 2025
@alexandre-daubois alexandre-daubois changed the base branch from 7.4 to 7.3 September 15, 2025 07:08
@alexandre-daubois alexandre-daubois modified the milestones: 7.4, 7.3 Sep 15, 2025
@nicolas-grekas
Copy link
Member

Thank you @alexandre-daubois.

@nicolas-grekas nicolas-grekas merged commit 8d9d7d3 into symfony:7.3 Sep 15, 2025
5 of 12 checks passed

namespace Symfony\Component\JsonPath;

enum Nothing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enum should be @internal?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is needed by custom functions: people should be able to return this special Nothing value to be correctly handled by the component when necessary (PR to be merged, but we added it in prevision)

nicolas-grekas added a commit that referenced this pull request Nov 3, 2025
…wler (yoeunes)

This PR was merged into the 7.4 branch.

Discussion
----------

[JsonPath] Remove unused "nothing" property from JsonCrawler

| Q | A
|---|---
| Branch? | 7.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues | n/a
| License | MIT

This PR removes the `private static \stdClass $nothing;` property from `JsonCrawler`, as it is no longer used and has been replaced by the `Nothing::Nothing` enum. See #61749

Commits
-------

436ab11 [JsonPath] Remove unused "nothing" property from JsonCrawler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants