Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sage 10] phpdotenv error #2661

Closed
4 tasks done
strarsis opened this issue Apr 1, 2021 · 4 comments
Closed
4 tasks done

[Sage 10] phpdotenv error #2661

strarsis opened this issue Apr 1, 2021 · 4 comments

Comments

@strarsis
Copy link
Contributor

strarsis commented Apr 1, 2021

Description

With recent Sage 10 there is a fatal PHP error:

Fatal error: Uncaught Error: Call to undefined method Dotenv\Repository\RepositoryBuilder::createWithDefaultAdapters() in /srv/www/web/app/themes/test-theme/vendor/illuminate/support/Env.php on line 55

Steps to reproduce

  1. Create a Sage 10 project:
$ composer create-project roots/sage test-theme dev-master
  1. Install composer dependencies: composer install
  2. Activate the theme. Notice the fatal PHP error.

Expected behavior:
No PHP error.

Actual behavior:
PHP error:

Fatal error: Uncaught Error: Call to undefined method Dotenv\Repository\RepositoryBuilder::createWithDefaultAdapters() in /srv/www/web/app/themes/test-theme/vendor/illuminate/support/Env.php on line 55

Reproduces how often:
Always.

Versions

### 10.0.0-beta.1: TBA

Additional information

It could have something to do with acorn 2.x now being used as the Sage 10 dependency.
Or an incompatibility with a slightly older Bedrock site?

@strarsis strarsis changed the title [Sage 10] PHPDotenv error [Sage 10] phpdotenv error Apr 1, 2021
@Log1x
Copy link
Sponsor Member

Log1x commented Apr 1, 2021

Or an incompatibility with a slightly older Bedrock site?

this

@strarsis
Copy link
Contributor Author

strarsis commented Apr 1, 2021

Yes, after updating Bedrock the error went away. This means that theme and bedrock used different versions of a library - and composer only allows one (well, at least it isn't as big and nested as a node_modules/ folder...).

@strarsis strarsis closed this as completed Apr 1, 2021
@strarsis
Copy link
Contributor Author

strarsis commented Aug 5, 2021

@jijames: Were you able to fix this issue?

@minemindmedia
Copy link

I am having the same problem attempting to get Sage 10 working on an older multisite network. Instead, I receive the following errors when the theme is active:

Fatal error: Uncaught Error: Call to undefined method Dotenv\Repository\RepositoryBuilder::createWithDefaultAdapters() in /srv/www/new-site.com/current/web/app/themes/new-site/vendor/illuminate/support/Env.php:55 Stack trace: 

#0 /srv/www/new-site.com/current/web/app/themes/new-site/vendor/illuminate/support/Env.php(76): Illuminate\Support\Env::getRepository() 

#1 /srv/www/new-site.com/current/web/app/themes/new-site/vendor/roots/acorn/src/Illuminate/Foundation/Application.php(1067): Illuminate\Support\Env::get('APP_CONFIG_CACH...')

#2 /srv/www/new-site.com/current/web/app/themes/new-site/vendor/roots/acorn/src/Illuminate/Foundation/Application.php(1015): Illuminate\Foundation\Application->normalizeCachePath('APP_CONFIG_CACH...', 'cache/config.ph...') 

#3 /srv/www/new-site.com/current/web/app/themes/new-site/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/LoadConfiguration.php(24): Illuminate\Foundation\Application->getCachedConfigPath() 

#4 /srv/www/new-site.com/current/web/app/themes/new-site/vendor/roots/acorn/src in /srv/www/new-site.com/current/web/app/themes/new-site/vendor/illuminate/support/Env.php on line 55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants