Skip to content

Commit e23aaa0

Browse files
committed
[TASK] Add some basic tests
1 parent 6a0ad7e commit e23aaa0

9 files changed

Lines changed: 233 additions & 2 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish to make via issue,
4+
email, or any other method with the owners of this repository before making a change.
5+
6+
## Getting Started
7+
8+
* Make sure you have a [GitHub account](https://github.com/signup/free)
9+
* Submit a ticket for your [issue](https://github.com/extcode/cart/issues), assuming one does not already exist.
10+
* Clearly describe the issue including steps to reproduce when it is a bug.
11+
* Fork the repository on GitHub
12+
13+
## Making Changes
14+
15+
* Create a topic branch from where you want to base your work.
16+
* This is usually the master branch.
17+
* Only target release branches if you are certain your fix must be on that
18+
branch.
19+
* To quickly create a topic branch based on master; `git checkout -b
20+
fix/master/my_contribution master`. Please avoid working directly on the
21+
`master` branch.
22+
* Make commits of logical units.
23+
* Use `./php-cs-fixer fix --config-file Build/.php_cs` to make sure the code is formatted correctly.
24+
* Make sure your commit messages are in the proper format. Use either `[TASK]`, `[FEATURE]`, `[BUGFIX]` or `[DOC]`
25+
26+
````
27+
[TASK] Make the example in CONTRIBUTING imperative and concrete
28+
29+
The first line is a real life imperative statement.
30+
The body describes the behavior without the patch,
31+
why this is a problem, and how the patch fixes the problem when applied.
32+
33+
Resolves: #123
34+
````
35+
36+
* Make sure you have added the necessary tests for your changes.
37+
* Run _all_ the tests to assure nothing else was accidentally broken. However travis will do that for you as well.
38+
39+
## Making Trivial Changes
40+
41+
For changes of a trivial nature, it is not always necessary to create a new issue.
42+
43+
## Additional resources
44+
45+
* [Rendered documentation](https://docs.typo3.org/typo3cms/extensions/cart/)
46+
* [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/)
47+
48+
49+
## Contributor Code of Conduct
50+
51+
As contributors and maintainers of this project, and in the interest of fostering an open and
52+
welcoming community, we pledge to respect all people who contribute through reporting issues,
53+
posting feature requests, updating documentation, submitting pull requests or patches, and other
54+
activities.
55+
56+
We are committed to making participation in this project a harassment-free experience for everyone,
57+
regardless of level of experience, gender, gender identity and expression, sexual orientation,
58+
disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
59+
60+
Examples of unacceptable behavior by participants include:
61+
62+
* The use of sexualized language or imagery
63+
* Personal attacks
64+
* Trolling or insulting/derogatory comments
65+
* Public or private harassment
66+
* Publishing other's private information, such as physical or electronic addresses, without explicit
67+
permission
68+
* Other unethical or unprofessional conduct.
69+
70+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
71+
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By
72+
adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently
73+
applying these principles to every aspect of managing this project. Project maintainers who do not
74+
follow or enforce the Code of Conduct may be permanently removed from the project team.
75+
76+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
77+
78+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
79+
80+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org),
81+
version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: extcode
2+
custom: ["https://paypal.me/extcart"]

.github/ISSUE_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!---
2+
Thanks for filing an issue 😄! Before you submit, please read the following:
3+
4+
Check the other issue templates if you are trying to submit a bug report, feature request, or question
5+
Search open/closed issues before submitting since someone might have asked the same thing before!
6+
-->
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug Report
3+
about: If something isn't working as expected.
4+
5+
---
6+
7+
## Bug Report
8+
9+
**Current Behavior**
10+
A clear and concise description of the behavior.
11+
12+
**Expected behavior/output**
13+
A clear and concise description of what you expected to happen.
14+
15+
**Environment**
16+
- TYPO3 version(s): [e.g. 8.7.12, 9.3.0]
17+
- cart version: [e.g. 7.0.5]
18+
- Is your TYPO3 installation set up with Composer (Composer Mode): [yes, no]
19+
- OS: [e.g. OSX 10.13.4, Windows 10]
20+
21+
**Possible Solution**
22+
<!--- Only if you have suggestions on a fix for the bug. -->
23+
24+
**Additional context**
25+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature Request
3+
about: I have a suggestion!
4+
5+
---
6+
7+
## Feature Request
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I have an issue when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen. Add any considered drawbacks.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Teachability, Documentation, Adoption, Migration Strategy**
19+
If you can, explain how users will be able to use this and possibly amend the documentation.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: Support Question
3+
about: If you have a question, please check out our [Slack Channel](https://typo3.slack.com/messages/ext-cart/)!
4+
5+
---

.github/workflows/ci.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: CI
2+
on:
3+
- pull_request
4+
jobs:
5+
check-composer:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
10+
- name: Validate composer.json
11+
run: composer validate
12+
13+
php-linting:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
php-version:
18+
- 8.2
19+
- 8.3
20+
- 8.4
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: "${{ matrix.php-version }}"
29+
tools: composer:v2
30+
31+
- name: PHP lint
32+
run: "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l"
33+
34+
documentation-rendering:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
40+
- name: Documentation without warnings
41+
run: |
42+
mkdir -p Documentation-GENERATED-temp \
43+
&& docker run --rm --pull always -v $(pwd):/project \
44+
ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log
45+
46+
coding-guideline:
47+
runs-on: ubuntu-latest
48+
needs:
49+
- php-linting
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Install PHP
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: "8.2"
57+
tools: composer:v2
58+
59+
- name: Install dependencies
60+
run: composer install --prefer-dist --no-progress --no-suggest
61+
62+
- name: Coding Guideline
63+
run: .build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./
64+
65+
code-quality:
66+
runs-on: ubuntu-latest
67+
needs:
68+
- php-linting
69+
strategy:
70+
matrix:
71+
include:
72+
- php-version: '8.2'
73+
typo3-version: '^13.4'
74+
- php-version: '8.3'
75+
typo3-version: '^13.4'
76+
- php-version: '8.4'
77+
typo3-version: '^13.4'
78+
steps:
79+
- uses: actions/checkout@v4
80+
81+
- name: Install PHP
82+
uses: shivammathur/setup-php@v2
83+
with:
84+
php-version: "${{ matrix.php-version }}"
85+
tools: composer:v2
86+
87+
- name: Install dependencies with expected TYPO3 version
88+
run: |-
89+
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 }}"
90+
91+
- name: Code Quality (by PHPStan)
92+
run: .build/bin/phpstan analyse -c Build/phpstan.neon
93+

Documentation/Changelog/3.0/Index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
3.0 Changes
44
===========
55

6-
The version 3.0.0 is a release for TYPO3 v8.7 only and skipped for TYPO3 v9.5. `4.0 Changes <../4.0/Index.html>`_.
6+
The version 3.0.0 is a release for TYPO3 v8.7 only and skipped for TYPO3 v9.5.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"tecnickcom/tcpdf": "^6.7"
5050
},
5151
"require-dev": {
52-
"typo3/testing-framework": "^8.2",
52+
"typo3/testing-framework": "^9.3",
5353
"friendsofphp/php-cs-fixer": "^3.59",
5454
"helmich/typo3-typoscript-lint": "^3.2",
5555
"phpstan/phpstan": "^1.10"

0 commit comments

Comments
 (0)