Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JSON GET calls with the route helper #231

Merged

Conversation

GeniJaho
Copy link
Collaborator

@GeniJaho GeniJaho commented Jul 9, 2024

Fixes #217.

This PR will ensure that the route() helper will receive the $data argument, which should produce the same behavior.

Some cases taken into account:

$http->json('GET', route('home'));
$http->json('GET', route('home'), ['payload']);
$http->json('GET', route('home'), data: ['payload']);
$http->json('GET', route('home', 'some arg'), ['payload']);
$http->json('GET', '/', ['data'], ['headers'], 1);
$http->json('GET', '/', ['data'], ['headers']);
$http->json('GET', '/', ['data']);
$http->json('GET', route('home'), headers: ['payload']);
$http->json('GET', route('home'), options: 1); 

@GeniJaho GeniJaho merged commit 5cafba7 into driftingly:main Jul 17, 2024
5 checks passed
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.

Error introduced by JsonCallToExplicitJsonCallRector
2 participants