runway: Not able to install Eloquent Driver in combination with Runway
Description
I have an existing SimpleCommerce setup which is using the database for Order and Customer data via Runway. Now I’m trying to move all other Statamic collections, where products reside as well, over to the database using the Eloquent Driver. Following the commands stated on here I run into the following Runway Exception when I execute this step:
php artisan vendor:publish --provider="Statamic\Eloquent\ServiceProvider" --tag=migrations
Now I’m not sure if this is a Runway issue or Eloquent Driver issue. Since the exception is thrown from Runway I’m posting it here.
[2023-09-05 13:23:16] local.ERROR: DoubleThreeDigital\Runway\Resource::__construct(): Argument #4 ($blueprint) must be of type Statamic\Fields\Blueprint, null given, called in D:\dev\xampp\nofam-web-peak\vendor\doublethreedigital\runway\src\Runway.php on line 44 {"exception":"[object] (TypeError(code: 0): DoubleThreeDigital\\Runway\\Resource::__construct(): Argument #4 ($blueprint) must be of type Statamic\\Fields\\Blueprint, null given, called in D:\\dev\\xampp\\nofam-web-peak\\vendor\\doublethreedigital\\runway\\src\\Runway.php on line 44 at D:\\dev\\xampp\\nofam-web-peak\\vendor\\doublethreedigital\\runway\\src\\Resource.php:37)
[stacktrace]
#0 D:\\dev\\xampp\\nofam-web-peak\\vendor\\doublethreedigital\\runway\\src\\Runway.php(44): DoubleThreeDigital\\Runway\\Resource->__construct('customers', Object(App\\Models\\CustomerModel), 'Customers', NULL, Array)
#1 D:\\dev\\xampp\\nofam-web-peak\\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\Arr.php(585): DoubleThreeDigital\\Runway\\Runway::DoubleThreeDigital\\Runway\\{closure}(Array, 'App\\\\Models\\\\Cust...')
#2 D:\\dev\\xampp\\nofam-web-peak\\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\Collection.php(825): Illuminate\\Support\\Arr::mapWithKeys(Array, Object(Closure))
#3 D:\\dev\\xampp\\nofam-web-peak\\vendor\\doublethreedigital\\runway\\src\\Runway.php(18): Illuminate\\Support\\Collection->mapWithKeys(Object(Closure))
#4 D:\\dev\\xampp\\nofam-web-peak\\vendor\\doublethreedigital\\runway\\src\\ServiceProvider.php(77): DoubleThreeDigital\\Runway\\Runway::discoverResources()
#5 D:\\dev\\xampp\\nofam-web-peak\\vendor\\statamic\\cms\\src\\Statamic.php(352): DoubleThreeDigital\\Runway\\ServiceProvider->DoubleThreeDigital\\Runway\\{closure}()
#6 D:\\dev\\xampp\\nofam-web-peak\\vendor\\statamic\\cms\\src\\Providers\\AppServiceProvider.php(29): Statamic\\Statamic::runBootedCallbacks()
#7 D:\\dev\\xampp\\nofam-web-peak\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(1053): Statamic\\Providers\\AppServiceProvider->Statamic\\Providers\\{closure}(Object(Illuminate\\Foundation\\Application))
#8 D:\\dev\\xampp\\nofam-web-peak\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(996): Illuminate\\Foundation\\Application->fireAppCallbacks(Array)
#9 D:\\dev\\xampp\\nofam-web-peak\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Bootstrap\\BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
#10 D:\\dev\\xampp\\nofam-web-peak\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(261): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#11 D:\\dev\\xampp\\nofam-web-peak\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(447): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#12 D:\\dev\\xampp\\nofam-web-peak\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(199): Illuminate\\Foundation\\Console\\Kernel->bootstrap()
#13 D:\\dev\\xampp\\nofam-web-peak\\artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#14 {main}
"}
Steps to reproduce
- Have a Statamic installation running SimpleCommerce with Orders and Cusomters in the DB via Runway
- composer require statamic/eloquent-driver
- php artisan vendor:publish --tag=“statamic-eloquent-config”
- In the config/statamic/eloquent-driver.php file, change entries.model to \Statamic\Eloquent\Entries\UuidEntryModel::class.
- Run php artisan vendor:publish --provider=“Statamic\Eloquent\ServiceProvider” --tag=migrations. <-- here the error occurs
Environment
I have to remove the eloquent_driver config file or else I’m not able to run php please support:details.
Results are:
Environment
Application Name: Nofam
Laravel Version: 10.21.0
PHP Version: 8.2.9
Composer Version: 2.4.2
Environment: local
Debug Mode: OFF
URL: 127.0.0.1:8000/
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Simple Commerce
Currencies: EUR
Gateways: Mollie
Repository: Customer: DoubleThreeDigital\SimpleCommerce\Customers\EloquentCustomerRepository
Repository: Order: DoubleThreeDigital\SimpleCommerce\Orders\EloquentOrderRepository
Repository: Product: DoubleThreeDigital\SimpleCommerce\Products\EntryProductRepository
Shipping Methods: Package shipping method
Tax Engine: DoubleThreeDigital\SimpleCommerce\Tax\BasicTaxEngine
Statamic
Addons: 7
Antlers: regex
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.20.0 PRO
Statamic Addons
doublethreedigital/runway: 5.2.0
doublethreedigital/simple-commerce: 5.3.6
joetannenbaum/antlers-stack-tags: 0.1.0
mitydigital/sitemapamic: 2.3.8
roorda-ict/statamic-entries-export: 2.1.0
statamic/eloquent-driver: 2.6.1
stoffelio/statamic-turnstile: 1.1.0
Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: file
Collections: file
Entries: file
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Taxonomies: file
Terms: file
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 17 (7 by maintainers)
It’ll be something on the Runway side. I just need to whip up a fresh site to try and replicate this.
For some reason, I’m currently unable to reproduce it with my current sandbox site.
Glad you can solve it this way @itsmesaskovic. I’m not sure if there’s anything I can do on the Peak addon site to remedy this at the moment. It could be referencing fieldsets like this is simply not compatible with Eloquent at the moment. I can’t quite remember at this point.