roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.71k stars 3.06k forks source link

Method ReflectionParameter::getClass() is deprecated Bug: #3132

Closed marlonjet closed 1 year ago

marlonjet commented 1 year ago

Terms

Description

What's wrong?

I found Bedrock and Sage days ago so I'm trying to use them to develop a custom Wordpress theme. I set up a new development environment wit Local-WP. The web server is Nginx, PHP Version: 8.1.9 and MySQL 8.0.16. Then when I open the site I see all these errors image

What have you tried?

I downgrade the PHP Version to 7.4.3.0 and all those error disappeared but I read the life cicle of tis version ended on November of last year.

What insights have you gained?

Possible solutions

Temporary workarounds

Steps To Reproduce

  1. Add a new Local site
  2. Download Bedrock
  3. Download Sage
  4. Open the site

you can follow the tutorial below to install bedrock with local. https://www.youtube.com/watch?v=J6-zK4JvLXE&t=276s

Expected Behavior

to develop without any issues

Actual Behavior

those error messages

Relevant Log Output

Deprecated: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/container/Container.php on line 1197

Deprecated: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/container/Container.php on line 1208

Deprecated: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/container/Container.php on line 1220

Deprecated: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/container/Container.php on line 1233

Deprecated: Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/config/Repository.php on line 141

Deprecated: Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/config/Repository.php on line 152

Deprecated: Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/config/Repository.php on line 164

Deprecated: Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/config/Repository.php on line 175

Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/container/Container.php on line 826

Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/container/Container.php on line 900

Warning: Private methods cannot be final as they are never overridden by other classes in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/soberwp/controller/src/Controller.php on line 111

Warning: Private methods cannot be final as they are never overridden by other classes in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/soberwp/controller/src/Controller.php on line 135

Warning: Private methods cannot be final as they are never overridden by other classes in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/soberwp/controller/src/Controller.php on line 167

Warning: Private methods cannot be final as they are never overridden by other classes in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/soberwp/controller/src/Controller.php on line 180

Warning: Private methods cannot be final as they are never overridden by other classes in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/soberwp/controller/src/Controller.php on line 220

Warning: Private methods cannot be final as they are never overridden by other classes in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/soberwp/controller/src/Controller.php on line 260

Warning: Private methods cannot be final as they are never overridden by other classes in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/soberwp/controller/src/Controller.php on line 281

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/wp/wp-includes/class-wp.php on line 173

Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/wp/wp-includes/wp-db.php on line 3030

Deprecated: Return type of Illuminate\View\View::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/view/View.php on line 308

Deprecated: Return type of Illuminate\View\View::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/view/View.php on line 319

Deprecated: Return type of Illuminate\View\View::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jetdesign/Local Sites/bowman-ingredients/app/bedrock/web/app/themes/bowman/vendor/illuminate/view/View.php

Versions

PHP Version: 8.1.9 and MySQL 8.0.16, Sage v10.5.1, Bedrock v1.22.0

Log1x commented 1 year ago

This has to do with your local environment and is not a bug in Sage. I do not use Local WP, but the problem is likely due to you installing Composer dependencies with your local terminal instead of through Local's SSH/container thus having mis-matched PHP versions.

Please make a post on Discourse for support if my above tip doesn't help.