Skip to content

Conversation

brianstoop
Copy link
Contributor

No description provided.

@@ -50,7 +50,7 @@ public function parse(object $object): self
$struct->deps = $deps;
$struct->parse($item->content, $deps);

if (isset($item->content->content[0]->meta->id)) {
if (isset($item->content->content) && is_array($item->content->content) && isset($item->content->content[0]->meta->id)) {
Copy link
Owner

Choose a reason for hiding this comment

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

Is this related to the rest of the changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because the $item->content->content is not an array when there is only one enumeration.

Copy link
Owner

Choose a reason for hiding this comment

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

Is it an object then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, in my case it is the value of the enum. In the test you can see an example and there it is a string, see https://github.com/SMillerDev/phpdraft/pull/681/files#diff-b33b2099416ec2a729244bddbbf8f2f3125952aa5d11a6bdfb87f28eef655cbaR335-R337

Choose a reason for hiding this comment

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

i think this could be a separate PR, because this change on it's own solve the issues we have right now. i also miss a test for this change

Copy link
Owner

Choose a reason for hiding this comment

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

In my personal project I've done worse things for commit grouping. But whatever people do, the CI has to pass.

Choose a reason for hiding this comment

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

the reason i said it should be a separate PR, because then that could be merged earlier/separately

@SMillerDev
Copy link
Owner

@brianstoop will you fix the tests for this?

@brianstoop
Copy link
Contributor Author

@SMillerDev I should have fixed the tests in my latest commit

Copy link

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.60%. Comparing base (3d09cb4) to head (7329afd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #681   +/-   ##
=========================================
  Coverage     66.60%   66.60%           
- Complexity      439      443    +4     
=========================================
  Files            26       26           
  Lines          1129     1129           
=========================================
  Hits            752      752           
  Misses          377      377           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SMillerDev SMillerDev merged commit 49a6b37 into SMillerDev:main Sep 11, 2025
6 of 8 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.

3 participants