src/Viserio/Component/Routing/Route/Group.php
public static function merge(array $new, array $old): array
    {
        if (isset($new['domain'])) {
            unset($old['domain']);
        }

        $new = \array_merge(static::formatAs($new, $old), [
            'namespace' => static::formatNamespace($new, $old),
            'prefix'    => static::formatGroupPrefix($new, $old),
            'where'     => static::formatWhere($new, $old),
            'suffix'    => static::formatGroupSuffix($new, $old),
        ]);

        foreach (['namespace', 'prefix', 'suffix', 'where', 'as'] as $name) {
            if (isset($old[$name])) {
                unset($old[$name]);
            }
        }

        return \array_merge_recursive($old, $new);
    }
public static function merge(array $new, array $old): array
    {
        if (isset($new['domain'])) {
            unset($old['domain']);
        }

        $new = \array_merge(static::formatAs($new, $old), [
            'namespace' => static::formatNamespace($new, $old),
            'prefix'    => static::formatGroupPrefix($new, $old),
            'where'     => static::formatWhere($new, $old),
            'suffix'    => static::formatGroupSuffix($new, $old),
        ]);

        foreach (['namespace', 'prefix', 'suffix', 'where', 'as'] as $name) {
            if (isset($old[$name])) {
                unset($old[$name]);
            }
        }

        return \array_merge_recursive($old, $new);
    }
Merge route groups into a new array.

@param array $new
@param array $old

@return array