diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..0c2013e --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -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 diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..5e4e4cc --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -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) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ac28856 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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 diff --git a/.github/workflows/diagnostics.yml b/.github/workflows/diagnostics.yml new file mode 100644 index 0000000..8208b32 --- /dev/null +++ b/.github/workflows/diagnostics.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ed27399..0000000 --- a/.travis.yml +++ /dev/null @@ -1,59 +0,0 @@ -dist: xenial - -addons: - apt: - packages: - - ant-optional - -language: php - -php: - - "7.4" - - "7.3" - - "7.2" - -env: - - CONTAO_VERSION='contao/core-bundle ~4.9.0' - - CONTAO_VERSION='contao/core-bundle ~4.10.0@dev' - -# Exclude impossible Contao Version combinations. -matrix: - fast_finish: true - allow_failures: - - php: "7.4" - - env: CONTAO_VERSION='contao/core-bundle ~4.10.0@dev' - -before_script: - - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - travis_retry composer self-update && composer --version - - travis_retry composer require contao/core-bundle $CONTAO_VERSION --no-update - - > - if [ "x${TRAVIS_TAG}" != "x" ]; then - export COMPOSER_ROOT_VERSION=${TRAVIS_TAG} - else - export COMPOSER_ROOT_VERSION=$([[ ${TRAVIS_BRANCH} =~ (hotfix|release)/([0-9.]*(-(alpha|beta|rc)[0-9]+)?) ]] \ - && echo ${BASH_REMATCH[2]} \ - || echo dev-${TRAVIS_BRANCH}) - fi - - echo "Using root version ${COMPOSER_ROOT_VERSION}" - - > - echo "PHP version: ${TRAVIS_PHP_VERSION}"; - if [ "x${TRAVIS_PHP_VERSION}" == "xnightly" ]; then - travis_retry composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-suggest - else - travis_retry composer update --prefer-dist --no-interaction --no-suggest - fi - -script: ant -keep-going - -# Hack to make things work again - we can not use a shallow repository. -git: - depth: 2147483647 - -branches: - except: - - /.*-translation/ - -cache: - directories: - - vendor diff --git a/README.md b/README.md index 913ef0f..3f00d88 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/composer.json b/composer.json index 8bef536..5ed4ea6 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -51,6 +51,11 @@ } }, "config": { + "allow-plugins": { + "contao-components/installer": false, + "ocramius/package-versions": false, + "contao/manager-plugin": false + }, "sort-packages": true } } diff --git a/src/Resources/contao/config/config.php b/src/Resources/contao/config/config.php index a0d22c0..46ad633 100644 --- a/src/Resources/contao/config/config.php +++ b/src/Resources/contao/config/config.php @@ -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. @@ -12,8 +12,9 @@ * * @package contao-community-alliance/dc-general-contao-frontend * @author Sven Baumann - * @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 + * @copyright 2016-2022 Contao Community Alliance. + * @license https://github.com/contao-community-alliance/dc-general-contao-frontend/blob/master/LICENSE LGPL-3.0 * @filesource */ diff --git a/src/Resources/contao/templates/widgets/form_upload-on-steroids.html5 b/src/Resources/contao/templates/widgets/form_upload-on-steroids.html5 index 9d13cca..9caf3d0 100644 --- a/src/Resources/contao/templates/widgets/form_upload-on-steroids.html5 +++ b/src/Resources/contao/templates/widgets/form_upload-on-steroids.html5 @@ -5,7 +5,8 @@ label): ?>