tomzx / php-semver-checker

Compares two source sets and determines the appropriate semantic versioning to apply.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support method visibility change in classes/traits

tomzx opened this issue · comments

Support method visibility change in classes/traits

Code before

<?php
namespace Test\Vcs;

/**
 * @api
 */
class TestClass
{
    protected $protectedProperty;
    public $publicProperty;
    private $privateProperty;

    /**
     * @param array $methodParam
     */
    public function testMethod(array $methodParam)
    {
    }
}

Testcase after Commit:

namespace Test\Vcs;

/**
 * @api
 */
class TestClass
{
    private $protectedProperty;
    private $publicProperty;
    private $privateProperty;

    /**
     * @param array $methodParam
     */
    private function testMethod(array $methodParam)
    {
    }
}

There should be a check for methods and properties that getting private.