wintercms / wn-builder-plugin

GUI for building plugins in Winter CMS
MIT License
34 stars 12 forks source link

the models are not displayed #3

Closed faselunare closed 3 years ago

faselunare commented 3 years ago

Winter version: Detected a modified version of Winter CMS build 1.1.2 PHP: 8.0.3

Step to reproduce

LukeTowers commented 3 years ago

@faselunare are you sure that the correct plugin is selected?

faselunare commented 3 years ago

hi @LukeTowers i have only one plugin at the moment I have never had this type of problem, today I try to do a new winter installation from scratch

faselunare commented 3 years ago

I created a fresh install, only installed the builder but the problem is the same. I'm on macosx with Valet 2.14.1

LukeTowers commented 3 years ago

Details from @mjauvin below. Looks like it's only happening on PHP 8.

this is the code that fails:

    protected function extractNamespace($stream)
    {   
        if ($stream->getNextExpected(T_WHITESPACE) === null) {
            return null;
        }

        return $stream->getNextExpectedTerminated([T_STRING, T_NS_SEPARATOR], [T_WHITESPACE, ';']);
    }

getNextExpectedTerminated() seems to fail now for the namespace on PHP 8

mjauvin commented 3 years ago

Fixed by 98dc18d0b62cccef3f52b7987160c3596180eaeb