mezzio / mezzio-router

Router subcomponent for Mezzio
https://docs.mezzio.dev/mezzio/features/router/intro/
BSD 3-Clause "New" or "Revised" License
24 stars 13 forks source link

Deprecated: array_key_exists(): in RouteCollectorFactory.php on line 59 #14

Closed nepster-web closed 3 years ago

nepster-web commented 3 years ago

Bug Report

Q A
Version(s) 3.3.0

Summary

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /app/vendor/mezzio/mezzio-router/src/RouteCollectorFactory.php on line 59

Current behavior

изображение

How to reproduce

Use latest version of symfony components (symfony di, etc)

Expected behavior

without warnings.

I propose replace array_key_exists -> isset or use type hint. https://github.com/mezzio/mezzio-router/blob/3.4.x/src/RouteCollectorFactory.php#L59

nepster-web commented 3 years ago

Symfony DI use ArrayObject

https://github.com/jsoumelidis/zend-sf-di-config/blob/master/src/Config.php#L41 https://github.com/mezzio/mezzio-skeleton/blob/3.8.x/src/MezzioInstaller/Resources/config/container-sf-di.php#L11

nepster-web commented 3 years ago

I have easy decision https://github.com/mezzio/mezzio-router/pull/15