Feature/saloon v3#46
Merged
Merged
Conversation
[ci skip] [skip ci]
Apply fixes from StyleCI [ci skip] [skip ci]
* adds serializeAuthenticator and unserializeAuthenticator for v4 support addresses security release of v4 to address CVE-2026-3394, CVE-2026-33182, and CVE-2026-33183 * fix: replace non-existent HasBody trait with HasStringBody in UploadJobData Saloon v4 only ships HasBody as an interface (Contracts\Body\HasBody), not as a trait. HasStringBody is the correct trait for CSV text payloads. * fix: add missing implements HasBody to UpdateRecords Saloon v4 body traits assert that the request implements HasBody at boot time and throw BodyException if it does not. UpdateRecords used HasJsonBody but omitted the interface, making every PATCH request fail. * fix: update WithSalesforceAuthHeader plugin for Saloon v4 mergeHeaders() was removed in v4; replace with headers()->merge(). SalesforceApi::token() did not exist; add a static $accessToken property populated across all four auth paths (login, restoreAccessToken, completeOAuthLogin, restoreExistingOAuthConnection) and expose it via a public static token() accessor.
…om fixtures Replace all references to Virtual_Youtuber__c, Totoro, TotoroPage, and other custom org fixtures with standard objects (Account) so tests run against any scratch org without pre-seeded metadata.
createFromString -> fromString, createFromStream -> from, createFromPath -> from, per league/csv 9.27.0 deprecations.
Replace deprecated <coverage> element with <source> and remove non-existent ./app directory.
Replace outdated sfdx commands and custom metadata instructions with modern sf CLI steps. Add sandbox setup section. No custom objects or seed scripts needed — tests use standard objects.
- Bump PHP requirement to >=8.4 - Replace removed Saloon\Contracts\Response with Saloon\Http\Response - Replace AccessTokenAuthenticator::unserialize() with custom unserializeAuthenticator() - Remove stale @phpstan-ignore-line comments - Set phpstan phpVersion to 80400 - Update composer.lock for PHP 8.4 platform
- Update actions/checkout to v4 - Replace ramsey/composer-install with direct composer install - Remove stale feature/saloon-v2 branch trigger
Member
|
Should be good now all tests passing on scratch org. Subbed out your Anime Themed tests for actual standard objects and updated the gh env to be 8.4 @WalrusSoup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the library from Saloon v3 to Saloon v4, with all tests passing on a clean scratch org.
What changed
saloonphp/saloonv4pestphp/pest^4.0 andphpstan/phpstan^2.0>=8.4AccessTokenAuthenticator::serialize()/unserialize()with custom JSON serializationSaloon\Contracts\ResponsewithSaloon\Http\Response@phpstan-ignore-linecommentsphpunit.xmlto PHPUnit 12 schemaLeague\Csvmethods (createFromString,createFromStream,createFromPath) with current API (fromString,from)fakerphp/fakerproperty access (use method calls)phpVersionto 80400 inphpstan.neon.distAccount) instead of custom fixtures (Virtual_Youtuber__c,Totoro, etc.)sfCLIcomposer.lockto PHP 8.4 platform to prevent Symfony version mismatches in CIWhy
Test plan