Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #55 from Ocramius/feature/bump-to-7.4
Browse files Browse the repository at this point in the history
Upgrade dependencies and bump to PHP 7.4 (minimum)
  • Loading branch information
Ocramius authored Mar 1, 2020
2 parents 2a97418 + 010b6d7 commit 512b506
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: php

php:
- 7.3
- 7.4

before_script:
- composer update
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
}
],
"require": {
"php": "^7.3"
"php": "^7.4"
},
"require-dev": {
"doctrine/coding-standard": "^6.0.0",
"infection/infection": "^0.15.0",
"doctrine/coding-standard": "^7.0.2",
"infection/infection": "^0.15.2",
"maglnet/composer-require-checker": "^2.0.0",
"phpbench/phpbench": "^0.17.0",
"phpunit/phpunit": "^8.5.2",
"roave/backward-compatibility-check": "^4.2.0",
"phpunit/phpunit": "^9.0.1",
"roave/backward-compatibility-check": "^4.4.0",
"satooshi/php-coveralls": "^2.2.0",
"squizlabs/php_codesniffer": "^3.5.4",
"vimeo/psalm": "^3.8.3"
"vimeo/psalm": "^3.9.3"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 3 additions & 5 deletions test/LazyMapPerformance/LazyMapBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
class LazyMapBench
{
/** @var array<string, int> */
private $array;
private array $array;

/** @var NullArrayBasedLazyMap */
private $arrayMap;
private NullArrayBasedLazyMap $arrayMap;

/** @var NullLazyMap */
private $lazyMap;
private NullLazyMap $lazyMap;

public function setUp() : void
{
Expand Down
5 changes: 1 addition & 4 deletions test/LazyMapTest/AbstractLazyMapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
class AbstractLazyMapTest extends TestCase
{
/** @var AbstractLazyMap&MockObject */
protected $lazyMap;
protected AbstractLazyMap $lazyMap;

/**
* {@inheritDoc}
*/
public function setUp() : void
{
$this->lazyMap = $this->getMockForAbstractClass(AbstractLazyMap::class);
Expand Down
14 changes: 5 additions & 9 deletions test/LazyMapTest/CallbackLazyMapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@
/** @covers \LazyMap\CallbackLazyMap */
class CallbackLazyMapTest extends TestCase
{
/** @var CallbackLazyMap */
protected $lazyMap;
protected CallbackLazyMap $lazyMap;

/** @var CallableClass&MockObject */
protected $callback;
protected CallableClass $callback;

/**
* {@inheritDoc}
*/
public function setUp() : void
{
$this->callback = $this->createMock(CallableClass::class);
Expand All @@ -44,8 +40,8 @@ public function testDirectPropertyAccess() : void
return $name . ' - ' . $count;
});

self::assertSame('foo - 1', $this->lazyMap->foo);
self::assertSame('bar - 2', $this->lazyMap->bar);
self::assertSame('baz\\tab - 3', $this->lazyMap->{'baz\\tab'});
self::assertEquals('foo - 1', $this->lazyMap->foo);
self::assertEquals('bar - 2', $this->lazyMap->bar);
self::assertEquals('baz\\tab - 3', $this->lazyMap->{'baz\\tab'});
}
}
6 changes: 1 addition & 5 deletions test/LazyMapTest/NullLazyMapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
/** @covers \LazyMap\AbstractLazyMap */
class NullLazyMapTest extends TestCase
{
/** @var AbstractLazyMap */
protected $lazyMap;
protected AbstractLazyMap $lazyMap;

/**
* {@inheritDoc}
*/
public function setUp() : void
{
$this->lazyMap = new NullLazyMap();
Expand Down
2 changes: 1 addition & 1 deletion test/LazyMapTestAsset/NullArrayBasedLazyMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class NullArrayBasedLazyMap
{
/** @var array<string, int> */
private $items = [];
private array $items = [];

/** Lazy getter - retrieves or instantiates a key in the map */
public function & get(string $name) : int
Expand Down

0 comments on commit 512b506

Please sign in to comment.