diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 9d2ff32..a218ef1 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -7,6 +7,10 @@ on: pull_request: branches: [ main ] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest @@ -44,4 +48,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} verbose: true - files: coverage.xml + files: .phpunit/coverage.xml diff --git a/.gitignore b/.gitignore index b5f71ec..b31e3c6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,23 +5,31 @@ vendor/ # NPM node_modules/ -# Visual Studio Code extensions -# Local History (xyz.local-history): https://marketplace.visualstudio.com/items?itemName=xyz.local-history -.history - -# user-configured files # PHPUnit +.phpunit/ phpunit.xml +.phpunit.xml .phpunit.cache .phpunit.result.cache +## PHPUnit code coverage +coverage +coverage.* +clover.xml +crap4j.xml +html-coverage/ +coverage.php +coverage.txt +xml-coverage/ + # phpDocumentor .phpdoc phpdoc.xml +docs/build/ +docs/cache/ -# code coverage -coverage -coverage.* +# PHPStorm +.idea # PHPActor LSP .phpactor.json diff --git a/.phpcs.xml b/.phpcs.xml index 44e5cb4..82ad013 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,12 +1,11 @@ - - - - + + + diff --git a/LICENSE b/LICENSE index e30b7f0..44449be 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Samantha Nguyen +Copyright (c) 2020 Samantha Nguyen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 28a6aa1..5a5536a 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,12 @@ [packagist-badge]: https://img.shields.io/packagist/v/neoncitylights/media-type?style=flat-square [packagist-url]: https://packagist.org/packages/neoncitylights/media-type -[license-badge]: https://img.shields.io/github/license/neoncitylights/php-media-type?style=flat-square +[license-badge]: https://img.shields.io/badge/License-MIT-blue?style=flat-square [license-url]: #license -[build-badge]: https://img.shields.io/github/actions/workflow/status/neoncitylights/php-media-type/.github%2Fworkflows%2Fphp.yml?style=flat-square -[build-url]: https://github.com/neoncitylights/php-media-type/actions/workflows/php.yml -[codecov-badge]: https://img.shields.io/codecov/c/github/neoncitylights/php-media-type?style=flat-square -[codecov-url]: https://codecov.io/gh/neoncitylights/php-media-type +[build-badge]: https://img.shields.io/github/actions/workflow/status/php-lights/media-type/.github%2Fworkflows%2Fphp.yml?style=flat-square +[build-url]: https://github.com/php-lights/media-type/actions/workflows/php.yml +[codecov-badge]: https://img.shields.io/codecov/c/github/php-lights/media-type?style=flat-square +[codecov-url]: https://codecov.io/gh/php-lights/media-type **MediaType** is a PHP library for parsing and serializing MIME types, also known as IANA media types. diff --git a/composer.json b/composer.json index 313d92b..720ce4d 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,18 @@ "name": "neoncitylights/media-type", "authors": [ { - "name": "Samantha Nguyen" + "name": "Samantha Nguyen", + "email": "contact@samanthanguyen.me" } ], "license": "MIT", "description": "Allows working with IANA media types as entities in PHP", + "keywords": [ + "iana", + "media type", + "mime type", + "rfc 2397" + ], "autoload": { "psr-4": { "Neoncitylights\\MediaType\\": "src/" @@ -17,12 +24,6 @@ "Neoncitylights\\MediaType\\Tests\\": "tests/" } }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/neoncitylights" - } - ], "require": { "php": ">=8.2", "wikimedia/assert": "^0.5.1", @@ -36,26 +37,26 @@ "phpunit/phpunit": "11.5.6" }, "scripts": { - "lint": "parallel-lint . --exclude vendor --exclude node_modules", - "phpcs": "phpcs -p -s", - "test:phpunit-clover": "phpunit tests --coverage-clover coverage.xml", - "test:phpunit-xml": "phpunit tests --coverage-xml coverage", - "test:phpunit-html": "phpunit tests --coverage-html coverage", "test": [ "@lint", - "@phpcs", - "@test:phpunit-clover", - "minus-x check ." + "@phpunit:xml", + "minus-x check .", + "@phpcs" ], + "lint": "parallel-lint . --exclude vendor --exclude node_modules", + "phpcs": "phpcs -p -s", + "phpunit": "phpunit tests", + "phpunit:xml": "@phpunit --coverage-clover .phpunit/coverage.xml", + "phpunit:html": "@phpunit --coverage-html .phpunit/html/", "fix": [ "minus-x fix .", "phpcbf" ], - "docs": "phpdoc", - "migrate": "phpunit --migrate-configuration" + "docs": "phpdoc" }, "config": { "allow-plugins": { + "composer/package-versions-deprecated": true, "dealerdirect/phpcodesniffer-composer-installer": true } } diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml index a3ff0c4..1114216 100644 --- a/phpdoc.dist.xml +++ b/phpdoc.dist.xml @@ -3,7 +3,7 @@ configVersion="3" xmlns="https://www.phpdoc.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - neoncitylights/media-type + MediaType docs/build docs/cache diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 105b704..ff27b96 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,28 +1,29 @@ + stopOnFailure="false"> - + - - - ./tests - - - ./src + ./src + + + ./tests + +