Skip to content

Mark optional array properties as such#5545

Closed
shaedrich wants to merge 6 commits intophp:masterfrom
shaedrich:patch-5
Closed

Mark optional array properties as such#5545
shaedrich wants to merge 6 commits intophp:masterfrom
shaedrich:patch-5

Conversation

@shaedrich
Copy link
Copy Markdown
Contributor

@shaedrich shaedrich commented May 6, 2026

image

@jordikroon
Copy link
Copy Markdown
Member

jordikroon commented May 6, 2026

Do you have a working example where object is null? My assumption is that if it would be null it would be omitted.

Given that you created 3 MRs for the same function call. It would be much more helpful to bundle them into 1 single MR. The contents of the commits are rather small.

@shaedrich
Copy link
Copy Markdown
Contributor Author

shaedrich commented May 6, 2026

Do you have a working example where object is null? My assumption is that if it would be null it would be omitted.

Yeah, it's not exactly right, I'd be omitted, which, aside from emitting a warning if trying to access it, is treated as null as well as being considered null by is_null() and even in strict comparison with null—how would you describe that as a type?

Given that you created 3 MRs for the same function call. It would be much more helpful to bundle them into 1 single MR. The contents of the commits are rather small.

I'm used to making encapsulated PRs in other projects because that's what some maintainers want but I can merge them together. Sorry if that caused noise.

shaedrich and others added 2 commits May 7, 2026 00:05
@shaedrich
Copy link
Copy Markdown
Contributor Author

Closed in favor of #5544

@shaedrich shaedrich closed this May 6, 2026
@shaedrich shaedrich deleted the patch-5 branch May 6, 2026 22:16
shaedrich added a commit to shaedrich/doc-en that referenced this pull request May 7, 2026
as PHP does not have an explicit undefined type

Co-authored-by: Jordi Kroon <jkroon@onyourmarks.agency>
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