diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index eb44ced..3e25318 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -15,23 +15,19 @@ jobs: runs-on: ubuntu-latest steps: - # Шаг 1: Клонирование репозитория - name: Checkout code uses: actions/checkout@v3 - # Шаг 2: Настройка PHP и расширений - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.4' # ← Было '8.3', стало '8.4' + php-version: '8.4' # ← Changed from '8.3' to '8.4' extensions: xdebug - coverage: xdebug # ← Явно включаем драйвер покрытия + coverage: xdebug # ← Explicitly enable coverage driver - # Шаг 3: Валидация composer.json и composer.lock - name: Validate composer.json and composer.lock run: composer validate --strict - # Шаг 4: Кэширование зависимостей Composer - name: Cache Composer packages id: composer-cache uses: actions/cache@v3 @@ -41,22 +37,18 @@ jobs: restore-keys: | ${{ runner.os }}-php- - # Шаг 5: Установка зависимостей - name: Install dependencies run: composer install --prefer-dist --no-progress - # Шаг 6: Загрузка PHPUnit PHAR - name: Download PHPUnit PHAR run: | wget https://phar.phpunit.de/phpunit.phar chmod +x phpunit.phar mv phpunit.phar /usr/local/bin/phpunit - # Шаг 7: Проверка версии PHPUnit - name: Check PHPUnit version run: phpunit --version - # Шаг 8: Запуск тестов с генерацией отчета о покрытии - name: Run PHPUnit tests with coverage run: | mkdir -p build/logs @@ -64,7 +56,6 @@ jobs: env: XDEBUG_MODE: coverage - # Шаг 9: Отправка данных о покрытии в Coveralls - name: Send coverage to Coveralls uses: coverallsapp/github-action@v2 with: diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index fa02bc1..d9c2f91 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /vendor/ /composer.lock /.phpunit.cache/ -/.phpunit.result.cache \ No newline at end of file +/.phpunit.result.cache +/nbproject/ diff --git a/src/RouterInterface.php b/src/RouterInterface.php index e190f09..69cffb8 100755 --- a/src/RouterInterface.php +++ b/src/RouterInterface.php @@ -11,8 +11,6 @@ namespace Rudra\Router; -use Rudra\Exceptions\RouterException; - interface RouterInterface { public function set(array $route): void; diff --git a/tests/RouterTest.php b/tests/RouterTest.php index 8d18bfc..1297cab 100755 --- a/tests/RouterTest.php +++ b/tests/RouterTest.php @@ -16,7 +16,6 @@ use Rudra\Container\Rudra as R; use Rudra\Router\RouterFacade as Router; use Rudra\Router\Tests\Stub\Controllers\MainController; -use Rudra\Router\Tests\Stub\Middleware\Middleware; class RouterTest extends \PHPUnit\Framework\TestCase { diff --git a/tests/Stub/Controllers/AnnotatedController.php b/tests/Stub/Controllers/AnnotatedController.php index 3e355eb..9d037ca 100644 --- a/tests/Stub/Controllers/AnnotatedController.php +++ b/tests/Stub/Controllers/AnnotatedController.php @@ -30,9 +30,23 @@ public function actionView(string $id): void Rudra::config()->set(["annotatedView" => "annotatedView"]); } - public function shipInit() {} - public function containerInit() {} - public function init() {} - public function before() {} - public function after() {} + public function shipInit() + { + } + + public function containerInit() + { + } + + public function init() + { + } + + public function before() + { + } + + public function after() + { + } } diff --git a/tests/Stub/Controllers/MainController.php b/tests/Stub/Controllers/MainController.php index c6dbea8..e84475b 100755 --- a/tests/Stub/Controllers/MainController.php +++ b/tests/Stub/Controllers/MainController.php @@ -81,9 +81,23 @@ public function actionRegexGet() Rudra::config()->set(["regex" => "regex"]); } - public function shipInit() {} - public function containerInit() {} - public function init() {} - public function before() {} - public function after() {} + public function shipInit() + { + } + + public function containerInit() + { + } + + public function init() + { + } + + public function before() + { + } + + public function after() + { + } }