Skip to content

Validate the input of CoreExtension::map()#4272

Merged
fabpot merged 1 commit into
twigphp:3.xfrom
derrabus:bugfix/validate-map-input
Sep 3, 2024
Merged

Validate the input of CoreExtension::map()#4272
fabpot merged 1 commit into
twigphp:3.xfrom
derrabus:bugfix/validate-map-input

Conversation

@derrabus

@derrabus derrabus commented Sep 3, 2024

Copy link
Copy Markdown
Contributor

Fixes #4269 (comment)

As discovered in #4269, we have a test that checks if the map filter fails if we pass a non-iterable value. However, this test relies on an active error handler that throws on PHP warnings.

This PR adds input validation the the map() function like we can already find it in similar functions.

@derrabus derrabus mentioned this pull request Sep 3, 2024
10 tasks
@fabpot

fabpot commented Sep 3, 2024

Copy link
Copy Markdown
Contributor

Thank you @derrabus.

@fabpot fabpot merged commit e829b26 into twigphp:3.x Sep 3, 2024
@derrabus derrabus deleted the bugfix/validate-map-input branch September 3, 2024 20:15
fabpot added a commit that referenced this pull request Sep 4, 2024
This PR was squashed before being merged into the 4.x branch.

Discussion
----------

PHPUnit 11

This PR switches our CI to PHPUnit 11.

TODO:

- [x] #4262
- [x] #4263
- [x] #4264
- [x] #4265
- [x] #4268
- [x] #4266
- [x] #4270
- [x] #4271
- [x] #4272
- [x] #4274

Commits
-------

f2053bb PHPUnit 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants