From 8aeb14d2b5074bac234e62cb9d870a2edc5cd3a7 Mon Sep 17 00:00:00 2001 From: MGatner Date: Thu, 22 Oct 2020 18:46:43 +0000 Subject: [PATCH] Apply CI4 dev toolkit --- .gitattributes | 13 + .github/dependabot.yml | 12 + .github/workflows/analyze.yml | 68 ++++ .github/workflows/{phpunit.yml => test.yml} | 17 +- .gitignore | 2 +- composer.json | 16 +- composer.lock | 341 +++++++++++++++++++- phpstan.neon.dist | 23 ++ phpunit.xml.dist | 2 - 9 files changed, 465 insertions(+), 29 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/analyze.yml rename .github/workflows/{phpunit.yml => test.yml} (79%) create mode 100644 phpstan.neon.dist diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fcf895c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +/.github export-ignore +/docs export-ignore +/examples export-ignore +/tests export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/phpunit.xml.dist export-ignore +/phpstan.neon.dist export-ignore + +# Configure diff output for .php and .phar files. +*.php diff=php +*.phar -diff diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..fd20b19 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: +- package-ecosystem: composer + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml new file mode 100644 index 0000000..58d5b9d --- /dev/null +++ b/.github/workflows/analyze.yml @@ -0,0 +1,68 @@ +# When a PR is opened or a push is made, perform +# a static analysis check on the code using PHPStan. +name: PHPStan + +on: + pull_request: + branches: + - 'develop' + paths: + - 'app/**' + - 'tests/**' + - 'phpstan*' + - '.github/workflows/analyze.yml' + push: + branches: + - 'develop' + paths: + - 'app/**' + - 'tests/**' + - 'phpstan*' + - '.github/workflows/analyze.yml' + +jobs: + build: + name: Analyze code + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: latest + tools: composer, pecl, phpunit + extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3 + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Create composer cache directory + run: mkdir -p ${{ steps.composer-cache.outputs.dir }} + + - name: Cache composer dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Create PHPStan cache directory + run: mkdir -p build/phpstan + + - name: Cache PHPStan results + uses: actions/cache@v2 + with: + path: build/phpstan + key: ${{ runner.os }}-phpstan-${{ github.sha }} + restore-keys: ${{ runner.os }}-phpstan- + + - name: Install dependencies + run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader + # env: + # COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} + + - name: Run static analysis + run: vendor/bin/phpstan analyze diff --git a/.github/workflows/phpunit.yml b/.github/workflows/test.yml similarity index 79% rename from .github/workflows/phpunit.yml rename to .github/workflows/test.yml index 1e647e0..ee9a7a9 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,10 @@ name: PHPUnit on: pull_request: - branches: + branches: + - develop + push: + branches: - develop jobs: @@ -22,7 +25,7 @@ jobs: uses: actions/checkout@v2 - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@master + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} tools: composer, pecl, phpunit @@ -34,18 +37,18 @@ jobs: run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache composer dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: ${{ runner.os }}-composer- - name: Install dependencies - run: composer install --no-progress --no-suggest --no-interaction --prefer-dist --optimize-autoloader + run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader # To prevent rate limiting you may need to supply an OAuth token in Settings > Secrets # env: # https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens # COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} - - name: Test with phpunit - run: vendor/bin/phpunit --coverage-text + - name: Test with PHPUnit + run: vendor/bin/phpunit --verbose --coverage-text diff --git a/.gitignore b/.gitignore index 11abea6..38a668d 100644 --- a/.gitignore +++ b/.gitignore @@ -123,5 +123,5 @@ nb-configuration.xml /results/ /phpunit*.xml -/.phpunit.*.cache +/*.cache diff --git a/composer.json b/composer.json index 5a3d272..2bb6a37 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { - "name": "codeigniter4/appstarter", + "name": "codeigniter4projects/website", "type": "project", - "description": "CodeIgniter4 starter app", + "description": "CodeIgniter Website", "homepage": "https://codeigniter.com", "license": "MIT", "require": { @@ -11,9 +11,12 @@ "league/commonmark": "^1.5" }, "require-dev": { + "phpunit/phpunit": "^8.5", + "phpstan/phpstan": "^0.12", "fzaninotto/faker": "^1.9@dev", - "mikey179/vfsstream": "1.6.*", - "phpunit/phpunit": "^8.5" + "mikey179/vfsstream": "^1.6", + "codeigniter4/codeigniter4-standard": "^1.0", + "squizlabs/php_codesniffer": "^3.5" }, "autoload-dev": { "psr-4": { @@ -21,9 +24,8 @@ } }, "scripts": { - "post-update-cmd": [ - "@composer dump-autoload" - ], + "analyze": "phpstan analyze", + "style": "phpcbf --standard=./vendor/codeigniter4/codeigniter4-standard/CodeIgniter4 src/ tests/", "test": "phpunit" }, "support": { diff --git a/composer.lock b/composer.lock index 24894b4..820de45 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0713793754f088697c974e5b5c8c8ec2", + "content-hash": "428ed7104be654d7d7379d550705349c", "packages": [ { "name": "codeigniter4/codeigniter4", @@ -12,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/codeigniter4/CodeIgniter4.git", - "reference": "f422bae249f8b74ae0fd7490f16998e20169372e" + "reference": "58993fbbab54a2523be25e8230337b855f465a7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/codeigniter4/CodeIgniter4/zipball/f422bae249f8b74ae0fd7490f16998e20169372e", - "reference": "f422bae249f8b74ae0fd7490f16998e20169372e", + "url": "https://api.github.com/repos/codeigniter4/CodeIgniter4/zipball/58993fbbab54a2523be25e8230337b855f465a7a", + "reference": "58993fbbab54a2523be25e8230337b855f465a7a", "shasum": "" }, "require": { @@ -40,6 +40,7 @@ "rector/rector": "^0.8", "squizlabs/php_codesniffer": "^3.3" }, + "default-branch": true, "type": "project", "autoload": { "psr-4": { @@ -53,7 +54,6 @@ }, "scripts": { "post-update-cmd": [ - "@composer dump-autoload", "CodeIgniter\\ComposerScripts::postUpdate", "bash admin/setup.sh" ], @@ -75,7 +75,7 @@ "slack": "https://codeigniterchat.slack.com", "issues": "https://github.com/codeigniter4/CodeIgniter4/issues" }, - "time": "2020-10-08T15:33:29+00:00" + "time": "2020-10-21T16:26:19+00:00" }, { "name": "guzzle/guzzle", @@ -170,6 +170,10 @@ "rest", "web service" ], + "support": { + "issues": "https://github.com/guzzle/guzzle3/issues", + "source": "https://github.com/guzzle/guzzle3/tree/master" + }, "abandoned": "guzzlehttp/guzzle", "time": "2015-03-18T18:23:50+00:00" }, @@ -241,6 +245,10 @@ "kint", "php" ], + "support": { + "issues": "https://github.com/kint-php/kint/issues", + "source": "https://github.com/kint-php/kint/tree/master" + }, "time": "2019-10-17T18:05:24+00:00" }, { @@ -302,6 +310,10 @@ "gist", "github" ], + "support": { + "issues": "https://github.com/KnpLabs/php-github-api/issues", + "source": "https://github.com/KnpLabs/php-github-api/tree/master" + }, "time": "2015-10-11T02:38:28+00:00" }, { @@ -351,6 +363,14 @@ "escaper", "laminas" ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-escaper/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-escaper/issues", + "rss": "https://github.com/laminas/laminas-escaper/releases.atom", + "source": "https://github.com/laminas/laminas-escaper" + }, "time": "2019-12-31T16:43:30+00:00" }, { @@ -399,6 +419,12 @@ "laminas", "zf" ], + "support": { + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" + }, "funding": [ { "url": "https://funding.communitybridge.org/projects/laminas-project", @@ -409,16 +435,16 @@ }, { "name": "league/commonmark", - "version": "1.5.5", + "version": "1.5.6", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "45832dfed6007b984c0d40addfac48d403dc6432" + "reference": "a56e91e0fa1f6d0049153a9c34f63488f6b7ce61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/45832dfed6007b984c0d40addfac48d403dc6432", - "reference": "45832dfed6007b984c0d40addfac48d403dc6432", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/a56e91e0fa1f6d0049153a9c34f63488f6b7ce61", + "reference": "a56e91e0fa1f6d0049153a9c34f63488f6b7ce61", "shasum": "" }, "require": { @@ -474,6 +500,12 @@ "md", "parser" ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, "funding": [ { "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", @@ -500,7 +532,7 @@ "type": "tidelift" } ], - "time": "2020-09-13T14:44:46+00:00" + "time": "2020-10-17T21:33:03+00:00" }, { "name": "psr/log", @@ -547,6 +579,9 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.3" + }, "time": "2020-03-23T09:12:05+00:00" }, { @@ -607,10 +642,52 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v2.8.50" + }, "time": "2018-11-21T14:20:20+00:00" } ], "packages-dev": [ + { + "name": "codeigniter4/codeigniter4-standard", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/bcit-ci/CodeIgniter4-Standard.git", + "reference": "4fd1f9c78803bc7f20126729cced63c7e623946d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bcit-ci/CodeIgniter4-Standard/zipball/4fd1f9c78803bc7f20126729cced63c7e623946d", + "reference": "4fd1f9c78803bc7f20126729cced63c7e623946d", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^6.5", + "satooshi/php-coveralls": "^1.0", + "squizlabs/php_codesniffer": "^3.1" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Louis Linehan", + "email": "louis.linehan@gmail.com", + "homepage": "https://github.com/louisl", + "role": "Developer" + } + ], + "description": "CodeIgniter 4 Standard for PHP_CodeSniffer 3.", + "support": { + "issues": "https://github.com/bcit-ci/CodeIgniter4-Standard/issues", + "source": "https://github.com/bcit-ci/CodeIgniter4-Standard/tree/master" + }, + "time": "2017-12-12T08:31:33+00:00" + }, { "name": "doctrine/instantiator", "version": "1.3.1", @@ -665,6 +742,10 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.3.x" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -729,6 +810,10 @@ "faker", "fixtures" ], + "support": { + "issues": "https://github.com/fzaninotto/Faker/issues", + "source": "https://github.com/fzaninotto/Faker/tree/v1.9.1" + }, "time": "2019-12-12T13:22:17+00:00" }, { @@ -775,6 +860,11 @@ ], "description": "Virtual file system to mock the real file system in unit tests.", "homepage": "http://vfs.bovigo.org/", + "support": { + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" + }, "time": "2019-10-30T15:31:00+00:00" }, { @@ -823,6 +913,10 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", @@ -884,6 +978,10 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" + }, "time": "2018-07-08T19:23:20+00:00" }, { @@ -931,6 +1029,10 @@ } ], "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/master" + }, "time": "2018-07-08T19:19:57+00:00" }, { @@ -980,6 +1082,10 @@ "reflection", "static analysis" ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, "time": "2020-06-27T09:03:43+00:00" }, { @@ -1032,6 +1138,10 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, "time": "2020-09-03T19:13:55+00:00" }, { @@ -1077,6 +1187,10 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, "time": "2020-09-17T18:55:26+00:00" }, { @@ -1140,8 +1254,72 @@ "spy", "stub" ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.12.1" + }, "time": "2020-09-29T09:10:42+00:00" }, + { + "name": "phpstan/phpstan", + "version": "0.12.50", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "b8248f9c81265af75d6d969ca3252aaf3e998f3a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b8248f9c81265af75d6d969ca3252aaf3e998f3a", + "reference": "b8248f9c81265af75d6d969ca3252aaf3e998f3a", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/0.12.50" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2020-10-16T12:22:23+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "7.0.10", @@ -1203,6 +1381,10 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.10" + }, "time": "2019-11-20T13:55:58+00:00" }, { @@ -1253,6 +1435,10 @@ "filesystem", "iterator" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.2" + }, "time": "2018-09-13T20:33:42+00:00" }, { @@ -1294,6 +1480,10 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, "time": "2015-06-21T13:50:34+00:00" }, { @@ -1343,6 +1533,10 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + }, "time": "2019-06-07T04:22:29+00:00" }, { @@ -1392,6 +1586,10 @@ "keywords": [ "tokenizer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.1" + }, "abandoned": true, "time": "2019-09-17T06:23:10+00:00" }, @@ -1476,6 +1674,10 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5" + }, "funding": [ { "url": "https://phpunit.de/donate.html", @@ -1531,6 +1733,10 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/master" + }, "time": "2017-03-04T06:30:41+00:00" }, { @@ -1595,6 +1801,10 @@ "compare", "equality" ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/master" + }, "time": "2018-07-12T15:12:46+00:00" }, { @@ -1651,6 +1861,10 @@ "unidiff", "unified diff" ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/master" + }, "time": "2019-02-04T06:01:07+00:00" }, { @@ -1704,6 +1918,10 @@ "environment", "hhvm" ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.3" + }, "time": "2019-11-20T08:46:58+00:00" }, { @@ -1771,6 +1989,10 @@ "export", "exporter" ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/master" + }, "time": "2019-09-14T09:02:43+00:00" }, { @@ -1825,6 +2047,10 @@ "keywords": [ "global state" ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/master" + }, "time": "2019-02-01T05:30:01+00:00" }, { @@ -1872,6 +2098,10 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/master" + }, "time": "2017-08-03T12:35:26+00:00" }, { @@ -1917,6 +2147,10 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/master" + }, "time": "2017-03-29T09:07:27+00:00" }, { @@ -1970,6 +2204,10 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + }, "time": "2017-03-03T06:23:57+00:00" }, { @@ -2012,6 +2250,10 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/master" + }, "time": "2018-10-04T04:07:39+00:00" }, { @@ -2058,6 +2300,10 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/master" + }, "time": "2019-07-02T08:10:15+00:00" }, { @@ -2101,8 +2347,68 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.5.6", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "e97627871a7eab2f70e59166072a6b767d5834e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/e97627871a7eab2f70e59166072a6b767d5834e0", + "reference": "e97627871a7eab2f70e59166072a6b767d5834e0", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2020-08-10T04:50:15+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.18.1", @@ -2163,6 +2469,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.18.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2217,6 +2526,10 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/master" + }, "funding": [ { "url": "https://github.com/theseer", @@ -2272,6 +2585,10 @@ "check", "validate" ], + "support": { + "issues": "https://github.com/webmozart/assert/issues", + "source": "https://github.com/webmozart/assert/tree/master" + }, "time": "2020-07-08T17:02:28+00:00" } ], @@ -2287,5 +2604,5 @@ "php": ">=7.2" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..1865e70 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,23 @@ +parameters: + tmpDir: build/phpstan + level: 5 + paths: + - app + - tests + bootstrapFiles: + - vendor/codeigniter4/codeigniter4/system/Test/bootstrap.php + excludes_analyse: + - app/Config/Routes.php + - app/Views/* + ignoreErrors: + - '#Cannot access property [\$a-z_]+ on (array|object)#' + - '#Unsafe usage of new static\(\)*#' + universalObjectCratesClasses: + - CodeIgniter\Entity + - Faker\Generator + scanDirectories: + - vendor/codeigniter4/codeigniter4/system/Helpers + dynamicConstantNames: + - APP_NAMESPACE + - CI_DEBUG + - ENVIRONMENT diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 80664cb..3425a26 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -54,7 +54,5 @@ - -