Skip to content

Add __isset magic method to FileMakerRelation for field existence checks#160

Merged
msyk merged 1 commit into
msyk:masterfrom
ProgrammiererEFZ:feature/isset-support-for-fields
Jul 15, 2026
Merged

Add __isset magic method to FileMakerRelation for field existence checks#160
msyk merged 1 commit into
msyk:masterfrom
ProgrammiererEFZ:feature/isset-support-for-fields

Conversation

@ProgrammiererEFZ

Copy link
Copy Markdown

Summary: This pull request adds support for the PHP isset() function when checking for fields or portals on a record object (FileMakerRelation).

Changes:

  • Implemented the __isset magic method in src/Supporting/FileMakerRelation.php.
  • The implementation uses the existing field() method to verify if a field or portal exists.
  • Returns true if the field exists and false if it does not (handling the Exception thrown by field()).

Reasoning: Currently, the library supports magic property access via __get, but calling isset($record->field_name) always returns false because __isset was not implemented. This change makes the API more intuitive and consistent with standard PHP object behavior, allowing developers to safely check for field existence before access.

Co-authored-by: Junie <junie@jetbrains.com>
@msyk

msyk commented Jul 15, 2026

Copy link
Copy Markdown
Owner

@ProgrammiererEFZ and @junie-agent , Thanks for committing good feature.

@msyk msyk merged commit 46be10c into msyk:master Jul 15, 2026
62 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.

2 participants