Skip to content

Commit

Permalink
Fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
zonky2 committed Aug 2, 2022
2 parents ea47ef2 + 5be6086 commit 4879cb4
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 90 deletions.
66 changes: 66 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# How to contribute

We are really glad you're reading this, because we need volunteer developers to
help this project come to fruition.

If you haven't already, come find us in IRC (#contao.cca on freenode).
We want you working on things you're excited about.

The following is a set of guidelines for contributing to DC_General, which
is hosted in the [Contao Community Alliance organization][1] on GitHub. These
are just guidelines, not rules, use your best judgement and feel free to
propose changes to this document in a pull request.

## Submitting issues

* Use the search function to see if a similar issue has already been submitted.
* Describe the issue in detail and include all the steps to follow in order to
reproduce the bug.
* Include the version of Contao, PHP and DC_General you are using (if possible
with a detailed list of other installed extensions that might be related).
* Include screenshots or screencasts if possible; they are immensely helpful.
* If you are reporting a bug, please include any related error message you are
seeing and also check the `system/logs/error.log` file. The error message is
not just the message but also the complete(!) stack trace below the message.
This trace is a long list of function calls which helps us to diagnose the
problem en detail.

## Submitting changes

* Please send a [GitHub Pull Request to Contao Community Alliance][1] with a
clear list of what you've done (read more about [pull requests][2]).
* When you send a pull request, we will love you forever if you include
phpunit tests. We can always use more test coverage.
* Please follow the [phpcq 2.0][3] coding standards.
* Please make sure all of your commits are atomic (only one feature or fix per
commit).
* We use phpcq/all-tasks in these projects, so please check your changes
using phpcq when submitting a pull request.
* Create your pull request against the [`master`][4] branch for bug fixes or the
[`develop`][5] branch for new features.
* Include screenshots in your pull request whenever possible.

Always write a clear log message for your commits.
One-line messages are fine for small changes, but bigger changes should look
like this:

$ git commit -m "A brief summary of the commit
>
> A paragraph describing what changed and its impact."

## Testing

We have a handful of unit tests. Please write unit tests for new code you
create.

## Git commit messages

* Use the present tense ("Add feature" not "Added feature").
* Use the imperative mood ("Move cursor to …" not "Moves cursor to …").
* Reference issues and pull requests liberally.

[1]: https://github.com/contao-community-alliance
[2]: http://help.github.com/pull-requests/
[3]: https://github.com/phpcq/coding-standard
[4]: https://github.com/contao-community-alliance/dc-general-contao-frontend/pull/new/master
[5]: https://github.com/contao-community-alliance/dc-general-contao-frontend/pull/new/develop
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Checklist before I submit this issue report

I confirm that:
- [ ] I have tested this with the latest version available
- [ ] I have checked the Contao community forums for references https://community.contao.org/
- [ ] I have checked existing issues for duplicates and found none @ https://github.com/contao-community-alliance/dc-general-contao-frontend/issues?q=is%3Aissue

## My environment is:

(Please fill in the actual values from your environment)

| Key | Value | Comments |
| ----------------------------------- | ---------| ---------------------------------|
| PHP version: | | |
| Contao version: | | |
| DC_General version: | | |
| Installation via composer: | (yes/no) | |

## Issue description

(Describe the problem you are having)

## Steps to reproduce

1. [First Step]
2. [Second Step]
3. [and so on…]

## Describe the behaviour of the application

(Tell us what happens)

## Describe the expected behaviour of the application

(Tell us what should have happened)

## Screenshots

(Add some visual love or even a video if you can)
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Description

Please explain the detailed changes you made here.
Reference any issue number this pull request fixes.

## Checklist
- [ ] Read and understood the [CONTRIBUTING guidelines](CONTRIBUTING.md)
- [ ] Created tests, if possible
- [ ] All tests passing
- [ ] Extended the README / documentation, if necessary
- [ ] Added myself to the `@authors` in touched PHP files
- [ ] Checked the changes with phpcq and introduced no new issues
49 changes: 49 additions & 0 deletions .github/workflows/diagnostics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: DC General Contao Frontend

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.4]
contao: [~4.9.0]

