ORT-Interactive-GmbH / laravel-couchbase

A Couchbase based Eloquent model and Query builder for Laravel
40 stars 26 forks source link

Weird behavior on install #49

Open jrlawhorne opened 4 years ago

jrlawhorne commented 4 years ago

When I attempt install with composer, I get this message:

> @php artisan package:discover
PHP Fatal error:  Access level to Mpociot\Couchbase\Eloquent\Model::getDateFormat() must be public (as in class Illuminate\Database\Eloquent\Model) in /Users/jr/code/jr-dev1.fieldstonesm.com/vendor/ort-interactive-gmbh/laravel-couchbase/src/Mpociot/Couchbase/Eloquent/Model.php on line 14

In Model.php line 14:

  Access level to Mpociot\Couchbase\Eloquent\Model::getDateFormat() must be p
  ublic (as in class Illuminate\Database\Eloquent\Model)

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

Installation failed, reverting ./composer.json to its original content.

When I fork the repo and try to install again from my fork (without changes), it still fails with the same error.

HOWEVER, if I clone my fork locally and link that version into my vendor directory, the install works fine. Am I pulling the wrong tag or release somehow?

I'm on Laravel 5.8.36

jrlawhorne commented 4 years ago

It looks like the default on Packagist is v0.6.4 which has the getDateFormat() function as protected. The master branch has the fix with it being public

jrlawhorne commented 4 years ago

For now, I'll do composer require mpociot/couchbase:dev-master which gets me past the install.