diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..91b84b75 --- /dev/null +++ b/.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/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/) +* [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/) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..ffb6d995 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: extcode +custom: ["https://paypal.me/extcart"] diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..b03dc81a --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,6 @@ + diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md new file mode 100644 index 00000000..c4be16a7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -0,0 +1,25 @@ +--- +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. 7.0.5] +- Is your TYPO3 installation set up with Composer (Composer Mode): [yes, no] +- OS: [e.g. OSX 10.13.4, Windows 10] + +**Possible Solution** + + +**Additional context** +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md new file mode 100644 index 00000000..619ba213 --- /dev/null +++ b/.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. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Support_question.md b/.github/ISSUE_TEMPLATE/Support_question.md new file mode 100644 index 00000000..38a60c1b --- /dev/null +++ b/.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/)! + +--- \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..bb2cb5ff --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,80 @@ +name: CI +on: + - pull_request +jobs: + check-composer: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Validate composer.json + run: composer validate + + php-linting: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: + - 8.1 + - 8.2 + - 8.3 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php-version }}" + tools: composer:v2 + + - name: PHP lint + run: "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l" + + coding-guideline: + runs-on: ubuntu-latest + needs: + - php-linting + steps: + - uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.1" + tools: composer:v2 + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Coding Guideline + run: vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./ + + code-quality: + runs-on: ubuntu-latest + needs: + - php-linting + strategy: + matrix: + include: + - php-version: '8.1' + typo3-version: '^12.4' + - php-version: '8.2' + typo3-version: '^12.4' + - php-version: '8.3' + typo3-version: '^12.4' + steps: + - uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php-version }}" + tools: composer:v2 + + - name: Install dependencies with expected TYPO3 version + run: |- + composer require --no-interaction --prefer-dist --no-progress "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-extbase:${{ matrix.typo3-version }}" "typo3/cms-frontend:${{ matrix.typo3-version }}" + + - name: Code Quality (by PHPStan) + run: vendor/bin/phpstan analyse -c Build/phpstan.neon \ No newline at end of file diff --git a/composer.json b/composer.json index 2e1df5e3..b7be9805 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "extra": { "typo3/cms": { "extension-key": "cart_products", - "web-dir": ".build/public" + "web-dir": "vendor/public" } }, "require": { @@ -71,31 +71,31 @@ }, "scripts": { "test:cgl": [ - ".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no --path-mode=intersection ./" + "vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no --path-mode=intersection ./" ], "test:cgl:dry-run": [ - ".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./" + "vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./" ], "test:php:lint": [ - ".build/bin/phplint -c Build/phplint.yaml" + "vendor/bin/phplint -c Build/phplint.yaml" ], "test:php:unit": [ - ".build/bin/phpunit -c Build/UnitTests.xml" + "vendor/bin/phpunit -c Build/UnitTests.xml" ], "test:php:functional": [ - "typo3DatabaseDriver=\"pdo_sqlite\" .build/bin/phpunit -c Build/FunctionalTests.xml" + "typo3DatabaseDriver=\"pdo_sqlite\" vendor/bin/phpunit -c Build/FunctionalTests.xml" ], "test:phpstan:analyse": [ - ".build/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M" + "vendor/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M" ], "test:rector:process": [ - ".build/bin/rector process *" + "vendor/bin/rector process *" ], "test:rector:process:dry-run": [ - ".build/bin/rector process * --dry-run" + "vendor/bin/rector process * --dry-run" ], "test:typoscript:lint": [ - ".build/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration" + "vendor/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration" ], "test:php": [ "@test:php:lint", @@ -109,11 +109,5 @@ "@test:typoscript:lint", "@test:php" ] - }, - "repositories": { - "extcode/cart": { - "type": "vcs", - "url": "ssh://git@code.extco.de:22722/cart/cart.git" - } } }