Skip to content

Commit

Permalink
Initialize package
Browse files Browse the repository at this point in the history
Create the Composer package and set up code quality configuration.
  • Loading branch information
Jan-Marten de Boer committed Mar 23, 2018
0 parents commit 2382f82
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
/vendor/
/composer.lock
24 changes: 24 additions & 0 deletions bitbucket-pipelines.yml
@@ -0,0 +1,24 @@
image: srcoder/development-php:php72-fpm
definitions:
caches:
vendor: vendor
pipelines:
default:
- step:
name: Composer validation
script:
- composer self-update
- composer check-platform-reqs
- composer validate --strict --no-interaction

- step:
name: Testing suite
caches:
- composer
- vendor
script:
- composer self-update
- if [ -n "$COMPOSER_PRE_INSTALL_CALLBACK" ]; then eval $COMPOSER_PRE_INSTALL_CALLBACK; fi
- composer install --dev --prefer-dist --no-scripts --no-progress --optimize-autoloader --no-interaction -vvv
- composer show
- composer exec -v grumphp run
47 changes: 47 additions & 0 deletions composer.json
@@ -0,0 +1,47 @@
{
"name": "mediact/static-production-dependency-prototype",
"description": "A prototype package to test static production dependency analysis tooling.",
"type": "library",
"license": "proprietary",
"authors": [
{
"name": "MediaCT",
"email": "info@mediact.nl"
},
{
"name": "Jan-Marten de Boer",
"role": "developer"
},
{
"name": "Ashoka de Wit",
"role": "developer"
}
],
"minimum-stability": "stable",
"require": {
"php": "^7.2",
"symfony/symfony": "^4.0",
"nikic/php-parser": "^3.0"
},
"require-dev": {
"mediact/testing-suite": "@stable"
},
"extra": {
"grumphp": {
"config-default-path": "vendor/mediact/testing-suite/config/default/grumphp.yml"
}
},
"archive": {
"exclude": [
"/.gitignore",
"/phpunit.xml",
"/phpmd.xml",
"/phpstan.neon",
"/phpcs.xml",
"/bitbucket-pipelines.yml"
]
},
"config": {
"sort-packages": true
}
}
10 changes: 10 additions & 0 deletions phpcs.xml
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<ruleset name="PHPCS"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>PHPCS</description>
<!--<exclude-pattern>path/to/exclude/*</exclude-pattern>-->
<rule ref="./vendor/mediact/coding-standard/src/MediaCT"/>
</ruleset>
10 changes: 10 additions & 0 deletions phpmd.xml
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<ruleset name="PHPMD"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>PHPMD</description>
<!--<exclude-pattern>path/to/exclude/*</exclude-pattern>-->
<rule ref="./vendor/mediact/coding-standard/src/MediaCT/phpmd.xml" />
</ruleset>
3 changes: 3 additions & 0 deletions phpstan.neon
@@ -0,0 +1,3 @@
parameters:
excludes_analyse:
# - %rootDir%/../../../path/to/exclude/*
14 changes: 14 additions & 0 deletions phpunit.xml
@@ -0,0 +1,14 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit 2382f82

Please sign in to comment.