nuvoleweb / ui_patterns

[NOTE] Development has moved to https://drupal.org/project/ui_patterns
https://drupal.org/project/ui_patterns
GNU General Public License v2.0
85 stars 56 forks source link

PHP 8.1 compatibility #342

Closed FlorentTorregrosa closed 1 year ago

FlorentTorregrosa commented 2 years ago

On:

I have a fatal error with:

Deprecated: Return type of Drupal\ui_patterns\Definition\PatternDefinition::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /project/app/modules/contrib/ui_patterns/src/Definition/ArrayAccessDefinitionTrait.php on line 17
The website encountered an unexpected error. Please try again later.
RuntimeException: Failed to start the session because headers have already been sent by "/project/vendor/composer/ClassLoader.php" at line 571. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 152 of /project/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (Line: 162)
Drupal\Core\Session\SessionManager->startNow() (Line: 110)
Drupal\Core\Session\SessionManager->start() (Line: 57)
Symfony\Component\HttpFoundation\Session\Session->start() (Line: 240)
Drupal\big_pipe\Render\BigPipe->performPreSendTasks() (Line: 295)
Drupal\big_pipe\Render\BigPipe->sendContent(Object) (Line: 112)
Drupal\big_pipe\Render\BigPipeResponse->sendContent() (Line: 381)
Symfony\Component\HttpFoundation\Response->send() (Line: 20)
require('/project/app/index.php') (Line: 4)
JPustkuchen commented 2 years ago

Same here!

LOBsTerr commented 2 years ago

I think the correct solution to set the return types and not suppress this errors.

PR: https://github.com/nuvoleweb/ui_patterns/pull/357

LOBsTerr commented 2 years ago

If some needs a patch for 1.2 version ui_patterns-php8.1-compatibility.txt

mika2na commented 1 year ago

With 8.x-1.3 version released it should be ok.