Skip to content

Commit

Permalink
Update dev dependencies (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtk3d committed Sep 19, 2023
1 parent 1c866a3 commit e5c7193
Show file tree
Hide file tree
Showing 29 changed files with 48 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ clover.xml
/coverage
.idea
composer.lock
/.phpunit.cache/
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"php": "^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.9",
"phpunit/phpunit": "^8.4",
"phpstan/phpstan": "^1.9"
"friendsofphp/php-cs-fixer": "^3.14",
"phpunit/phpunit": "^9.6",
"phpstan/phpstan": "^1.10"
},
"autoload": {
"psr-4": {
Expand All @@ -40,7 +40,7 @@
"php-cs-fixer fix"
],
"phpstan": [
"phpstan analyse src tests --level=4"
"phpstan analyse -c phpstan.neon"
],
"phpunit": [
"phpunit --color=always"
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
parameters:
phpVersion: 80000
level: 4
paths:
- src
- tests
ignoreErrors:
-
message: "#^Method Munus\\\\Collection\\\\Map\\:\\:tail\\(\\) should return Munus\\\\Collection\\\\Traversable\\<V\\> but returns Munus\\\\Tuple\\.$#"
Expand Down
23 changes: 11 additions & 12 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.4/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
bootstrap="vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutCoversAnnotation="true"
Expand All @@ -9,15 +9,14 @@
colors="true"
verbose="true"
>
<testsuites>
<testsuite name="default">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="default">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>
</phpunit>
1 change: 1 addition & 0 deletions src/Collection/GenericList.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @template T
*
* @extends Sequence<T>
*/
abstract class GenericList extends Sequence
Expand Down
1 change: 1 addition & 0 deletions src/Collection/GenericList/Cons.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* * Non-empty GenericList, consisting of a head and tail.
*
* @template T
*
* @extends GenericList<T>
*/
final class Cons extends GenericList
Expand Down
1 change: 1 addition & 0 deletions src/Collection/GenericList/Nil.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @template T
*
* @extends GenericList<T>
*/
final class Nil extends GenericList
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Iterator/ArrayIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @template T
*
* @template-extends Iterator<T>
*/
final class ArrayIterator extends Iterator
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Iterator/CompositeIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @template T
*
* @template-extends Iterator<T>
*/
final class CompositeIterator extends Iterator
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Iterator/StreamIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @template T
*
* @template-extends Iterator<T>
*/
final class StreamIterator extends Iterator
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
* @template K
* @template V
*
* @extends Traversable<V>
*/
final class Map extends Traversable
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Sequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Sequence - immutable sequential data structures.
*
* @template T
*
* @template-extends Traversable<T>
*/
abstract class Sequence extends Traversable
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Set.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @template T
*
* @extends Traversable<T>
*/
final class Set extends Traversable
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

/**
* @template T
*
* @extends Sequence<T>
*/
abstract class Stream extends Sequence
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Stream/Collector/GenericCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* @template T
* @template R
*
* @implements Collector<T,R>
*/
final class GenericCollector implements Collector
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Stream/Cons.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Non-empty Stream, consisting of a head and tail.
*
* @template T
*
* @extends Stream<T>
*/
final class Cons extends Stream
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/Stream/EmptyStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

use Munus\Collection\Iterator;
use Munus\Collection\Stream;
use Munus\Collection\T;
use Munus\Collection\Traversable;

/**
* Empty is better but it is reserved keyword.
*
* @template T
*
* @extends Stream<T>
*/
final class EmptyStream extends Stream
Expand Down
1 change: 1 addition & 0 deletions src/Collection/Traversable.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Iterator, which may vary each time it is called.
*
* @template T
*
* @template-extends Value<T>
*/
abstract class Traversable extends Value implements \IteratorAggregate
Expand Down
1 change: 1 addition & 0 deletions src/Control/Either.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @template L
* @template R
*
* @template-extends Value<R>
*/
abstract class Either extends Value
Expand Down
1 change: 1 addition & 0 deletions src/Control/Either/Left.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* @template L
* @template R
*
* @template-extends Either<L,R>
*/
final class Left extends Either
Expand Down
1 change: 1 addition & 0 deletions src/Control/Either/Right.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* @template L
* @template R
*
* @template-extends Either<L,R>
*/
final class Right extends Either
Expand Down
2 changes: 2 additions & 0 deletions src/Control/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @template T
*
* @extends Value<T>
*/
abstract class Option extends Value
Expand Down Expand Up @@ -44,6 +45,7 @@ public static function some($value): self

/**
* @phpstan-return Option<T>
*
* @psalm-return Option<none>
*/
public static function none(): self
Expand Down
1 change: 1 addition & 0 deletions src/Control/Option/None.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @template T
*
* @template-extends Option<T>
*/
final class None extends Option
Expand Down
1 change: 1 addition & 0 deletions src/Control/Option/Some.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @template T
*
* @template-extends Option<T>
*/
final class Some extends Option
Expand Down
1 change: 1 addition & 0 deletions src/Control/TryTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/**
* @template T
*
* @template-extends Value<T>
*/
abstract class TryTo extends Value
Expand Down
1 change: 1 addition & 0 deletions src/Control/TryTo/Failure.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @template T
*
* @template-extends TryTo<T>
*/
final class Failure extends TryTo
Expand Down
1 change: 1 addition & 0 deletions src/Control/TryTo/Success.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @template T
*
* @template-extends TryTo<T>
*/
final class Success extends TryTo
Expand Down
2 changes: 2 additions & 0 deletions src/Lazy.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

/**
* @template T
*
* @extends Value<T>
*/
final class Lazy extends Value
{
/**
* @var T
*
* @psalm-suppress PropertyNotSetInConstructor
*/
private $value;
Expand Down
1 change: 1 addition & 0 deletions tests/Stub/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ final class Result
{
/**
* @return Either<Failure,Success>
*
* @psalm-suppress MixedReturnTypeCoercion
*/
public static function generate(bool $success = true): Either
Expand Down

0 comments on commit e5c7193

Please sign in to comment.