Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lorenz authored and extcode committed Nov 27, 2019
0 parents commit 6ec1b7b
Show file tree
Hide file tree
Showing 45 changed files with 1,711 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
@@ -0,0 +1,6 @@
/.github/ export-ignore
/Tests/ export-ignore
/.php_cs.dist export-ignore
/.gitattributes export-ignore
/.gitlab-ci.yml export-ignore
/.travis.yml export-ignore
81 changes: 81 additions & 0 deletions .github/CONTRIBUTING.md
@@ -0,0 +1,81 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.

## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free)
* Submit a ticket for your [issue](https://github.com/extcode/cart_payone/issues), assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Fork the repository on GitHub

## Making Changes

* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* Only target release branches if you are certain your fix must be on that
branch.
* To quickly create a topic branch based on master; `git checkout -b
fix/master/my_contribution master`. Please avoid working directly on the
`master` branch.
* Make commits of logical units.
* Use `./php-cs-fixer fix --config-file Build/.php_cs` to make sure the code is formatted correctly.
* Make sure your commit messages are in the proper format. Use either `[TASK]`, `[FEATURE]`, `[BUGFIX]` or `[DOC]`

````
[TASK] Make the example in CONTRIBUTING imperative and concrete
The first line is a real life imperative statement.
The body describes the behavior without the patch,
why this is a problem, and how the patch fixes the problem when applied.
Resolves: #123
````

* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests to assure nothing else was accidentally broken. However travis will do that for you as well.

## Making Trivial Changes

For changes of a trivial nature, it is not always necessary to create a new issue.

## Additional resources

* [Rendered documentation](https://docs.typo3.org/typo3cms/extensions/cart_payone/)
* [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/)


## Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering an open and
welcoming community, we pledge to respect all people who contribute through reporting issues,
posting feature requests, updating documentation, submitting pull requests or patches, and other
activities.

We are committed to making participation in this project a harassment-free experience for everyone,
regardless of level of experience, gender, gender identity and expression, sexual orientation,
disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic addresses, without explicit
permission
* Other unethical or unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By
adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently
applying these principles to every aspect of managing this project. Project maintainers who do not
follow or enforce the Code of Conduct may be permanently removed from the project team.

This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org),
version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE.md
@@ -0,0 +1,6 @@
<!---
Thanks for filing an issue! Before you submit, please read the following:
Check the other issue templates if you are trying to submit a bug report, feature request, or question
Search open/closed issues before submitting since someone might have asked the same thing before!
-->
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
@@ -0,0 +1,26 @@
---
name: Bug Report
about: If something isn't working as expected.

---

## Bug Report

**Current Behavior**
A clear and concise description of the behavior.

**Expected behavior/output**
A clear and concise description of what you expected to happen.

**Environment**
- TYPO3 version(s): [e.g. 8.7.12, 9.3.0]
- cart version: [e.g. 4.8.1]
- cart_payone version: [e.g. 1.0.0]
- Is your TYPO3 installation set up with Composer (Composer Mode): [yes, no]
- OS: [e.g. OSX 10.13.4, Windows 10]

**Possible Solution**
<!--- Only if you have suggestions on a fix for the bug. -->

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
@@ -0,0 +1,19 @@
---
name: Feature Request
about: I have a suggestion!

---

## Feature Request

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I have an issue when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen. Add any considered drawbacks.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Teachability, Documentation, Adoption, Migration Strategy**
If you can, explain how users will be able to use this and possibly amend the documentation.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/Support_question.md
@@ -0,0 +1,5 @@
---
name: Support Question
about: If you have a question, please check out our [Slack Channel](https://typo3.slack.com/messages/ext-cart/)!

---
7 changes: 7 additions & 0 deletions .gitignore
@@ -0,0 +1,7 @@
.Build
composer.lock

.php_cs.cache

.DS_Store
.idea
58 changes: 58 additions & 0 deletions .gitlab-ci.yml
@@ -0,0 +1,58 @@
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
paths:
- .composer/
- .php_cs.cache

variables:
COMPOSER_CACHE_DIR: ".composer"
TYPO3_PATH_WEB: "$CI_PROJECT_DIR/.Build/Web"
MYSQL_DATABASE: "typo3"
MYSQL_ROOT_PASSWORD: "joh316"
typo3DatabaseName: "typo3"
typo3DatabaseHost: "mysql"
typo3DatabaseUsername: "root"
typo3DatabasePassword: "joh316"

before_script:
- apk add git --update

stages:
- lint

lint:cgl:
image: composer:1.6
stage: lint
before_script:
- composer remove typo3/cms-core --no-update
- composer install --no-progress --no-ansi --no-interaction
script:
- .Build/bin/php-cs-fixer fix --config=Build/.php_cs.dist -v --dry-run --using-cache=no --path-mode=intersection ./

lint:typoscriptcgl:
stage: lint
image: composer:1.6
script:
- composer remove typo3/cms-core --no-update
- composer install --no-progress --no-ansi --no-interaction
- .Build/bin/typoscript-lint -c tslint.yaml

lint:yaml:
stage: lint
image: python:alpine3.7
before_script:
- pip install yamllint==1.10.0
script:
- yamllint -c Build/yamllint.yaml Configuration/ Resources/ .travis.yml

lint:php72:
stage: lint
image: php:7.2-alpine
script:
- find . -name \*.php -exec php -l "{}" \;

lint:php73:
stage: lint
image: php:7.3-alpine
script:
- find . -name \*.php -exec php -l "{}" \;
34 changes: 34 additions & 0 deletions .styleci.yml
@@ -0,0 +1,34 @@
preset: psr2

enabled:
- no_leading_import_slash
- no_trailing_comma_in_singleline_array
- no_singleline_whitespace_before_semicolons
- no_unused_imports
- concat_with_spaces
- no_whitespace_in_blank_line
- ordered_imports
- single_quote
- no_extra_consecutive_blank_lines
- phpdoc_no_package
- phpdoc_scalar
- no_blank_lines_after_phpdoc
- short_array_syntax
- whitespace_after_comma_in_array
- function_typehint_space
- hash_to_slash_comment
- no_alias_functions
- lowercase_cast
- no_leading_namespace_whitespace
- native_function_casing
- no_empty_statement
- self_accessor
- no_short_bool_cast
- no_unneeded_control_parentheses

finder:
name:
- "*.php"
not-path:
- ".Build"
- "Documentation"
46 changes: 46 additions & 0 deletions .travis.yml
@@ -0,0 +1,46 @@
language: php

sudo: false

matrix:
fast_finish: true
include:
- php: 7.2
env: TYPO3_VERSION=^9.5
- php: 7.3
env: TYPO3_VERSION=^9.5

cache:
directories:
- $HOME/.composer/cache

addons:
apt:
packages:
- parallel

notifications:
email:
- travis@extco.de

before_install:
- echo $TRAVIS_PHP_VERSION
- if php -i | grep -q xdebug; then phpenv config-rm xdebug.ini; fi
- composer self-update
- composer --version

before_script:
- composer require typo3/cms-core=$TYPO3_VERSION
- git checkout composer.json
- export TYPO3_PATH_WEB="$PWD/.Build/Web"

script:
- >
echo;
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
- >
echo;
echo "Running php-cs-fixer";
.Build/bin/php-cs-fixer fix --config=Build/.php_cs.dist -v --dry-run --using-cache=no --path-mode=intersection ./;
48 changes: 48 additions & 0 deletions Build/.php_cs.dist
@@ -0,0 +1,48 @@
<?php

if (PHP_SAPI !== 'cli') {
die('This script supports command line usage only. Please check your command.');
}

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'no_leading_import_slash' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_unused_imports' => true,
'concat_space' => ['spacing' => 'one'],
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'single_quote' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'phpdoc_no_package' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'no_blank_lines_after_phpdoc' => true,
'array_syntax' => ['syntax' => 'short'],
'whitespace_after_comma_in_array' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'no_alias_functions' => true,
'lowercase_cast' => true,
'no_leading_namespace_whitespace' => true,
'native_function_casing' => true,
'self_accessor' => true,
'no_short_bool_cast' => true,
'no_unneeded_control_parentheses' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_trim' => true
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/../')
->exclude('.Build')
->exclude('Documentation')
->exclude('Resources')
->notName('ext_emconf.php')
->notName('ext_localconf.php')
->notName('ext_tables.php')
);
23 changes: 23 additions & 0 deletions Build/yamllint.yaml
@@ -0,0 +1,23 @@
extends: default

rules:
line-length: disable
document-start: disable
braces:
min-spaces-inside-empty: 1
max-spaces-inside-empty: 1
brackets:
min-spaces-inside-empty: 1
max-spaces-inside-empty: 1
comments:
level: error
min-spaces-from-content: 1
comments-indentation:
level: error
empty-lines:
max: 1
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
indentation:
spaces: 2

0 comments on commit 6ec1b7b

Please sign in to comment.