Skip to content

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Oct 20, 2025

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

In b68f0e6, the methods NumericNode::getMin() et NumericNode::getMax() have been added so that they can be used to generate the array shape.

Other getters would be necessary for the JsonSchema generator (#59620)

  • BaseNode::getEquivalentValues() indicate if null, true, false are allowed values
  • BooleanNode::isNullable() indicates if null is an allowed value
  • VariableNode::getAllowEmptyValue() indicates if an empty string is allowed

@carsonbot carsonbot added this to the 7.4 milestone Oct 20, 2025
@GromNaN GromNaN force-pushed the config-getter branch 2 times, most recently from b34371c to 4a2271e Compare October 21, 2025 01:11
$nullableBooleanNode->setDefaultValue(null);

yield [$nullableBooleanNode, 'bool|null'];
yield [new BooleanNode('node', nullable: true), 'bool|null'];
Copy link
Member

Choose a reason for hiding this comment

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

please don't use named parameters. They are not covered by BC. Using the public API in tests can help detect some unintended BC breaks (if we have to edit those tests for unrelated reasons)

Copy link
Member

Choose a reason for hiding this comment

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

If you update this occurrence, could you also please fix the other ones in the provider?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated, please note the inconsistency in the constructor signature. The pathSeparator is before node-specific options in BooleanNode but after in IntegerNode

*
* @return list<array{0: mixed, 1: mixed}>
*/
public function getEquivalentValues(): array
Copy link
Member Author

Choose a reason for hiding this comment

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

This one may not be necessary.

@nicolas-grekas nicolas-grekas modified the milestones: 7.4, 8.1 Nov 16, 2025
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