Skip to content
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

[CI] Add PHP 8.0 to Github actions tests #4779

Merged
merged 36 commits into from
Dec 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
cc6222a
[CI] Add PHP 8.0 to Github actions tests
samsonasik Dec 4, 2020
a40578f
using --ignore-platform-req=php for php 8
samsonasik Dec 4, 2020
627567c
using --ignore-platform-req in not lowest
samsonasik Dec 4, 2020
899dfa2
use testdox="true" to know what file cause error in test
samsonasik Dec 4, 2020
a468a53
use @requires PHP < 8.0 for code not compatible with php 8
samsonasik Dec 4, 2020
4f9804b
use @requires PHP < 8.0 for code not compatible with php 8
samsonasik Dec 4, 2020
a292710
use @requires PHP < 8.0 for code not compatible with php 8
samsonasik Dec 4, 2020
545e153
use in tests @requires
samsonasik Dec 4, 2020
635d954
use @requires PHP < 8.0 for code not compatible with php 8
samsonasik Dec 4, 2020
8582801
class based @requires PHP < 8.0
samsonasik Dec 4, 2020
240bf5a
use @requires PHP < 8.0 for code not compatible with php 8
samsonasik Dec 4, 2020
a47f85d
class based @requires PHP < 8.0
samsonasik Dec 4, 2020
9bca4d5
use @requires PHP < 8.0 for code not compatible with php 8
samsonasik Dec 4, 2020
b27ea85
class based @requires PHP < 8.0
samsonasik Dec 4, 2020
5d97838
debug
samsonasik Dec 4, 2020
5e21bda
use 3 dif env
samsonasik Dec 4, 2020
c44f633
debug
samsonasik Dec 4, 2020
832d73e
debug
samsonasik Dec 4, 2020
683d6d0
debug
samsonasik Dec 4, 2020
c4d5f4d
debug
samsonasik Dec 4, 2020
a78b3d7
retry
samsonasik Dec 4, 2020
cd69f55
retry
samsonasik Dec 4, 2020
a52aaf4
Php74Test requires fix for RenameVariableToMatchMethodCallReturnTypeR…
samsonasik Dec 4, 2020
d2e335b
class based @requires PHP 7.4
samsonasik Dec 4, 2020
fdb8476
retry
samsonasik Dec 4, 2020
393141e
check unset
samsonasik Dec 4, 2020
f5932ea
check unset
samsonasik Dec 4, 2020
3accafb
check php 7.4
samsonasik Dec 4, 2020
018e111
check php 7.4
samsonasik Dec 4, 2020
86ea558
try @requires PHP = 7.4
samsonasik Dec 4, 2020
7e6e6db
php 8 syntax compat
samsonasik Dec 5, 2020
16defaa
temporary set @requires PHP >= 9.0 for not working test
samsonasik Dec 5, 2020
1171ec5
8.1 for temporary
samsonasik Dec 5, 2020
cccca25
8.1 for temporary
samsonasik Dec 5, 2020
9841113
8.1 for temporary
samsonasik Dec 5, 2020
49ff64a
remove testdox
samsonasik Dec 5, 2020
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
8 changes: 7 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
include:
- php: '7.3'
dependencies: 'lowest'
- php: '8.0'
dependencies: 'latest'


name: PHP ${{ matrix.php }} tests
steps:
Expand All @@ -28,6 +31,9 @@ jobs:
if: "matrix.dependencies == 'lowest'"

- run: composer install --no-progress --ansi
if: "matrix.dependencies != 'lowest'"
if: "matrix.dependencies == 'locked'"

- run: composer install --no-progress --ansi --ignore-platform-req=php
if: "matrix.dependencies == 'latest'"

- run: vendor/bin/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ final class InArgChainFluentMethodCallToStandaloneMethodCallRectorTest extends A
{
/**
* @dataProvider provideData()
* @requires PHP < 8.0
*/
public function test(SmartFileInfo $fileInfo): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ public function getNodeTypes(): array
*/
public function refactor(Node $node): ?Node
{
if (! $this->isAtLeastPhpVersion(PhpVersionFeature::CLASS_ON_OBJECT)) {
return null;
}

if (! $this->isName($node->name, 'class')) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP >= 8.0
*/
final class DowngradeClassOnObjectToGetClassRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
* @requires PHP >= 8.0
*/
public function test(SmartFileInfo $fileInfo): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
final class DowngradeReturnStaticTypeDeclarationRectorTest extends AbstractRectorTestCase
{
/**
* @requires PHP >= 8.0
* @requires PHP = 8.1
* @dataProvider provideData()
*/
public function test(SmartFileInfo $fileInfo): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP >= 8.0
* @requires PHP 8.1
*/
final class DowngradeUnionTypeParamDeclarationRectorTest extends AbstractRectorTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP 8.0
* @requires PHP 8.1
*/
final class DowngradeUnionTypeReturnDeclarationRectorTest extends AbstractRectorTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP >= 8.0
* @requires PHP = 8.1
TomasVotruba marked this conversation as resolved.
Show resolved Hide resolved
*/
final class DowngradeUnionTypeTypedPropertyRectorTest extends AbstractRectorTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP = 7.4
*/
final class Php74Test extends AbstractRectorTestCase
{
/**
* @requires PHP 8.0
* @dataProvider provideData()
*/
public function test(SmartFileInfo $fileInfo): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class RenameVariableToMatchMethodCallReturnTypeRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ final class StaticCallOnNonStaticToInstanceCallRectorTest extends AbstractRector
{
/**
* @dataProvider provideData()
* @requires PHP < 8.0
*/
public function test(SmartFileInfo $fileInfo): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ final class TernaryToNullCoalescingRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
* @requires PHP < 8.0
*/
public function test(SmartFileInfo $fileInfo): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ final class ListEachRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
* @requires PHP < 8.0
*/
public function test(SmartFileInfo $fileInfo): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ final class ReplaceEachAssignmentWithKeyCurrentRectorTest extends AbstractRector
{
/**
* @dataProvider provideData()
* @requires PHP < 8.0
*/
public function test(SmartFileInfo $fileInfo): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ final class BarewordStringRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
* @requires PHP < 8.0
*/
public function test(SmartFileInfo $fileInfo): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ final class CreateFunctionToAnonymousFunctionRectorTest extends AbstractRectorTe
{
/**
* @dataProvider provideData()
* @requires PHP < 8.0
*/
public function test(SmartFileInfo $fileInfo): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class ParseStrWithResultArgumentRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class StringifyDefineRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class StringsAssertNakedRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP <= 7.2
*/
final class UnsetCastRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class WhileEachToForeachRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class RealToFloatTypeCastRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class ArrayKeyExistsOnPropertyRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class FilterVarToAddSlashesRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MyCustomType extends AbstractType
}
}

class AnotherClass
class AnotherClass extends \DateTime
{
public function setDefaultOptions(SomeResolver $resolver)
{
Expand All @@ -36,7 +36,7 @@ class MyCustomType extends AbstractType
}
}

class AnotherClass
class AnotherClass extends \DateTime
{
public function setDefaultOptions(SomeResolver $resolver)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class ParseFileRectorTest extends AbstractRectorTestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Rector\TypeDeclaration\Rector\Property\CompleteVarDocTypePropertyRector;
use Symplify\SmartFileSystem\SmartFileInfo;

/**
* @requires PHP < 8.0
*/
final class CompleteVarDocTypePropertyRectorTest extends AbstractRectorTestCase
{
/**
Expand Down