8000 chore: Upgrade dependencies to the latest and greatest by frankverhoeven · Pull Request #58 · MyOnlineStore/common-domain · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: Upgrade dependencies to the latest and greatest #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
php-version: ['8.0', '8.1']
php-version: ['8.1']
fail-fast: false

steps:
Expand Down
21 changes: 11 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,26 @@
}
},
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-bcmath": "*",
"ext-intl": "*",
"egulias/email-validator": "^2.1 || ^3.1",
"egulias/email-validator": "^3.2",
"giggsey/libphonenumber-for-php": "^8.12",
"jeremykendall/php-domain-parser": "^5.7",
"league/uri": "^5.3",
"jeremykendall/php-domain-parser": "^6.1",
"league/uri": "^6.7",
"litipk/php-bignumbers": "^0.8.6",
"moneyphp/money": "^3.3",
"ramsey/uuid": "^3.7 || ^4.0 <4.1",
"moneyphp/money": "^4.0",
"ramsey/uuid": "^4.3",
"ronanguilloux/isocodes": "^2.3",
"webmozart/assert": "^1.10"
"webmozart/assert": "^1.11"
},
"require-dev": {
"doctrine/orm": "^2.12",
"myonlinestore/coding-standard": "^3.1",
"phpbench/phpbench": "^1.2",
"phpunit/phpunit": "^8.5",
"psalm/plugin-phpunit": "^0.16",
"vimeo/psalm": "^4.22"
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.17",
"symfony/phpunit-bridge": "^6.1",
"vimeo/psalm": "^4.24"
}
}
44 changes: 27 additions & 17 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"

<phpunit bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<coverage includeUncoveredFiles="false">
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<file>src/Assertion/Assert.php</file>
</exclude>
</coverage>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener">
<arguments>
<array>
<!-- set this option to 0 to disable the DebugClassLoader integration -->
<!-- this will remove the 'class X might add return type Y' messages -->
<element key="debug-class-loader">
<integer>0</integer>
</element>
</array>
</arguments>
</listener>
</listeners>

