2amigos / yii2-ckeditor-widget

CKEditor WYSIWYG widget for Yii2.
https://2amigos.us/open-source/ckeditor-widget
Other
172 stars 112 forks source link

syntax error, unexpected '.', expecting ',' or ';' #79

Closed simone86 closed 7 years ago

simone86 commented 7 years ago

in /Applications/MAMP/htdocs/4pro/vendor/2amigos/yii2-ckeditor-widget/src/CKEditorWidgetAsset.php at line 21

class CKEditorWidgetAsset extends AssetBundle { public $sourcePath = DIR . '/assets';

........

abondr commented 7 years ago

use this way

public $sourcePath = './../assets'; [by r]

tonydspaniard commented 7 years ago

@simone86 do you mind testing on master branch?

tonydspaniard commented 7 years ago

@simone86 nevertheless, this is wrong:

public $sourcePath = DIR . '/assets';

Should be

public $sourcePath = __DIR__ . '/assets';

What is the version you have?

abumaryam commented 7 years ago

I have same problem. and I replaced it like this:

public $sourcePath =  '@vendor/2amigos/yii2-ckeditor-widget/src/assets';
aripjanovsh commented 7 years ago

I also have the same error on PHP 5.5, However, this error does not occur on PHP 5.6 and PHP 7

TomasTarasovic commented 7 years ago

Will be last release compatible with php 5.5 ?

felladrin commented 7 years ago

Same problem here. @abumaryam's solution has made the trick. Thanks!

pptyasar commented 7 years ago

I have same problem. Is issue fixed??? @tonydspaniard

tonydspaniard commented 7 years ago

@pptyasar @felladrin @abondr @aripjanovsh @simone86 It should be fixed: public $sourcePath = '@vendor/2amigos/yii2-ckeditor-widget/src/assets/'; was added.