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

Fix getBaseNamespace #2420

Merged
merged 5 commits into from
Feb 10, 2024
Merged

Fix getBaseNamespace #2420

merged 5 commits into from
Feb 10, 2024

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
11 checks passed
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