steps:
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Pull source
uses: actions/checkout@v2
with:
fetch-depth: 0

# see https://github.com/shivammathur/setup-php
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Setup PHP.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Cache composer cache directory
uses: actions/cache@v1
env:
cache-name: composer-cache-dir
with:
path: ~/.cache/composer
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Cache vendor directory
uses: actions/cache@v1
env:
cache-name: composer-vendor
with:
path: vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Install composer dependencies
run: composer update --prefer-dist --no-interaction --no-suggest

- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Run tests
run: ant -keep-going
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/contao-community-alliance/dc-general-contao-frontend.png)](https://travis-ci.org/contao-community-alliance/dc-general-contao-frontend)
[![Build Status](https://github.com/contao-community-alliance/dc-general-contao-frontend/actions/workflows/diagnostics.yml/badge.svg)](https://github.com/contao-community-alliance/dc-general-contao-frontend/actions)
[![Latest Version tagged](http://img.shields.io/github/tag/contao-community-alliance/dc-general-contao-frontend.svg)](https://github.com/contao-community-alliance/dc-general-contao-frontend/tags)
[![Latest Version on Packagist](http://img.shields.io/packagist/v/contao-community-alliance/dc-general-contao-frontend.svg)](https://packagist.org/packages/contao-community-alliance/dc-general-contao-frontend)
[![Installations via composer per month](http://img.shields.io/packagist/dm/contao-community-alliance/dc-general-contao-frontend.svg)](https://packagist.org/packages/contao-community-alliance/dc-general-contao-frontend)
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"source":"https://github.com/contao-community-alliance/dc-general-contao-frontend"
},
"require": {
"php":"^7.2",
"php":"^7.4",
"contao-community-alliance/dc-general": "^2.2",
"contao-community-alliance/url-builder": "~1.1",
"contao-community-alliance/translator": "^2.2",
Expand All @@ -51,6 +51,11 @@
}
},
"config": {
"allow-plugins": {
"contao-components/installer": false,
"ocramius/package-versions": false,
"contao/manager-plugin": false
},
"sort-packages": true
}
}
7 changes: 4 additions & 3 deletions src/Resources/contao/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of contao-community-alliance/dc-general-contao-frontend.
*
* (c) 2016-2019 Contao Community Alliance.
* (c) 2016-2022 Contao Community Alliance.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -12,8 +12,9 @@
*
* @package contao-community-alliance/dc-general-contao-frontend
* @author Sven Baumann <baumann.sv@gmail.com>
* @copyright 2016-2019 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general-contao-frontend/blob/master/LICENSE LGPL-3.0-or-later
* @author Ingolf Steinhardt <info@e-spin.de>
* @copyright 2016-2022 Contao Community Alliance.
* @license https://github.com/contao-community-alliance/dc-general-contao-frontend/blob/master/LICENSE LGPL-3.0
* @filesource
*/

Expand Down
1 change: 1 addition & 0 deletions src/View/ActionHandler/CopyHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public function handleEvent(ActionEvent $event): void
*
* @throws RedirectResponseException To redirect to the edit mask with cloned model.
* @throws NotCreatableException When the DataContainer is not creatable.
* @throws PageNotFoundException When model not found.
*/
public function process(EnvironmentInterface $environment): void
{
Expand Down
1 change: 1 addition & 0 deletions src/View/ActionHandler/DeleteHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public function handleEvent(ActionEvent $event): void
*
* @throws RedirectResponseException After successful delete.
* @throws NotDeletableException When the DataContainer is not deletable.
* @throws PageNotFoundException When model not found.
*/
public function process(EnvironmentInterface $environment): void
{
Expand Down
Loading

0 comments on commit 4879cb4

Please sign in to comment.