You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just run into a major bug with the base Model class. The belongsTo method references the Illuminate\Support\Str class but does not import it.
Testing started at 21:24 ...
PHPUnit 4.2.2 by Sebastian Bergmann.
Configuration read from C:\xampp\htdocs\corcel\phpunit.xml
PHP Fatal error: Uncaught Error: Class 'Corcel\Str' not found in C:\xampp\htdocs\corcel\src\Model.php:39
Stack trace:
#0 C:\xampp\htdocs\corcel\src\PostMeta.php(32): Corcel\Model->belongsTo('Corcel\\Post')
#1 C:\xampp\htdocs\corcel\vendor\illuminate\database\Eloquent\Model.php(2689): Corcel\PostMeta->post()
#2 C:\xampp\htdocs\corcel\vendor\illuminate\database\Eloquent\Model.php(2662): Illuminate\Database\Eloquent\Model->getRelationshipFromMethod('post')
#3 C:\xampp\htdocs\corcel\src\Model.php(76): Illuminate\Database\Eloquent\Model->getRelationValue('post')
#4 C:\xampp\htdocs\corcel\vendor\illuminate\database\Eloquent\Model.php(2604): Corcel\Model->getRelationValue('post')
#5 C:\xampp\htdocs\corcel\vendor\illuminate\database\Eloquent\Model.php(3392): Illuminate\Database\Eloquent\Model->getAttribute('post')
#6 C:\xampp\htdocs\corcel\tests\PostMetaTest.php(29): Illuminate\Database\Eloquent\Model->__get('post')
#7 [internal function]: PostMetaTest->testPostRelation()
#8 C:\xampp\htdocs\corcel\vendor\phpunit\phpunit\src\Framework in C:\xampp\htdocs\corcel\src\Model.php on line 39
Fatal error: Uncaught Error: Class 'Corcel\Str' not found in C:\xampp\htdocs\corcel\src\Model.php:39
Stack trace:
#0 C:\xampp\htdocs\corcel\src\PostMeta.php(32): Corcel\Model->belongsTo('Corcel\\Post')
#1 C:\xampp\htdocs\corcel\vendor\illuminate\database\Eloquent\Model.php(2689): Corcel\PostMeta->post()
#2 C:\xampp\htdocs\corcel\vendor\illuminate\database\Eloquent\Model.php(2662): Illuminate\Database\Eloquent\Model->getRelationshipFromMethod('post')
#3 C:\xampp\htdocs\corcel\src\Model.php(76): Illuminate\Database\Eloquent\Model->getRelationValue('post')
#4 C:\xampp\htdocs\corcel\vendor\illuminate\database\Eloquent\Model.php(2604): Corcel\Model->getRelationValue('post')
#5 C:\xampp\htdocs\corcel\vendor\illuminate\database\Eloquent\Model.php(3392): Illuminate\Database\Eloquent\Model->getAttribute('post')
#6 C:\xampp\htdocs\corcel\tests\PostMetaTest.php(29): Illuminate\Database\Eloquent\Model->__get('post')
#7 [internal function]: PostMetaTest->testPostRelation()
#8 C:\xampp\htdocs\corcel\vendor\phpunit\phpunit\src\Framework in C:\xampp\htdocs\corcel\src\Model.php on line 39
Process finished with exit code 255
I ran into this when using PostMeta, but this affects a lot of classes. I've got a fix for this with a test for the PostMeta class, which I'll raise as a pull request.
The text was updated successfully, but these errors were encountered:
Just run into a major bug with the base
Model
class. ThebelongsTo
method references theIlluminate\Support\Str
class but does not import it.I ran into this when using
PostMeta
, but this affects a lot of classes. I've got a fix for this with a test for thePostMeta
class, which I'll raise as a pull request.The text was updated successfully, but these errors were encountered: