Skip to content

Update CI actions to Node 24 runtime - #1

Closed
Gasol wants to merge 15 commits into
mainfrom
ci/node24-actions
Closed

Update CI actions to Node 24 runtime#1
Gasol wants to merge 15 commits into
mainfrom
ci/node24-actions

Conversation

@Gasol

@Gasol Gasol commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Fixes the "Node.js 20 actions are deprecated" warnings from run 26731397920.

The annotation named two offenders:

  • actions/checkout@v4 (Node 20) → bumped to @v5 (Node 24).
  • actions/cache@… (Node 20), pulled in internally by ramsey/composer-install@v3 → removed the action in favour of a direct composer install step (dependency caching isn't worth keeping a flagged action for a small library).

shivammathur/setup-php@v2 was not flagged and already runs on Node 24.

Tests still pass locally (40 tests, 116 assertions) on PHP 8.5; CI on this PR exercises PHP 8.1–8.4.

Gasol added 15 commits May 31, 2026 01:59
Research-backed PSR-style specification for an interoperable, PHP 5.4-safe
SMS gateway interface (core SmsClientInterface + segregated capability
interfaces), synthesized from a survey of ~49 providers and standards.
Includes the Mitake API v2.14 doc used as the worked reference mapping.
Resolve the issues flagged by the completeness review:
- Deterministic status normalization (Mitake code 0->SCHEDULED, 8->EXPIRED)
- getRemainingBalance() returns Balance, not Money
- Add PointsCost value object + getPointsCost() for non-currency billing
- Add retryable RateLimitExceededException; remap Mitake 'l' / HTTP 429
- Specify bulk partial-failure semantics + SmsResult::isSuccessful()
- Add InboundMessageInterface::getMediaUrls() for inbound MMS
- Collapse duplicate CHANNEL_SILENT_AUTH; add rcs recipient kind
- Fix GSM-7 extension set (include euro); namespace the Gsm7 helper
Convert the spec from PHP 5.4-clean to modern PHP 8.1+:
- Native parameter type hints and return types on every signature
- Constant holders -> string-backed enums (DeliveryState, Encoding,
  MessageType, VerificationChannelType, RecipientKind)
- Value objects use readonly promoted properties; with*() rebuild via
  new self(); \DateTimeInterface instead of \DateTime
- SmsExceptionInterface now extends \Throwable (PSR-18 style)
- Target Runtime updated to PHP 8.1+

All 55 PHP blocks pass php -l on PHP 8.5.
Replace the CAP_* class constants on CapabilityAwareInterface with a
string-backed Capability enum; retype supports(Capability $capability):
bool and convert all 27 references doc-wide. All 55 PHP blocks pass php -l.
Composer package codepower/sms-mitake (PSR-4 CodePower\Mitake\, PHP >=8.1,
ext-curl). Charset enum (UTF8/Big5 with mbstring-backed conversion),
immutable Credentials value object, and the exception hierarchy rooted at
MitakeExceptionInterface.
HttpClient interface + immutable HttpResponse, and a default cURL
implementation (CurlHttpClient) enforcing TLS 1.2+, with configurable
timeouts and support for both form-encoded and raw bodies.
Message (outbound SmSend/SmBulkSend fields), StatusCode (numeric delivery
codes + letter error codes with Taiwan-Chinese descriptions), and the
result objects SendResult, StatusResult, CancelResult, Balance.
ResponseParser turns Mitake's plain-text formats (bracketed send blocks,
tab-separated status rows, AccountPoint balance, msgid=code cancel lines)
into result objects, raising ResponseException on error codes. DeliveryReceipt
parses the status callback and builds the required acknowledgement body.
Ties the layers together: send (SmSend), sendBulk (SmBulkSend, up to 500,
$$-delimited records), queryStatus + queryBalance (SmQuery), and cancel
(SmCancel). Handles charset encoding (UTF8/Big5), newline->ASCII-0x06,
per-endpoint query/form/raw-body shapes, and input-limit validation.
40 tests (116 assertions) covering StatusCode classification, Charset
encoding, Message validation, ResponseParser (send/status/balance/cancel +
error tokens), DeliveryReceipt parsing/ack, and the Client's request
shaping and response parsing via a fake HTTP transport. All green on PHP 8.5.
Rewrite the README with real usage (send, bulk, status/balance, cancel,
callback) and bump the stated requirement to PHP >=8.1 + ext-curl. Add a
'composer test' script.
The vendor-neutral interface spec lives in its own repo (codepower/sms-psr);
this package is a standalone Mitake client and no longer needs it.
Run the test suite on push and pull requests across PHP 8.1-8.4
(setup-php with curl + mbstring, composer validate, composer test).
Bump actions/checkout v4 -> v5 (Node 24) and replace ramsey/composer-install
(which pulls in the Node 20 actions/cache) with a direct composer install,
silencing the Node.js 20 deprecation warnings.
@Gasol Gasol closed this Jun 1, 2026
@Gasol
Gasol deleted the ci/node24-actions branch June 1, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant