Giter VIP home page Giter VIP logo

Comments (7)

ziishaned avatar ziishaned commented on July 16, 2024

@simondahla what is the php version do you have? This application does't work until you have the version of php 7.0 or after release.

from opus.

simondahla avatar simondahla commented on July 16, 2024

@ZeeSHANU

vagrant@scotchbox:/var/www/opus.local$ php -v
PHP 7.0.17-2+deb.sury.org~trusty+1 (cli) (built: Mar 15 2017 09:38:47) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.17-2+deb.sury.org~trusty+1, Copyright (c) 1999-2017, by Zend Technologies

I tried to rewrite that line to

use App\Models\User;
use App\Models\Space;
use App\Models\Wiki;
use App\Models\Team;
use App\Models\Page;
use App\Models\Role;

It seems to fix the problem, but the that kind of error is then found in Wiki.php and probably all other files with that syntax...

from opus.

simondahla avatar simondahla commented on July 16, 2024

Also tried to upgrade to PHP 7.1 but without success.

vagrant@scotchbox:/var/www/opus.local$ php -v
PHP 7.1.3-2+deb.sury.org~trusty+1 (cli) (built: Mar 15 2017 09:53:03) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.3-2+deb.sury.org~trusty+1, Copyright (c) 1999-2017, by Zend Technologies

from opus.

ziishaned avatar ziishaned commented on July 16, 2024

@simondahla This is strange because I have PHP 7.0.9 and everything is working fine. As you can see in PHP documentation we can group use statements like this:

// PHP 7+ code
use some\namespace\{ClassA, ClassB, ClassC as C};
use function some\namespace\{fn_a, fn_b, fn_c};
use const some\namespace\{ConstA, ConstB, ConstC};

from opus.

sandeepscet avatar sandeepscet commented on July 16, 2024

Solved after PHP 7 installation.

from opus.

simondahla avatar simondahla commented on July 16, 2024

@ZeeSHANU I hear you. As you can see I'm using PHP 7.1.3 and it's still not working.

Any other suggestions on how to solve this?

from opus.

ziishaned avatar ziishaned commented on July 16, 2024

@simondahla To solve your issue just explode the grouped use statements like this

use {ClassA, ClassB};

with

use ClassA;
use ClassB;

from opus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.