diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bc49e6..4b6e508 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,8 @@ -name: CI +name: Continuous Integration on: - pull_request: null - push: - branches: - - master + - pull_request + - push jobs: tests: @@ -17,11 +15,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v1 + - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} coverage: none - tools: phpunit + - run: 'composer require phpunit/phpunit:*' - run: composer require psr/log psr/container - - run: phpunit -v --colors=always tests + - run: vendor/bin/phpunit -v tests diff --git a/README.md b/README.md index 04db520..4c5f240 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Crystal PHP Microframework [![Build Status](https://travis-ci.org/EmanueleMinotto/crystal.svg?branch=master)](https://travis-ci.org/EmanueleMinotto/crystal) +# Crystal PHP Microframework ![Continuous Integration](https://github.com/EmanueleMinotto/crystal/workflows/Continuous%20Integration/badge.svg) * Documentation: https://github.com/EmanueleMinotto/crystal/wiki * Contributing: https://github.com/EmanueleMinotto/crystal/wiki/Contributing diff --git a/crystal.php b/crystal.php index 4a2c984..cd7db7f 100644 --- a/crystal.php +++ b/crystal.php @@ -228,7 +228,7 @@ $argv[0] = $cb; // register_shutdown_function is used to call added functions when script ends // http://it2.php.net/manual/en/function.register-shutdown-function.php - return call_user_func_array('register_shutdown_function', $argv); + return call_user_func_array('register_shutdown_function', array_values($argv)); }; goto invoke_deploy; @@ -293,7 +293,7 @@ // register_shutdown_function is used to call added functions when script ends // http://it2.php.net/manual/en/function.register-shutdown-function.php - return call_user_func_array('register_shutdown_function', $submatches); + return call_user_func_array('register_shutdown_function', array_values($submatches)); } };