Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/Apple/Components/AuxiliaryField.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct(
* A number you use to add a row to the auxiliary field in an event ticket pass type.
* Set the value to 1 to add an auxiliary row. Each row displays up to four fields.
*/
#[Choice([0, 1])]
#[Choice(choices: [0, 1])]
public ?int $row = null,
...$args,
) {
Expand Down
2 changes: 1 addition & 1 deletion src/Apple/Components/Barcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(
* @see BarcodeFormat
*/
#[NotBlank]
#[Choice([BarcodeFormat::QR, BarcodeFormat::AZTEC, BarcodeFormat::GS1_128, BarcodeFormat::PDF417])]
#[Choice(choices: [BarcodeFormat::QR, BarcodeFormat::AZTEC, BarcodeFormat::GS1_128, BarcodeFormat::PDF417])]
public string $format,
/**
* Required.
Expand Down
8 changes: 4 additions & 4 deletions src/Apple/Components/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
* Provide an empty array to use no data detectors.
*/
#[All([
new Choice([
new Choice(choices: [
DataDetector::PHONE_NUMBER,
DataDetector::LINK,
DataDetector::ADDRESS,
Expand All @@ -64,7 +64,7 @@ public function __construct(
* Optional.
* Style of date to display. MUST be used in conjunction with $timeStyle.
*/
#[Choice([DateStyle::NONE, DateStyle::SHORT, DateStyle::MEDIUM, DateStyle::LONG, DateStyle::FULL])]
#[Choice(choices: [DateStyle::NONE, DateStyle::SHORT, DateStyle::MEDIUM, DateStyle::LONG, DateStyle::FULL])]
public ?string $dateStyle = null,
/**
* Optional.
Expand All @@ -82,7 +82,7 @@ public function __construct(
* Optional.
* Style of time to display. MUST be used in conjunction with $dateStyle.
*/
#[Choice([DateStyle::NONE, DateStyle::SHORT, DateStyle::MEDIUM, DateStyle::LONG, DateStyle::FULL])]
#[Choice(choices: [DateStyle::NONE, DateStyle::SHORT, DateStyle::MEDIUM, DateStyle::LONG, DateStyle::FULL])]
public ?string $timeStyle = null,
/**
* Optional.
Expand All @@ -93,7 +93,7 @@ public function __construct(
* Optional.
* Style of number to display. Only allowed for numeric field values.
*/
#[Choice([NumberStyle::DECIMAL, NumberStyle::PERCENT, NumberStyle::SCIENTIFIC, NumberStyle::SPELL_OUT])]
#[Choice(choices: [NumberStyle::DECIMAL, NumberStyle::PERCENT, NumberStyle::SCIENTIFIC, NumberStyle::SPELL_OUT])]
public ?string $numberStyle = null,
) {
parent::__construct();
Expand Down
2 changes: 1 addition & 1 deletion src/Apple/Components/SecondaryField.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct(
* Optional.
* Alignment for the field’s contents. Defaults to NATURAL.
*/
#[Choice([TextAlignment::LEFT, TextAlignment::CENTER, TextAlignment::RIGHT, TextAlignment::NATURAL])]
#[Choice(choices: [TextAlignment::LEFT, TextAlignment::CENTER, TextAlignment::RIGHT, TextAlignment::NATURAL])]
public ?string $textAlignment = null,
...$args,
) {
Expand Down
2 changes: 1 addition & 1 deletion src/Apple/Components/Semantics.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function __construct(
* Optional.
* The type of event. Use this key for any type of event ticket.
*/
#[Choice([
#[Choice(choices: [
EventType::GENERIC,
EventType::LIVE_PERFORMANCE,
EventType::MOVIE,
Expand Down
2 changes: 1 addition & 1 deletion src/Apple/Passes/BoardingPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(
* @see TransitType
*/
#[NotBlank]
#[Choice([TransitType::AIR, TransitType::BOAT, TransitType::BUS, TransitType::TRAIN, TransitType::GENERIC])]
#[Choice(choices: [TransitType::AIR, TransitType::BOAT, TransitType::BUS, TransitType::TRAIN, TransitType::GENERIC])]
public string $transitType,
/**
* Optional.
Expand Down
2 changes: 1 addition & 1 deletion src/Apple/Passes/Pass.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function __construct(
*
* @see https://developer.apple.com/library/archive/documentation/PassKit/Reference/PassKit_WebService/WebService.html#//apple_ref/doc/uid/TP40011988
*/
#[Url]
#[Url(requireTld: true)]
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

requireTld: true is a behavior change for URL validation (it rejects localhost/intranet hosts). If this is only meant to address the Symfony 7.4 deprecation, consider setting requireTld to the value that matches previous releases (or document the stricter validation and add a test for it).

Suggested change
#[Url(requireTld: true)]
#[Url(requireTld: false)]

Copilot uses AI. Check for mistakes.
public ?string $webServiceURL = null,
/**
* Optional.
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Components/Common/Barcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(
* The type of barcode.
*/
#[NotBlank]
#[Choice([
#[Choice(choices: [
BarcodeType::BARCODE_TYPE_UNSPECIFIED,
BarcodeType::AZTEC,
BarcodeType::CODE_39,
Expand Down Expand Up @@ -58,7 +58,7 @@ public function __construct(
* The render encoding for the barcode. When specified, barcode is rendered in the given encoding.
* Otherwise, best known encoding is chosen by Google.
*/
#[Choice([BarcodeRenderEncoding::UTF_8, BarcodeRenderEncoding::RENDER_ENCODING_UNSPECIFIED])]
#[Choice(choices: [BarcodeRenderEncoding::UTF_8, BarcodeRenderEncoding::RENDER_ENCODING_UNSPECIFIED])]
#[Cast(LegacyValueCaster::class, BarcodeRenderEncoding::class)]
public ?string $renderEncoding = null,
) {
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Components/Common/CallbackOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public function __construct(
* the URL path to be accessible by UserAgent:Google-Valuables.
*/
#[NotBlank]
#[Url]
#[Url(requireTld: true)]
public string $url,
/**
Comment on lines 17 to 20
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

Setting requireTld: true changes validation semantics vs the default (it will reject hosts like localhost or internal DNS names). If this change is only to silence the Symfony 7.4 deprecation, consider explicitly choosing the value that preserves existing behavior (or document the breaking change). Also, the docblock says the URL must be HTTPS, but Url without protocols: ['https'] still accepts http://.

Copilot uses AI. Check for mistakes.
* Optional.
* URL for the merchant endpoint that would be called to request updates. The URL should be hosted on HTTPS
* and robots.txt should allow the URL path to be accessible by UserAgent:Google-Valuables.
*/
#[Url]
#[Url(requireTld: true)]
public ?string $updateRequestUrl = null,
Comment on lines 24 to 26
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

Same concern as url: requireTld: true may be a breaking validation change (e.g., rejects https://localhost/...). If keeping prior behavior is important, set requireTld explicitly to the intended value and consider adding a focused test to lock that behavior in.

Copilot uses AI. Check for mistakes.
) {
parent::__construct();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(
* Only valid if the fieldPath references a date field. Chooses how the date field will be
* formatted and displayed in the UI.
*/
#[Choice([
#[Choice(choices: [
DateFormat::DATE_FORMAT_UNSPECIFIED,
DateFormat::DATE_ONLY,
DateFormat::TIME_ONLY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class FirstRowOption extends Component
{
public function __construct(
/** Optional. */
#[Choice([
#[Choice(choices: [
TransitOption::ORIGIN_AND_DESTINATION_CODES,
TransitOption::ORIGIN_AND_DESTINATION_NAMES,
TransitOption::ORIGIN_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(
* Optional.
* A predefined item to display. Only one of firstValue or predefinedItem may be set.
*/
#[Choice([
#[Choice(choices: [
PredefinedItem::FLIGHT_NUMBER_AND_OPERATING_FLIGHT_NUMBER,
PredefinedItem::FREQUENT_FLYER_PROGRAM_NAME_AND_NUMBER,
PredefinedItem::PREDEFINED_ITEM_UNSPECIFIED,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Components/Common/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(
* Optional.
* The type of the message. Currently, this can only be set for offers.
*/
#[Choice([MessageType::EXPIRATION_NOTIFICATION, MessageType::MESSAGE_TYPE_UNSPECIFIED, MessageType::TEXT])]
#[Choice(choices: [MessageType::EXPIRATION_NOTIFICATION, MessageType::MESSAGE_TYPE_UNSPECIFIED, MessageType::TEXT])]
#[Cast(LegacyValueCaster::class, MessageType::class)]
public ?string $messageType = null,
/**
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Components/Common/RotatingBarcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(
* The type of barcode.
*/
#[NotBlank]
#[Choice([
#[Choice(choices: [
BarcodeType::BARCODE_TYPE_UNSPECIFIED,
BarcodeType::AZTEC,
BarcodeType::CODE_39,
Expand Down Expand Up @@ -54,7 +54,7 @@ public function __construct(
* The render encoding for the barcode. When specified, barcode is rendered in the given encoding.
* Otherwise, best known encoding is chosen by Google.
*/
#[Choice([BarcodeRenderEncoding::UTF_8, BarcodeRenderEncoding::RENDER_ENCODING_UNSPECIFIED])]
#[Choice(choices: [BarcodeRenderEncoding::UTF_8, BarcodeRenderEncoding::RENDER_ENCODING_UNSPECIFIED])]
#[Cast(LegacyValueCaster::class, BarcodeRenderEncoding::class)]
public ?string $renderEncoding = null,
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Components/Common/SecurityAnimation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function __construct(
* Type of animation.
*/
#[NotBlank]
#[Choice([AnimationType::ANIMATION_UNSPECIFIED, AnimationType::FOIL_SHIMMER])]
#[Choice(choices: [AnimationType::ANIMATION_UNSPECIFIED, AnimationType::FOIL_SHIMMER])]
public string $animationType,
) {
parent::__construct();
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Components/Common/TotpDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
* The TOTP algorithm used to generate the OTP.
*/
#[NotBlank]
#[Choice([TotpAlgorithm::TOTP_ALGORITHM_UNSPECIFIED, TotpAlgorithm::TOTP_SHA1])]
#[Choice(choices: [TotpAlgorithm::TOTP_ALGORITHM_UNSPECIFIED, TotpAlgorithm::TOTP_SHA1])]
public string $algorithm,
/**
* Required.
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Components/EventTicket/EventDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(
* Optional.
* The label to use for the doors open value (doorsOpen) on the card detail view.
*/
#[Choice([
#[Choice(choices: [
DoorsOpenLabel::DOORS_OPEN,
DoorsOpenLabel::GATES_OPEN,
DoorsOpenLabel::DOORS_OPEN_LABEL_UNSPECIFIED,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Components/Flight/BoardingAndSeatingInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(
* print the door location on the boarding pass. Most airlines route their passengers to the right door or bridge
* by refering to doors/bridges by the seatClass. In those cases boardingDoor should not be set.
*/
#[Choice([BoardingDoor::BACK, BoardingDoor::FRONT, BoardingDoor::BOARDING_DOOR_UNSPECIFIED])]
#[Choice(choices: [BoardingDoor::BACK, BoardingDoor::FRONT, BoardingDoor::BOARDING_DOOR_UNSPECIFIED])]
#[Cast(LegacyValueCaster::class, BoardingDoor::class)]
public ?string $boardingDoor = null,
/**
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Components/Flight/BoardingAndSeatingPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(
*
* @see BoardingPolicy
*/
#[Choice([
#[Choice(choices: [
BoardingPolicy::BOARDING_POLICY_UNSPECIFIED,
BoardingPolicy::ZONE_BASED,
BoardingPolicy::GROUP_BASED,
Expand All @@ -30,7 +30,7 @@ public function __construct(
* Optional.
* Seating policy which dictates how we display the seat class. If unset, Google will default to CABIN_BASED.
*/
#[Choice([
#[Choice(choices: [
SeatClassPolicy::SEAT_CLASS_POLICY_UNSPECIFIED,
SeatClassPolicy::CABIN_BASED,
SeatClassPolicy::CLASS_BASED,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Components/Loyalty/DiscoverableProgram.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
* Optional.
* Visibility state of the discoverable program.
*/
#[Choice([
#[Choice(choices: [
VisibilityState::STATE_UNSPECIFIED,
VisibilityState::TRUSTED_TESTERS,
VisibilityState::LIVE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
* then shared so that the merchant's website can prefill fields used to enroll the user for the
* discoverable program.
*/
#[Choice([
#[Choice(choices: [
SharedDataType::SHARED_DATA_TYPE_UNSPECIFIED,
SharedDataType::FIRST_NAME,
SharedDataType::LAST_NAME,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Components/Transit/TicketSeat.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(
*
* @see FareClass
*/
#[Choice([FareClass::FARE_CLASS_UNSPECIFIED, FareClass::ECONOMY, FareClass::FIRST, FareClass::BUSINESS])]
#[Choice(choices: [FareClass::FARE_CLASS_UNSPECIFIED, FareClass::ECONOMY, FareClass::FIRST, FareClass::BUSINESS])]
#[Cast(LegacyValueCaster::class, FareClass::class)]
public ?string $fareClass = null,
/**
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Passes/AbstractClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct(
* Optional.
* Identifies whether multiple users and devices will save the same object referencing this class.
*/
#[Choice([
#[Choice(choices: [
MultipleDevicesAndHoldersAllowedStatus::STATUS_UNSPECIFIED,
MultipleDevicesAndHoldersAllowedStatus::MULTIPLE_HOLDERS,
MultipleDevicesAndHoldersAllowedStatus::ONE_USER_ALL_DEVICES,
Expand All @@ -96,7 +96,7 @@ public function __construct(
* Optional
* Defines what unlock mechanism, if any, is required to view the card.
*/
#[Choice([
#[Choice(choices: [
ViewUnlockRequirement::VIEW_UNLOCK_REQUIREMENT_UNSPECIFIED,
ViewUnlockRequirement::UNLOCK_NOT_REQUIRED,
ViewUnlockRequirement::UNLOCK_REQUIRED_TO_VIEW,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Passes/AbstractObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(
* Required.
* The state of the object. This field is used to determine how an object is displayed in the app.
*/
#[Choice([State::STATE_UNSPECIFIED, State::ACTIVE, State::COMPLETED, State::EXPIRED, State::INACTIVE])]
#[Choice(choices: [State::STATE_UNSPECIFIED, State::ACTIVE, State::COMPLETED, State::EXPIRED, State::INACTIVE])]
#[Cast(LegacyValueCaster::class, State::class)]
#[NotBlank]
public string $state,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Passes/BaseClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(
* The status of the class.
*/
#[NotBlank]
#[Choice([
#[Choice(choices: [
ReviewStatus::REVIEW_STATUS_UNSPECIFIED,
ReviewStatus::UNDER_REVIEW,
ReviewStatus::APPROVED,
Expand Down
10 changes: 5 additions & 5 deletions src/Google/Passes/EventTicketClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct(
* Optional.
* The label to use for the confirmation code value on the card detail view.
*/
#[Choice([
#[Choice(choices: [
ConfirmationCodeLabel::CONFIRMATION_CODE_LABEL_UNSPECIFIED,
ConfirmationCodeLabel::CONFIRMATION_CODE,
ConfirmationCodeLabel::CONFIRMATION_NUMBER,
Expand All @@ -79,7 +79,7 @@ public function __construct(
* Optional.
* The label to use for the seat value on the card detail view.
*/
#[Choice([SeatLabel::SEAT, SeatLabel::SEAT_LABEL_UNSPECIFIED])]
#[Choice(choices: [SeatLabel::SEAT, SeatLabel::SEAT_LABEL_UNSPECIFIED])]
#[Cast(LegacyValueCaster::class, SeatLabel::class)]
public ?string $seatLabel = null,
/**
Expand All @@ -91,7 +91,7 @@ public function __construct(
* Optional.
* The label to use for the row value on the card detail view.
*/
#[Choice([RowLabel::ROW, RowLabel::ROW_LABEL_UNSPECIFIED])]
#[Choice(choices: [RowLabel::ROW, RowLabel::ROW_LABEL_UNSPECIFIED])]
#[Cast(LegacyValueCaster::class, RowLabel::class)]
public ?string $rowLabel = null,
/**
Expand All @@ -103,7 +103,7 @@ public function __construct(
* Optional.
* The label to use for the section value on the card detail view.
*/
#[Choice([SectionLabel::SECTION, SectionLabel::THEATER, SectionLabel::SECTION_LABEL_UNSPECIFIED])]
#[Choice(choices: [SectionLabel::SECTION, SectionLabel::THEATER, SectionLabel::SECTION_LABEL_UNSPECIFIED])]
#[Cast(LegacyValueCaster::class, SectionLabel::class)]
public ?string $sectionLabel = null,
/**
Expand All @@ -115,7 +115,7 @@ public function __construct(
* Optional.
* The label to use for the gate value on the card detail view.
*/
#[Choice([GateLabel::GATE_LABEL_UNSPECIFIED, GateLabel::GATE, GateLabel::DOOR, GateLabel::ENTRANCE])]
#[Choice(choices: [GateLabel::GATE_LABEL_UNSPECIFIED, GateLabel::GATE, GateLabel::DOOR, GateLabel::ENTRANCE])]
#[Cast(LegacyValueCaster::class, GateLabel::class)]
public ?string $gateLabel = null,
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Passes/FlightClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct(
* Optional.
* If unset, Google will compute status based on data from other sources, such as FlightStats, etc.
*/
#[Choice([
#[Choice(choices: [
FlightStatus::FLIGHT_STATUS_UNSPECIFIED,
FlightStatus::SCHEDULED,
FlightStatus::ACTIVE,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Passes/GenericObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
* Optional
* The type of the generic card.
*/
#[Choice([
#[Choice(choices: [
GenericType::GENERIC_TYPE_UNSPECIFIED,
GenericType::GENERIC_SEASON_PASS,
GenericType::GENERIC_UTILITY_BILLS,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Passes/OfferClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
* Required.
* The redemption channels applicable to this offer.
*/
#[Choice([
#[Choice(choices: [
RedemptionChannel::REDEMPTION_CHANNEL_UNSPECIFIED,
RedemptionChannel::INSTORE,
RedemptionChannel::ONLINE,
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Passes/TransitClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(
* Required.
* The type of transit this class represents, such as "bus".
*/
#[Choice([
#[Choice(choices: [
TransitType::TRANSIT_TYPE_UNSPECIFIED,
TransitType::BUS,
TransitType::RAIL,
Expand Down
Loading
Loading