diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 467daf9..0000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,22 +0,0 @@ -engines: - phpmd: - enabled: true - checks: - Design/TooManyPublicMethods: - enabled: true - Naming/ShortVariable: - enabled: true - CleanCode/StaticAccess: - enabled: true - Controversial/CamelCaseMethodName: - enabled: true - fixme: - enabled: true - duplication: - enabled: true - config: - languages: - - php: -ratings: - paths: - - src/** diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e2ccc7b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI + +on: [push, pull_request] + +jobs: + build-test: + runs-on: ${{ matrix.os }} + + env: + PHP_EXTENSIONS: json + PHP_INI_VALUES: assert.exception=1, zend.assertions=1 + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - windows-latest + php-version: + - 7.1 + - 7.4 + phpunit-version: + - 7.5.20 + dependencies: + - lowest + - highest + name: PHPUnit Tests + steps: + - name: Configure git to avoid issues with line endings + if: matrix.os == 'windows-latest' + run: git config --global core.autocrlf false + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + tools: composer:v5, phpunit:${{ matrix.phpunit-versions }} + coverage: xdebug + extensions: ${{ env.PHP_EXTENSIONS }} + ini-values: ${{ env.PHP_INI_VALUES }} + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + - name: Install lowest dependencies with composer + if: matrix.dependencies == 'lowest' + run: composer update --no-ansi --no-interaction --no-progress --prefer-lowest + - name: Install highest dependencies with composer + if: matrix.dependencies == 'highest' + run: composer update --no-ansi --no-interaction --no-progress + - name: Run tests with phpunit + run: composer test \ No newline at end of file diff --git a/.gitignore b/.gitignore index f3bdaaa..d85ecfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ composer.lock vendor/ -tests/tmp/* \ No newline at end of file +.idea/ +.phpunit.result.cache \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 91dfc80..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/dictionaries/simon.xml b/.idea/dictionaries/simon.xml deleted file mode 100644 index 87f7ef2..0000000 --- a/.idea/dictionaries/simon.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - bootmanager - bootmanagers - csrf - middlewares - pecee - urldecode - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 15a15b2..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml deleted file mode 100644 index e41dd85..0000000 --- a/.idea/markdown-navigator.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/markdown-navigator/profiles_settings.xml b/.idea/markdown-navigator/profiles_settings.xml deleted file mode 100644 index 57927c5..0000000 --- a/.idea/markdown-navigator/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index a5ba0c2..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml deleted file mode 100644 index 82ec95c..0000000 --- a/.idea/php-test-framework.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml deleted file mode 100644 index 02facb2..0000000 --- a/.idea/php.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/simple-php-router.iml b/.idea/simple-php-router.iml deleted file mode 100644 index e5bc18a..0000000 --- a/.idea/simple-php-router.iml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index c262aba..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,939 +0,0 @@ - - - - - - - - - - - - - - - - - $PROJECT_DIR$/composer.json - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - options - parent::set - parseParameters - stripos - setPrefix - var_dum - parse - getParams - setQuery - contains - matchRoute - ->getValue - ->find - function find - Req - value( - file( - setUrl - TODO - input()->get - function get - REQUEST_TYPE_ - or method - setDebugEnabled - debugEnabled - optiona - \/ - requirements - ler = new I - csrf_token - - - D:\Workspace\simple-php-router\src\Pecee\SimpleRouter\Route - D:\Workspace\simple-php-router\src - D:\Workspace\simple-php-router\tests\Pecee\SimpleRouter\Dummy - D:\Workspace\simple-php-router - E:\Workspace\simple-php-router\tests - E:\Workspace\simple-php-router\src\Pecee - E:\Workspace\simple-php-router\tests\Pecee\SimpleRouter - E:\Workspace\simple-php-router\src\Pecee\SimpleRouter\Route - E:\Workspace\simple-php-router\src\Pecee\SimpleRouter - E:\Workspace\simple-php-router\src - E:\Workspace\simple-php-router - - - - - - - - - false - - false - false - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -