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

Add MayContainCustomFields Trait to Asset Update Request #15198

Merged
merged 5 commits into from
Aug 13, 2024

Conversation

spencerrlongg
Copy link
Collaborator

Description

What it says on the tin, also added some null safe checks and fixed an issue with the trait that wasn't being used yet.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Test written

Test Configuration:

  • PHP version: 8.1

Copy link

what-the-diff bot commented Jul 31, 2024

PR Summary

  • Improved Custom Field Comparison Mechanism
    A modification was made in the file 'MayContainCustomFields.php'. This update improves how custom fields compare to the model's fieldset, taking into consideration null properties using a null-conditional operator.

  • Added New Feature to UpdateAssetRequest
    The 'UpdateAssetRequest.php' file has been enhanced by incorporating the MayContainCustomFields trait. This addition aids in handling custom fields more efficiently during asset updates.

  • Added Validations for Custom Field Updates
    In 'UpdateAssetTest.php', a new test method, 'testCustomFieldCannotBeUpdatedIfNotOnCurrentAssetModel', has been added. This method confirms that custom fields on asset models cannot be updated if they aren't present on the current asset model, helping to maintain data integrity.

@snipe snipe merged commit c163d67 into snipe:develop Aug 13, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants