From 14222922f2918a353838022012709c4b72820cf5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 10:36:54 +0000 Subject: [PATCH 1/3] fix: use named argument choices: for Symfony Choice constraint Replace positional argument with named argument 'choices:' in all Choice constraint usages to fix Symfony 7.4 deprecation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: robjenman <767666+robjenman@users.noreply.github.com> --- src/Apple/Components/AuxiliaryField.php | 2 +- src/Apple/Components/Barcode.php | 2 +- src/Apple/Components/Field.php | 8 ++++---- src/Apple/Components/SecondaryField.php | 2 +- src/Apple/Components/Semantics.php | 2 +- src/Apple/Passes/BoardingPass.php | 2 +- src/Google/Components/Common/Barcode.php | 4 ++-- .../Components/Common/ClassTemplate/FieldReference.php | 2 +- .../Components/Common/ClassTemplate/FirstRowOption.php | 2 +- .../Components/Common/ClassTemplate/TemplateItem.php | 2 +- src/Google/Components/Common/Message.php | 2 +- src/Google/Components/Common/RotatingBarcode.php | 4 ++-- src/Google/Components/Common/SecurityAnimation.php | 2 +- src/Google/Components/Common/TotpDetails.php | 2 +- src/Google/Components/EventTicket/EventDateTime.php | 2 +- .../Components/Flight/BoardingAndSeatingInfo.php | 2 +- .../Components/Flight/BoardingAndSeatingPolicy.php | 4 ++-- src/Google/Components/Loyalty/DiscoverableProgram.php | 2 +- .../Loyalty/DiscoverableProgramMerchantSignupInfo.php | 2 +- src/Google/Components/Transit/TicketSeat.php | 2 +- src/Google/Passes/AbstractClass.php | 4 ++-- src/Google/Passes/AbstractObject.php | 2 +- src/Google/Passes/BaseClass.php | 2 +- src/Google/Passes/EventTicketClass.php | 10 +++++----- src/Google/Passes/FlightClass.php | 2 +- src/Google/Passes/GenericObject.php | 2 +- src/Google/Passes/OfferClass.php | 2 +- src/Google/Passes/TransitClass.php | 2 +- src/Google/Passes/TransitObject.php | 8 ++++---- 29 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/Apple/Components/AuxiliaryField.php b/src/Apple/Components/AuxiliaryField.php index 119e8eb..bddea44 100644 --- a/src/Apple/Components/AuxiliaryField.php +++ b/src/Apple/Components/AuxiliaryField.php @@ -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, ) { diff --git a/src/Apple/Components/Barcode.php b/src/Apple/Components/Barcode.php index 2dc7ec6..935e152 100644 --- a/src/Apple/Components/Barcode.php +++ b/src/Apple/Components/Barcode.php @@ -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. diff --git a/src/Apple/Components/Field.php b/src/Apple/Components/Field.php index 2059343..5fe07d6 100644 --- a/src/Apple/Components/Field.php +++ b/src/Apple/Components/Field.php @@ -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, @@ -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. @@ -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. @@ -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(); diff --git a/src/Apple/Components/SecondaryField.php b/src/Apple/Components/SecondaryField.php index e728b1e..5ba9e3a 100644 --- a/src/Apple/Components/SecondaryField.php +++ b/src/Apple/Components/SecondaryField.php @@ -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, ) { diff --git a/src/Apple/Components/Semantics.php b/src/Apple/Components/Semantics.php index ddc79b9..033e4eb 100644 --- a/src/Apple/Components/Semantics.php +++ b/src/Apple/Components/Semantics.php @@ -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, diff --git a/src/Apple/Passes/BoardingPass.php b/src/Apple/Passes/BoardingPass.php index ee8ee0c..6a6d863 100644 --- a/src/Apple/Passes/BoardingPass.php +++ b/src/Apple/Passes/BoardingPass.php @@ -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. diff --git a/src/Google/Components/Common/Barcode.php b/src/Google/Components/Common/Barcode.php index 134e197..fd50832 100644 --- a/src/Google/Components/Common/Barcode.php +++ b/src/Google/Components/Common/Barcode.php @@ -18,7 +18,7 @@ public function __construct( * The type of barcode. */ #[NotBlank] - #[Choice([ + #[Choice(choices: [ BarcodeType::BARCODE_TYPE_UNSPECIFIED, BarcodeType::AZTEC, BarcodeType::CODE_39, @@ -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, ) { diff --git a/src/Google/Components/Common/ClassTemplate/FieldReference.php b/src/Google/Components/Common/ClassTemplate/FieldReference.php index 3ed4e26..bf57962 100644 --- a/src/Google/Components/Common/ClassTemplate/FieldReference.php +++ b/src/Google/Components/Common/ClassTemplate/FieldReference.php @@ -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, diff --git a/src/Google/Components/Common/ClassTemplate/FirstRowOption.php b/src/Google/Components/Common/ClassTemplate/FirstRowOption.php index fc47bed..352d509 100644 --- a/src/Google/Components/Common/ClassTemplate/FirstRowOption.php +++ b/src/Google/Components/Common/ClassTemplate/FirstRowOption.php @@ -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, diff --git a/src/Google/Components/Common/ClassTemplate/TemplateItem.php b/src/Google/Components/Common/ClassTemplate/TemplateItem.php index 0399486..8337f9f 100644 --- a/src/Google/Components/Common/ClassTemplate/TemplateItem.php +++ b/src/Google/Components/Common/ClassTemplate/TemplateItem.php @@ -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, diff --git a/src/Google/Components/Common/Message.php b/src/Google/Components/Common/Message.php index 23d63d8..87ec75c 100644 --- a/src/Google/Components/Common/Message.php +++ b/src/Google/Components/Common/Message.php @@ -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, /** diff --git a/src/Google/Components/Common/RotatingBarcode.php b/src/Google/Components/Common/RotatingBarcode.php index 606896d..b362101 100644 --- a/src/Google/Components/Common/RotatingBarcode.php +++ b/src/Google/Components/Common/RotatingBarcode.php @@ -18,7 +18,7 @@ public function __construct( * The type of barcode. */ #[NotBlank] - #[Choice([ + #[Choice(choices: [ BarcodeType::BARCODE_TYPE_UNSPECIFIED, BarcodeType::AZTEC, BarcodeType::CODE_39, @@ -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, /** diff --git a/src/Google/Components/Common/SecurityAnimation.php b/src/Google/Components/Common/SecurityAnimation.php index 36a4b89..f60a7b9 100644 --- a/src/Google/Components/Common/SecurityAnimation.php +++ b/src/Google/Components/Common/SecurityAnimation.php @@ -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(); diff --git a/src/Google/Components/Common/TotpDetails.php b/src/Google/Components/Common/TotpDetails.php index cba4f82..951a9be 100644 --- a/src/Google/Components/Common/TotpDetails.php +++ b/src/Google/Components/Common/TotpDetails.php @@ -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. diff --git a/src/Google/Components/EventTicket/EventDateTime.php b/src/Google/Components/EventTicket/EventDateTime.php index be7e0b3..89db13a 100644 --- a/src/Google/Components/EventTicket/EventDateTime.php +++ b/src/Google/Components/EventTicket/EventDateTime.php @@ -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, diff --git a/src/Google/Components/Flight/BoardingAndSeatingInfo.php b/src/Google/Components/Flight/BoardingAndSeatingInfo.php index e221b8e..7f7aef1 100644 --- a/src/Google/Components/Flight/BoardingAndSeatingInfo.php +++ b/src/Google/Components/Flight/BoardingAndSeatingInfo.php @@ -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, /** diff --git a/src/Google/Components/Flight/BoardingAndSeatingPolicy.php b/src/Google/Components/Flight/BoardingAndSeatingPolicy.php index e454ac1..99ceac1 100644 --- a/src/Google/Components/Flight/BoardingAndSeatingPolicy.php +++ b/src/Google/Components/Flight/BoardingAndSeatingPolicy.php @@ -18,7 +18,7 @@ public function __construct( * * @see BoardingPolicy */ - #[Choice([ + #[Choice(choices: [ BoardingPolicy::BOARDING_POLICY_UNSPECIFIED, BoardingPolicy::ZONE_BASED, BoardingPolicy::GROUP_BASED, @@ -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, diff --git a/src/Google/Components/Loyalty/DiscoverableProgram.php b/src/Google/Components/Loyalty/DiscoverableProgram.php index 0dddd44..da57fa6 100644 --- a/src/Google/Components/Loyalty/DiscoverableProgram.php +++ b/src/Google/Components/Loyalty/DiscoverableProgram.php @@ -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, diff --git a/src/Google/Components/Loyalty/DiscoverableProgramMerchantSignupInfo.php b/src/Google/Components/Loyalty/DiscoverableProgramMerchantSignupInfo.php index cdad115..7eb3e27 100644 --- a/src/Google/Components/Loyalty/DiscoverableProgramMerchantSignupInfo.php +++ b/src/Google/Components/Loyalty/DiscoverableProgramMerchantSignupInfo.php @@ -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, diff --git a/src/Google/Components/Transit/TicketSeat.php b/src/Google/Components/Transit/TicketSeat.php index 71ce08b..fd8afa3 100644 --- a/src/Google/Components/Transit/TicketSeat.php +++ b/src/Google/Components/Transit/TicketSeat.php @@ -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, /** diff --git a/src/Google/Passes/AbstractClass.php b/src/Google/Passes/AbstractClass.php index 7df6728..b867d46 100644 --- a/src/Google/Passes/AbstractClass.php +++ b/src/Google/Passes/AbstractClass.php @@ -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, @@ -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, diff --git a/src/Google/Passes/AbstractObject.php b/src/Google/Passes/AbstractObject.php index ae31d6a..2fe8692 100644 --- a/src/Google/Passes/AbstractObject.php +++ b/src/Google/Passes/AbstractObject.php @@ -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, diff --git a/src/Google/Passes/BaseClass.php b/src/Google/Passes/BaseClass.php index a2c7884..767be1f 100644 --- a/src/Google/Passes/BaseClass.php +++ b/src/Google/Passes/BaseClass.php @@ -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, diff --git a/src/Google/Passes/EventTicketClass.php b/src/Google/Passes/EventTicketClass.php index d4a6fc6..c1a7520 100644 --- a/src/Google/Passes/EventTicketClass.php +++ b/src/Google/Passes/EventTicketClass.php @@ -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, @@ -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, /** @@ -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, /** @@ -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, /** @@ -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, /** diff --git a/src/Google/Passes/FlightClass.php b/src/Google/Passes/FlightClass.php index 737f4d4..c87e3cf 100644 --- a/src/Google/Passes/FlightClass.php +++ b/src/Google/Passes/FlightClass.php @@ -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, diff --git a/src/Google/Passes/GenericObject.php b/src/Google/Passes/GenericObject.php index 88ad434..16dae87 100644 --- a/src/Google/Passes/GenericObject.php +++ b/src/Google/Passes/GenericObject.php @@ -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, diff --git a/src/Google/Passes/OfferClass.php b/src/Google/Passes/OfferClass.php index 3eac3b0..f5618c4 100644 --- a/src/Google/Passes/OfferClass.php +++ b/src/Google/Passes/OfferClass.php @@ -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, diff --git a/src/Google/Passes/TransitClass.php b/src/Google/Passes/TransitClass.php index 7f7df1a..892632f 100644 --- a/src/Google/Passes/TransitClass.php +++ b/src/Google/Passes/TransitClass.php @@ -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, diff --git a/src/Google/Passes/TransitObject.php b/src/Google/Passes/TransitObject.php index 72b1993..f8398de 100644 --- a/src/Google/Passes/TransitObject.php +++ b/src/Google/Passes/TransitObject.php @@ -28,7 +28,7 @@ public function __construct( * The type of trip this transit object represents. Used to determine which symbol to use between * the origin and destination. */ - #[Choice([TripType::TRIP_TYPE_UNSPECIFIED, TripType::ROUND_TRIP, TripType::ONE_WAY])] + #[Choice(choices: [TripType::TRIP_TYPE_UNSPECIFIED, TripType::ROUND_TRIP, TripType::ONE_WAY])] #[Cast(LegacyValueCaster::class, TripType::class)] #[NotBlank] public string $tripType, @@ -46,7 +46,7 @@ public function __construct( * Optional. * The number of passengers. */ - #[Choice([ + #[Choice(choices: [ PassengerType::PASSENGER_TYPE_UNSPECIFIED, PassengerType::SINGLE_PASSENGER, PassengerType::MULTIPLE_PASSENGERS, @@ -68,7 +68,7 @@ public function __construct( * Optional. * The status of the ticket. For states which affect display, use the state field instead. */ - #[Choice([ + #[Choice(choices: [ TicketStatus::TICKET_STATUS_UNSPECIFIED, TicketStatus::USED, TicketStatus::REFUNDED, @@ -86,7 +86,7 @@ public function __construct( * Optional. * The concession category for the ticket. */ - #[Choice([ + #[Choice(choices: [ ConcessionCategory::CONCESSION_CATEGORY_UNSPECIFIED, ConcessionCategory::ADULT, ConcessionCategory::CHILD, From f5858c53e2ad24446976ad3f270004075a87c211 Mon Sep 17 00:00:00 2001 From: Robert J <767666+robjenman@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:12:02 +0100 Subject: [PATCH 2/3] Require TLD for URL validation in CallbackOptions --- src/Google/Components/Common/CallbackOptions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Google/Components/Common/CallbackOptions.php b/src/Google/Components/Common/CallbackOptions.php index 7ff1416..efecafd 100644 --- a/src/Google/Components/Common/CallbackOptions.php +++ b/src/Google/Components/Common/CallbackOptions.php @@ -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, /** * 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, ) { parent::__construct(); From 14e57f10b9e2cbe2528815bbb96ed669169c65b7 Mon Sep 17 00:00:00 2001 From: Robert J <767666+robjenman@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:12:36 +0100 Subject: [PATCH 3/3] Require TLD for webServiceURL attribute --- src/Apple/Passes/Pass.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Apple/Passes/Pass.php b/src/Apple/Passes/Pass.php index 44c85e2..a3ee1d8 100644 --- a/src/Apple/Passes/Pass.php +++ b/src/Apple/Passes/Pass.php @@ -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)] public ?string $webServiceURL = null, /** * Optional.