generoi / sage-woocommerce

144 stars 31 forks source link

wp acorn vendor:publish tag returns "call to undefined function base_path()" #14

Closed eduardoarandah closed 1 year ago

eduardoarandah commented 3 years ago

I'm getting this on a fresh sage10 template

wp acorn vendor:publish --tag="WooCommerce Templates"

In VendorPublishCommand.php line 277:

  Call to undefined function Illuminate\Foundation\Console\base_path()

this one works:

wp acorn vendor:publish

Which provider or tag's files would you like to publish?:
  [0] Publish files from all providers and tags listed below
  [1] Provider: Genero\Sage\WooCommerce\WooCommerceServiceProvider
  [2] Tag: WooCommerce Template Hook Overrides
  [3] Tag: WooCommerce Templates

sage version: 10

commit 982ab458bbaa34ccd471c36446ff1e23674a1b2c
Author: Ben Word <ben@benword.com>
Date:   Thu Jul 1 12:16:45 2021 -0600

    Update sponsors [ci skip]

Other strange stuff happenning in console:

➜  wp core version
5.8
➜  wp plugin list

In Plugin_Command.php line 662:

  Trying to access array offset on value of type null

➜  wp theme list

In Theme_Command.php line 472:

  Trying to access array offset on value of type null

➜  wp option get home
http://mysite.localhost

what other information can I collect for this issue?

eduardoarandah commented 3 years ago

These two issues are solved by upgrading to wp-cli 2.5.0 (from 2.4.0)

In Plugin_Command.php
Trying to access array offset on value of type null

related:

https://github.com/wp-cli/wp-cli/issues/5422

oxyc commented 3 years ago

Call to undefined function Illuminate\Foundation\Console\base_path()

Seems to be an upstream issue in roots/acorn.

tombroucke commented 3 years ago

See https://github.com/roots/acorn/issues/115

oxyc commented 3 years ago

Thanks for reporting it upstream and linking it @tombroucke. I'll leave this issue open until acorn/next is released since it's currently still a documentation issue in the README of this project.