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

Support json string on cast setter #90

Merged
merged 2 commits into from
Nov 6, 2021

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Oct 27, 2021

It can be useful when using js plugins that send post as json string automatically

Copy link
Member

@freekmurze freekmurze left a comment

Choose a reason for hiding this comment

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

Thanks! One nitpicks though...

src/Casts/SchemalessAttributes.php Outdated Show resolved Hide resolved
@erikn69 erikn69 force-pushed the cast_support_json_string branch 3 times, most recently from 798097a to 4a2673c Compare October 28, 2021 16:40
src/Casts/SchemalessAttributes.php Outdated Show resolved Hide resolved
src/Casts/SchemalessAttributes.php Outdated Show resolved Hide resolved
@freekmurze
Copy link
Member

Also make sure that the tests pass.

@erikn69 erikn69 force-pushed the cast_support_json_string branch 2 times, most recently from 10abc82 to a945bd7 Compare October 29, 2021 14:17
@erikn69
Copy link
Contributor Author

erikn69 commented Oct 29, 2021

@freekmurze fixed and all tests passed

PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.5
Configuration: /attributes/phpunit.xml.dist

......................................                            38 / 38 (100%)

Time: 00:03.246, Memory: 20.00 MB

OK ( 38 tests, 65 assertions)

Here test fail by commit c1ef72f?diff=split, you deleted DB_PASSWORD

src/Casts/SchemalessAttributes.php Outdated Show resolved Hide resolved
@erikn69 erikn69 force-pushed the cast_support_json_string branch 2 times, most recently from 136636a to 1aab70c Compare October 29, 2021 14:31
@erikn69 erikn69 force-pushed the cast_support_json_string branch from 1aab70c to 8cf7d8e Compare October 29, 2021 14:51
@erikn69 erikn69 requested a review from freekmurze November 3, 2021 17:36
@fredsal
Copy link

fredsal commented Nov 5, 2021

X2
I need this

@erikn69 erikn69 force-pushed the cast_support_json_string branch from 8bde0ab to c01e504 Compare November 5, 2021 15:20
@freekmurze freekmurze merged commit 6a27ac4 into spatie:main Nov 6, 2021
@freekmurze
Copy link
Member

Thanks!

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.

3 participants