<testsuites>
<testsuite name="Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">./src</directory>
<exclude>
<file>src/Assertion/Assert.php</file>
</exclude>
</whitelist>
</filter>
</phpunit>
111 changes: 82 additions & 29 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.6.1@e93e532e4eaad6d68c4d7b606853800eaceccc72">
<files psalm-version="4.24.0@06dd975cb55d36af80f242561738f16c5f58264f">
<file src="src/Assertion/EnumValueGuardTrait.php">
<InvalidScalarArgument occurrences="1">
<code>$value</code>
Expand All @@ -12,36 +12,28 @@
<DeprecatedInterface occurrences="1">
<code>ImmutableCollection</code>
</DeprecatedInterface>
<MissingParamType occurrences="1">
<code>$element</code>
</MissingParamType>
</file>
<file src="src/Collection/ImmutableCollectionInterface.php">
<DeprecatedClass occurrences="1">
<code>ImmutableCollectionInterface</code>
</DeprecatedClass>
<MissingReturnType occurrences="1">
<code>each</code>
</MissingReturnType>
</file>
<file src="src/Collection/MutableCollection.php">
<DeprecatedClass occurrences="1">
<code>ImmutableCollectionInterface</code>
</DeprecatedClass>
<DeprecatedInterface occurrences="1">
<code>MutableCollection</code>
</DeprecatedInterface>
<MissingParamType occurrences="1">
<code>$element</code>
</MissingParamType>
<MissingReturnType occurrences="1">
<code>each</code>
</MissingReturnType>
<UnsafeInstantiation occurrences="3">
<code>new static(\array_filter($this-&gt;toArray(), $closure))</code>
<code>new static(\array_map($closure, $this-&gt;toArray()))</code>
<code>new static(\array_values($this-&gt;toArray()))</code>
</UnsafeInstantiation>
</file>
<file src="src/Collection/MutableCollectionInterface.php">
<MissingReturnType occurrences="1">
<code>add</code>
</MissingReturnType>
</file>
<file src="src/Collection/RegionCodeCollection.php">
<DeprecatedClass occurrences="4">
<code>ImmutableCollection</code>
Expand All @@ -64,10 +56,11 @@
<ArgumentTypeCoercion occurrences="1">
<code>$this-&gt;toArray()</code>
</ArgumentTypeCoercion>
<DeprecatedClass occurrences="6">
<DeprecatedClass occurrences="7">
<code>ImmutableCollection</code>
<code>StoreId</code>
<code>StoreId[]|int[]</code>
<code>StoreIds</code>
<code>StoreIdsInterface</code>
<code>new StoreId($entry)</code>
</DeprecatedClass>
Expand Down Expand Up @@ -104,37 +97,97 @@
<code>\sprintf('1%s', \str_repeat('0', $currency-&gt;getMinorUnit()))</code>
<code>\sprintf('1%s', \str_repeat('0', $this-&gt;currency-&gt;getMinorUnit()))</code>
</ArgumentTypeCoercion>
<InvalidToString occurrences="1">
<code>string</code>
</InvalidToString>
<NullableReturnStatement occurrences="1"/>
</file>
<file src="src/Value/Money/Price.php">
<ArgumentTypeCoercion occurrences="2">
<code>(string) $amount</code>
<code>(string) $amount</code>
</ArgumentTypeCoercion>
<PossiblyNullArgument occurrences="4">
<code>$amountPerPercentage</code>
<code>$priceWithoutPercentage</code>
<code>$value</code>
<code>$value</code>
</PossiblyNullArgument>
</file>
<file src="src/Value/RegionCode.php">
<DocblockTypeContradiction occurrences="1">
<code>null === $code</code>
</DocblockTypeContradiction>
</file>
<file src="src/Value/Web/DomainName.php">
<ImpureMethodCall occurrences="16">
<code>fromString</code>
<code>registrableDomain</code>
<code>registrableDomain</code>
<code>registrableDomain</code>
<code>resolve</code>
<code>subDomain</code>
<code>suffix</code>
<code>toString</code>
<code>toString</code>
<code>toString</code>
<code>toString</code>
<code>toString</code>
<code>value</code>
<code>value</code>
<code>value</code>
<code>value</code>
</ImpureMethodCall>
<ImpureStaticProperty occurrences="3">
<code>self::$rules</code>
<code>self::$rules</code>
<code>self::$rules</code>
</ImpureStaticProperty>
</file>
<file src="src/Value/Web/IPAddress.php">
<RedundantCastGivenDocblockType occurrences="1">
<code>(string) $this-&gt;value</code>
</RedundantCastGivenDocblockType>
</file>
<file src="src/Value/Web/Url.php">
<DeprecatedInterface occurrences="1">
<code>Url</code>
</DeprecatedInterface>
<ImpureMethodCall occurrences="28">
<code>__toString</code>
<code>getAuthority</code>
<code>getFragment</code>
<code>getFragment</code>
<code>getFragment</code>
<code>getHost</code>
<code>getHost</code>
<code>getHost</code>
<code>getPath</code>
<code>getPath</code>
<code>getPath</code>
<code>getPort</code>
<code>getPort</code>
<code>getPort</code>
<code>getQuery</code>
<code>getQuery</code>
<code>getQuery</code>
<code>getScheme</code>
<code>getScheme</code>
<code>getScheme</code>
<code>getUserInfo</code>
<code>withFragment</code>
<code>withHost</code>
<code>withPath</code>
<code>withPort</code>
<code>withQuery</code>
<code>withScheme</code>
<code>withUserInfo</code>
</ImpureMethodCall>
<LessSpecificReturnStatement occurrences="7">
<code>new self($this-&gt;leagueUri-&gt;withFragment($fragment))</code>
<code>new self($this-&gt;leagueUri-&gt;withHost($host))</code>
<code>new self($this-&gt;leagueUri-&gt;withPath($path))</code>
<code>new self($this-&gt;leagueUri-&gt;withPort($port))</code>
<code>new self($this-&gt;leagueUri-&gt;withQuery($query))</code>
<code>new self($this-&gt;leagueUri-&gt;withScheme($scheme))</code>
<code>new self($this-&gt;leagueUri-&gt;withUserInfo($user, $password))</code>
</LessSpecificReturnStatement>
<MoreSpecificReturnType occurrences="7">
<code>self</code>
<code>self</code>
<code>self</code>
<code>self</code>
<code>self</code>
<code>self</code>
<code>self</code>
</MoreSpecificReturnType>
</file>
<file src="src/Value/Web/UrlPath.php">
<DocblockTypeContradiction occurrences="1">
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions src/Collection/ImmutableCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

/**
* @deprecated Should be moved to common-collection
*
* @template TKey of array-key
* @template T
* @extends MutableCollection<TKey, T>
*/
class ImmutableCollection extends MutableCollection
{
/**
* @inheritDoc
*
* @return void
*/
public function add($element)
{
Expand Down
25 changes: 13 additions & 12 deletions src/Collection/ImmutableCollectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,40 @@

/**
* @deprecated Should be moved to common-collection
*
* @template TKey of array-key
* @template T
* @implements \IteratorAggregate<TKey, T>
* @implements \ArrayAccess<TKey, T>
*/
interface ImmutableCollectionInterface extends \Countable, \IteratorAggregate, \ArrayAccess
interface ImmutableCollectionInterface extends \ArrayAccess, \Countable, \IteratorAggregate
{
/**
* @param mixed $element
* @param T $element
*
* @return bool
*/
public function contains($element);

/**
* @param callable $callback
* @param callable(T): void $callback
*/
public function each(callable $callback);

/**
* Returns if given collection is of the same type and has the same elements
*
* @param ImmutableCollectionInterface $otherCollection
*
* @return bool
*/
public function equals(ImmutableCollectionInterface $otherCollection): bool;

/**
* @return mixed
* @return T|false
*/
public function first();

/**
* @param mixed $element
* @param T $element
*
* @return mixed Index van het gegeven element, of false wanneer deze niet voorkomt in de collectie
* @return TKey|false Index van het gegeven element, of false wanneer deze niet voorkomt in de collectie
*/
public function indexOf($element);

Expand All @@ -49,7 +50,7 @@ public function isEmpty();
/**
* Sets the internal iterator to the last element in the collection and returns this element.
*
* @return mixed
* @return T|false
*/
public function last();

Expand All @@ -59,7 +60,7 @@ public function last();
public function reindex();

/**
* @return array
* @return array<TKey, T>
*/
public function toArray();
}
Loading
0