Skip to content

Conversation

@Tofandel
Copy link
Contributor

@Tofandel Tofandel commented Feb 5, 2024

Currently running getBaseNameSpace on a capsule will throw an error implode(): Argument #2 ($array) must be of type ?array, string given because array_pop returns the last element of the array which is given to implode, but the name of the function means that we instead want the namespace without the last element

This function is not used anywhere though in the core, I only caught it while doing some tinkering

Maybe we should add phpstan to the project for static analysis which would catch exactly this kind of issues

@ifox ifox merged commit 17803f1 into area17:3.x Feb 10, 2024
AidasK pushed a commit to AidasK/twill that referenced this pull request May 4, 2024
* Fix getBaseNamespace

* Add tests

* Given getBasePath is broken and not used anywhere, remove it

* Fix tests

* Update CapsulesTest.php
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