Skip to content
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
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [3.x, 4.x, 5.x, 6.x]
branches: [6.x]
pull_request:
branches: ['*']
workflow_dispatch:
Expand All @@ -13,10 +13,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.2', '8.3', '8.4']
php-version: ['8.3', '8.4', '8.5']
prefer-lowest: ['']
include:
- php-version: '8.2'
- php-version: '8.3'
prefer-lowest: 'prefer-lowest'

steps:
Expand All @@ -27,7 +27,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
coverage: none
coverage: pcov

- name: Get composer cache directory
id: composer-cache
Expand All @@ -52,20 +52,20 @@ jobs:
fi

- name: Setup problem matchers for PHPUnit
if: matrix.php-version == '8.2'
if: matrix.php-version == '8.3'
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run PHPUnit
run: |
if [[ "${{ matrix.php-version }}" == "8.2" && "${{ matrix.prefer-lowest }}" != "prefer-lowest" ]]; then
if [[ "${{ matrix.php-version }}" == "8.3" && "${{ matrix.prefer-lowest }}" != "prefer-lowest" ]]; then
export CODECOVERAGE=1
vendor/bin/phpunit --display-incomplete --display-skipped --coverage-clover=coverage.xml
else
vendor/bin/phpunit
fi

- name: Submit code coverage
if: matrix.php-version == '8.2' && matrix.prefer-lowest != 'prefer-lowest'
if: matrix.php-version == '8.3' && matrix.prefer-lowest != 'prefer-lowest'
uses: codecov/codecov-action@v5

cs-stan:
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
extensions: mbstring, intl
tools: cs2pr
coverage: none
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DEV_DEPENDENCIES = cakephp/cakephp:5.x-dev \
cakephp/cakephp-codesniffer:^5.0 \
mikey179/vfsstream:^1.6.8 \
phpunit/phpunit:^10.5.38 \
phpunit/phpunit:^12.1.3 \
cakephp/migrations:^5.0.0

install-dev:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"setup": "cp composer.json composer.backup && make install-dev && mv composer.backup composer.json",
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit"
"test": "phpunit --display-all-issues"
},
"config": {
"sort-packages": true,
Expand Down
4 changes: 3 additions & 1 deletion tests/TestCase/Command/LinterCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public function testLinterSuccess()
*/
public function testLinterFail()
{
mkdir(TMP . 'linter', 0777, true);
if (!file_exists(TMP . 'linter')) {
mkdir(TMP . 'linter', 0777, true);
}
file_put_contents(TMP . 'linter/BrokenExample.php', '<?php class X }');
$this->exec('linter tmp/linter/ -v');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\ClassMethod\FormBuildValidatorRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class FormBuildValidatorRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\ClassMethod\FormExecuteToProcessRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class FormExecuteToProcessRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\AddMethodCallArgsRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class AddMethodCallArgsRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\ArrayToFluentCallRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class ArrayToFluentCallRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\BinaryColumnToVarbinaryRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class BinaryColumnToVarbinaryRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\BreadcrumbsHelperAddManyRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class BreadcrumbsHelperAddManyRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\ChangeEntityTraitSetArrayToPatch;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class ChangeEntityTraitSetArrayToPatchTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\EntityPatchRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class EntityPatchRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\EventManagerOnRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class EventManagerOnRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\ModalToGetSetRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class ModalToGetSetRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\NewEntityToNewEmptyEntityRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class NewEntityToNewEmptyEntityRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\NewExprToFuncRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class NewExprToFuncRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\OptionsArrayToNamedParametersRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class OptionsArrayToNamedParametersRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\PaginatorCounterFormatRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class PaginatorCounterFormatRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\QueryParamAccessRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class QueryParamAccessRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\RemoveIntermediaryMethodRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class RemoveIntermediaryMethodRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\RemoveMethodCallArgsRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class RemoveMethodCallArgsRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\RenameMethodCallBasedOnParameterRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class RenameMethodCallBasedOnParameterRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
namespace Cake\Upgrade\Test\TestCase\Rector\MethodCall\AddMethodCallArgsRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;

final class ReplaceCommandArgsIoWithPropertiesRectorTest extends AbstractRectorTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
Expand Down
Loading
Loading