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

Dynamic properties in private additionalProperties don't allow determining what properties might exist. #329

Closed
karlshea opened this issue Nov 30, 2023 · 2 comments · Fixed by #330

Comments

@karlshea
Copy link
Contributor

karlshea commented Nov 30, 2023

PHP Version

8.1.26

PHP date.timezone

America/Chicago

ICS Parser Version

3.3.1

Operating System

Linux

Description

I'm using this package through the Drupal module feeds_ical to import events, and the way Drupal's Feeds module works requires use of a data transfer object that's initialized by looping through the ics-parser events parsed from the feed.

The problem I'm running into is that it loops through the Event properties to set their values on the data transfer object, but since $additionalProperties is private there isn't a way for it to find out what keys might be in that array so it can get their values.

It seems like the solution would be to mark that property as public, so the module could look at what's in there.

Steps to Reproduce

// Loop over information from feed and add to item.
foreach ($event as $eventProperty => $eventPropertyValue) {
  // No properties from $additionalProperties appear.
}

Drupal issue: https://www.drupal.org/project/feeds_ical/issues/3358713

@u01jmg3
Copy link
Owner

u01jmg3 commented Nov 30, 2023

Thanks for logging an issue. Feel free to submit a PR with your change.

@karlshea
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants