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

global $classLoader; in EntityLoader->getNewEntityFolder() is null #51

Closed
M-arcus opened this issue Dec 9, 2022 · 0 comments
Closed
Labels
kind/bug Something isn't working

Comments

@M-arcus
Copy link

M-arcus commented Dec 9, 2022

PHP Version

8.1

Shopware Version

6.4.18.0

Actual behaviour

    private function getNewEntityFolder(string $namespace): string
    {
        global $classLoader;

        $prefixes = $classLoader->getPrefixesPsr4();

$classLoader is null and an error [Error] Call to a member function getPrefixesPsr4() on null is thrown

Expected behaviour

$classLoader is an instance of ClassLoader and returns the prefixes when executing getPrefixesPsr4().

Steps to Reproduce?

I installed store.shopware.com/froshdevelopmenthelper (Version 0.3.6) via composer, installed the plugin via console and ran the command bin/console frosh:make:definition My\\Name\\Space

@M-arcus M-arcus added the kind/bug Something isn't working label Dec 9, 2022
shyim added a commit that referenced this issue Feb 22, 2023
@shyim shyim closed this as completed Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants