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
Allow native PHP functions to not be used #817
Comments
@nunomaduro as I'm further investigating why it doesn't detect the function usage, will update this thread soon Update: it seems the issue is related to how Update: the issue depends on how Pest Arch Plugin builds the layer that is passed to |
@nunomaduro I found where the issue is generated: in ObjectDescriptionFactory.php#L52 the layer by removing if (! $isFromVendor) {
$object->uses = new ObjectUses(array_values(
array_filter(
iterator_to_array($object->uses->getIterator()),
- static fn (string $use): bool => self::isUserDefined($use) && ! self::isSameLayer($object, $use),
+ static fn (string $use): bool => ! self::isSameLayer($object, $use),
)
));
} |
@nunomaduro before opening a PR to fix this, I'm wondering why you added any idea? |
Hey, @jbrooksuk . Thanks for your feedback. I'm checking with Pest team if we have plans to do that. I'll update this issue soon. |
@devajmeireles I have a working implementation for this, will clean it up and open a PR soon |
a fix is proposed in pestphp/pest-plugin-arch#4 |
Given the following architecture test:
I'd expect it to fail in this file:
But it doesn't, as Pest considers these native functions.
The text was updated successfully, but these errors were encountered: