Webim issue php 8.1

I was getting the below error:

Deprecated: Return type of Symfony\Component\HttpFoundation\ParameterBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/flynovoa/public_html/webim/vendor/symfony/http-foundation/ParameterBag.php on line 220

Deprecated: Return type of Symfony\Component\HttpFoundation\ParameterBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/flynovoa/public_html/webim/vendor/symfony/http-foundation/ParameterBag.php on line 230

Deprecated: Return type of Symfony\Component\HttpFoundation\HeaderBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/flynovoa/public_html/webim/vendor/symfony/http-foundation/HeaderBag.php on line 288

Deprecated: Return type of Symfony\Component\HttpFoundation\HeaderBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/flynovoa/public_html/webim/vendor/symfony/http-foundation/HeaderBag.php on line 298

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home2/flynovoa/public_html/webim/vendor/symfony/http-foundation/Request.php on line 316

Warning: session_start(): Session cannot be started after headers have already been sent in /home2/flynovoa/public_html/webim/libs/init.php on line 67

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home2/flynovoa/public_html/webim/vendor/symfony/http-foundation/Request.php on line 316

Deprecated: Creation of dynamic property Mibew\Asset\AssetManager::$jsAssets is deprecated in /home2/flynovoa/public_html/webim/libs/classes/Mibew/Asset/AssetManager.php on line 70

Deprecated: Creation of dynamic property Mibew\Asset\AssetManager::$cssAssets is deprecated in /home2/flynovoa/public_html/webim/libs/classes/Mibew/Asset/AssetManager.php on line 71

Deprecated: Return type of Symfony\Component\Routing\RouteCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/flynovoa/public_html/webim/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php on line 56

Deprecated: Return type of Symfony\Component\Routing\RouteCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/flynovoa/public_html/webim/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php on line 66

Deprecated: Symfony\Component\Config\Resource\FileResource implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home2/flynovoa/public_html/webim/vendor/symfony/config/Symfony/Component/Config/Resource/FileResource.php on line 21

Deprecated: Symfony\Component\Routing\Route implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home2/flynovoa/public_html/webim/vendor/symfony/routing/Symfony/Component/Routing/Route.php on line 22

Deprecated: Symfony\Component\Routing\CompiledRoute implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home2/flynovoa/public_html/webim/vendor/symfony/routing/Symfony/Component/Routing/CompiledRoute.php on line 19

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home2/flynovoa/public_html/webim/libs/classes/Mibew/Controller/Chat/UserChatController.php on line 149

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home2/flynovoa/public_html/webim/vendor/symfony/http-foundation/Request.php on line 316

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home2/flynovoa/public_html/webim/vendor/symfony/http-foundation/Response.php on line 1306

To fix the issue, open the index.php and include the below lines.

error_reporting(E_ALL);
ini_set(‘display_errors’, 0);