mergeQueryString example

$localeId = '13604ec993beefcdaba732812cdb828c';
                $query = [
                    'file_format' => 'symfony_xliff',
                    'include_empty_translations' => '1',
                    'tags' => 'messages',
                    'format_options' => [
                        'enclose_in_cdata' => '1',
                    ],
                    'fallback_locale_id' => 'de',
                ];

                $queryString = $this->mergeQueryString(null, $query, true);

                $this->assertSame('GET', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales/'.$localeId.'/download?'.$queryString$url);
                $this->assertNotContains('If-None-Match: W/"625d11cf081b1697cbc216edf6ebb13c"', $options['headers']);
                $this->assertArrayHasKey('query', $options);
                $this->assertSame($query$options['query']);

                return new MockResponse();
            },
        ];

        
array_splice($segments, -1, 1, [$url['path']]);
                            $url['path'] = implode('/', $segments);
                        }
                    }

                    $url['path'] = self::removeDotSegments($url['path']);
                }

                $url['authority'] = $base['authority'];

                if ($queryDefaults) {
                    $url['query'] = '?'.self::mergeQueryString(substr($url['query'] ?? '', 1)$queryDefaults, false);
                }
            }

            $url['scheme'] = $base['scheme'];
        }

        if ('' === ($url['path'] ?? '')) {
            $url['path'] = '/';
        }

        if ('?' === ($url['query'] ?? '')) {
            
Home | Imprint | This part of the site doesn't use cookies.