Commit 4834d01a authored by dbourdere's avatar dbourdere 🤸
Browse files

Remove valid schemes

parent cc241498
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/url.iml" filepath="$PROJECT_DIR$/.idea/url.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpProjectSharedConfiguration" php_language_level="7" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="Spatie\Url\" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="Spatie\Url\Test\" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="fae4539b-8642-4103-8eea-949e53ec2ed8" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/src/Exceptions/InvalidArgument.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Exceptions/InvalidArgument.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Helpers/Arr.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Helpers/Arr.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/QueryParameterBag.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/QueryParameterBag.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Url.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Url.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/QueryParameterBagTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/QueryParameterBagTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlBuildTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlBuildTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlImmutableTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlImmutableTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlMatchesTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlMatchesTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlParseTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlParseTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlQueryParametersTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlQueryParametersTest.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tests/UrlSegmentTest.php" beforeDir="false" afterPath="$PROJECT_DIR$/tests/UrlSegmentTest.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings" synchronizationState="SYNCHRONIZE">
<pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Exceptions/InvalidArgument.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="20" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/QueryParameterBag.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="20" column="9" lean-forward="true" selection-start-line="20" selection-start-column="9" selection-end-line="20" selection-end-column="9" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Helpers/Arr.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Url.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="410">
<caret line="222" column="35" lean-forward="true" selection-start-line="222" selection-start-column="35" selection-end-line="222" selection-end-column="35" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>Spatie\Url</find>
</findStrings>
<replaceStrings>
<replace>Aboutgoods\Url</replace>
</replaceStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/Exceptions/InvalidArgument.php" />
<option value="$PROJECT_DIR$/src/QueryParameterBag.php" />
<option value="$PROJECT_DIR$/src/Url.php" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="y" value="-2" />
<option name="width" value="1920" />
<option name="height" value="1082" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="url" type="b2602c69:ProjectViewProjectNode" />
<item name="url" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="url" type="b2602c69:ProjectViewProjectNode" />
<item name="url" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="url" type="b2602c69:ProjectViewProjectNode" />
<item name="url" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="Exceptions" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="url" type="b2602c69:ProjectViewProjectNode" />
<item name="url" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="Helpers" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="fae4539b-8642-4103-8eea-949e53ec2ed8" name="Default Changelist" comment="" />
<created>1553765456703</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1553765456703</updated>
<workItem from="1553765457929" duration="226000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="226000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="-2" width="1920" height="1082" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24866596" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" />
<window_info anchor="bottom" id="Database Changes" />
<window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Database" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/Exceptions/InvalidArgument.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="20" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/QueryParameterBag.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="20" column="9" lean-forward="true" selection-start-line="20" selection-start-column="9" selection-end-line="20" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Helpers/Arr.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/Url.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="410">
<caret line="222" column="35" lean-forward="true" selection-start-line="222" selection-start-column="35" selection-end-line="222" selection-end-column="35" />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
{
"name": "spatie/url",
"name": "aboutgoods/url",
"description": "Parse, build and manipulate URL's",
"keywords": [
"spatie",
......@@ -25,12 +25,12 @@
},
"autoload": {
"psr-4": {
"Spatie\\Url\\": "src"
"Aboutgoods\\Url\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Spatie\\Url\\Test\\": "tests"
"Aboutgoods\\Url\\Test\\": "tests"
}
},
"scripts": {
......
<?php
namespace Spatie\Url\Exceptions;
namespace Aboutgoods\Url\Exceptions;
use InvalidArgumentException;
......
<?php
namespace Spatie\Url\Helpers;
namespace Aboutgoods\Url\Helpers;
class Arr
{
......
<?php
namespace Spatie\Url;
namespace Aboutgoods\Url;
use Spatie\Url\Helpers\Arr;
use Aboutgoods\Url\Helpers\Arr;
class QueryParameterBag
{
......
<?php
namespace Spatie\Url;
namespace Aboutgoods\Url;
use Spatie\Macroable\Macroable;
use Psr\Http\Message\UriInterface;
use Spatie\Url\Exceptions\InvalidArgument;
use Aboutgoods\Url\Exceptions\InvalidArgument;
class Url implements UriInterface
{
......@@ -28,14 +28,12 @@ class Url implements UriInterface
/** @var string */
protected $path = '';
/** @var \Spatie\Url\QueryParameterBag */
/** @var \Aboutgoods\Url\QueryParameterBag */
protected $query;
/** @var string */
protected $fragment = '';
const VALID_SCHEMES = ['http', 'https', 'mailto'];
public function __construct()
{
$this->query = new QueryParameterBag();
......@@ -214,10 +212,6 @@ class Url implements UriInterface
{
$scheme = strtolower($scheme);
if (! in_array($scheme, static::VALID_SCHEMES)) {
throw InvalidArgument::invalidScheme($scheme);
}
return $scheme;
}
......
<?php
namespace Spatie\Url\Test;
namespace Aboutgoods\Url\Test;
use PHPUnit\Framework\TestCase;
use Spatie\Url\QueryParameterBag;
use Aboutgoods\Url\QueryParameterBag;
class QueryParameterBagTest extends TestCase
{
......
<?php
namespace Spatie\Url\Test;
namespace Aboutgoods\Url\Test;
use Spatie\Url\Url;
use Aboutgoods\Url\Url;
use PHPUnit\Framework\TestCase;
use Spatie\Url\Exceptions\InvalidArgument;
use Aboutgoods\Url\Exceptions\InvalidArgument;
class UrlBuildTest extends TestCase
{
......
<?php
namespace Spatie\Url\Test;
namespace Aboutgoods\Url\Test;
use Spatie\Url\Url;
use Aboutgoods\Url\Url;
use PHPUnit\Framework\TestCase;
class UrlImmutableTest extends TestCase
......
<?php
namespace Spatie\Url\Test;
namespace Aboutgoods\Url\Test;
use Spatie\Url\Url;
use Aboutgoods\Url\Url;
use PHPUnit\Framework\TestCase;
class UrlMatchesTest extends TestCase
......
<?php
namespace Spatie\Url\Test;
namespace Aboutgoods\Url\Test;
use Spatie\Url\Url;
use Aboutgoods\Url\Url;
use PHPUnit\Framework\TestCase;
use Spatie\Url\Exceptions\InvalidArgument;
use Aboutgoods\Url\Exceptions\InvalidArgument;
class UrlParseTest extends TestCase
{
......
<?php
namespace Spatie\Url\Test;
namespace Aboutgoods\Url\Test;
use Spatie\Url\Url;
use Aboutgoods\Url\Url;
use PHPUnit\Framework\TestCase;
class UrlQueryParametersTest extends TestCase
......
<?php
namespace Spatie\Url\Test;
namespace Aboutgoods\Url\Test;
use Spatie\Url\Url;
use Aboutgoods\Url\Url;
use PHPUnit\Framework\TestCase;
use Spatie\Url\Exceptions\InvalidArgument;
use Aboutgoods\Url\Exceptions\InvalidArgument;
class UrlSegmentTest extends TestCase
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment