TiagoSilvaPereira / vemto2-issues

Repository to track Vemto 2 Issues
5 stars 0 forks source link

Parse Error : syntax error, unexpected 'extends' (T_EXTENDS), expecting T_STRING on line 12 10 | 11 | class > 12 | extends Model 13 | { 14 | 15 | use HasFactory; #123

Closed vimitali368 closed 6 months ago

vimitali368 commented 6 months ago

Error Message: Parse Error : syntax error, unexpected 'extends' (T_EXTENDS), expecting T_STRING on line 12 10 | 11 | class

12 | extends Model 13 | { 14 | 15 | use HasFactory;

Stack:

SyntaxError: Parse Error : syntax error, unexpected 'extends' (T_EXTENDS), expecting T_STRING on line 12
  10 |
  11 | class  
> 12 | extends Model 
  13 | {
  14 |
  15 | use HasFactory;
    at mt.raiseError (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:284:175)
    at mt.error (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:284:830)
    at mt.expect (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:285:414)
    at mt.read_class_declaration_statement (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:273:4184)
    at mt.read_top_statement (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:280:1244)
    at mt.read_top_statements (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:280:907)
    at mt.read_namespace (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:273:36852)
    at mt.read_start (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:273:36534)
    at mt.parse (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:283:15386)
    at td.parseCode (file:///C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/app.asar/renderer/assets/index.1c142fe5.js:286:2410)

Vemto 2.0.10 win32 10.0.25262 Locale: ru App version: 2.0.10

TiagoSilvaPereira commented 6 months ago

Hi @vimitali368 is this a new project or an existing one? Seems some model on your project is missing the parent class:

image

vimitali368 commented 6 months ago

This is a new project. There are parents models. image image

vimitali368 commented 6 months ago

image

TiagoSilvaPereira commented 6 months ago

@vimitali368 please check if this post relates to your issue: https://stackoverflow.com/questions/30631635/laravel-5-syntax-error-unexpected-extends-t-extends

Also, does this problem happen when you try to run your application from command line?

vimitali368 commented 6 months ago

No, it's not related to that. The error seems to occur when you assign a many-to-many relationship and select the With pivot columns checkbox

TiagoSilvaPereira commented 6 months ago

@vimitali368 got it. Would it be possible for you to reproduce the error and record a video so I can reproduce it here?

TiagoSilvaPereira commented 6 months ago

Fixed on 2.0.11. @vimitali368 please check if you have a model without a name on your Schema definition