diff --git a/.github/workflows/ecs-fix.yml b/.github/workflows/ecs-fix.yml new file mode 100644 index 0000000..feb8383 --- /dev/null +++ b/.github/workflows/ecs-fix.yml @@ -0,0 +1,44 @@ +name: Coding standard refactor +on: + schedule: + - cron: '0 0 * * SUN' + workflow_dispatch: ~ + +jobs: + ecs-fix: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + branch: [ 'master' ] + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ matrix.branch }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + + - name: Composer install + run: composer install --no-interaction --no-scripts + + - name: Run ECS + run: | + vendor/bin/ecs check src --fix --config ecs.php + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + commit-message: '[CS] Refactor' + author: DACHCOM Bot + title: '[CS] Refactor' + body: | + This PR has been generated automatically to fix code-styles + labels: | + Enhancement + branch: coding-standard/refactor-${{ matrix.branch }} + delete-branch: true + base: ${{ matrix.branch }} \ No newline at end of file diff --git a/.github/workflows/ecs.yml b/.github/workflows/ecs.yml deleted file mode 100644 index 00b77e8..0000000 --- a/.github/workflows/ecs.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: Easy Coding Standards -on: - push: - branches: [ 'master' ] - pull_request: - branches: [ 'master' ] - -jobs: - ecs: - runs-on: ubuntu-latest - env: - TEST_BUNDLE_NAME: "I18nBundle" - TEST_BUNDLE_INSTALLER_CLASS: "I18nBundle\\Tool\\Install" - TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests" - TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}" - - PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework" - PIMCORE_CODECEPTION_VERSION: "3.0" - - APP_ENV: test - PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/dachcom_bundle_test" - PIMCORE_TEST_URL: "http://localhost" - - SYMFONY_DEPRECATIONS_HELPER: "weak" - PIMCORE_PHP_ERROR_REPORTING: 32767 - - WEBDRIVER_HOST: localhost - WEBDRIVER_URL: "http://localhost:8080/" - - services: - mysql: - image: mysql:8.0 - env: - MYSQL_ROOT_PASSWORD: root - ports: - - 3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - strategy: - matrix: - php: [ 8.3 ] - symfony: [ ^6.4 ] - pimcore: [ ~11.4.0 ] - include: - - pimcore: ~11.4.0 - template_tag: 2024.3 - steps: - - uses: actions/checkout@v4 - with: - path: lib/test-bundle - - - name: Generate Application Structure - run: | - git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git - mv skeleton/composer.json . - mv skeleton/bin . - mv skeleton/config . - mv skeleton/public . - mv skeleton/src . - mv skeleton/templates . - mv skeleton/var . - rm -r skeleton - - - name: Setup Pimcore Codeception Framework - env: - MATRIX_PIMCORE_VERSION: ${{ matrix.pimcore }} - MATRIX_PIMCORE_TEMPLATE_TAG: ${{ matrix.template_tag }} - run: | - git clone -b ${{ env.PIMCORE_CODECEPTION_VERSION }} --single-branch --depth 1 https://github.com/dachcom-digital/pimcore-codeception-framework.git - ls -al pimcore-codeception-framework - chmod +x ./pimcore-codeception-framework/src/_etc/scripts/setup.sh - ./pimcore-codeception-framework/src/_etc/scripts/setup.sh - - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: intl - coverage: none - - - name: Check PHP Version - run: php -v - - - name: Setup MySql - run: | - sudo systemctl start mysql - mysql -uroot -proot -h127.0.0.1 -e "CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;" - - - name: Get Composer Cache Directory - id: composer-cache - run: | - echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache Composer Downloads - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Composer install - env: - TEST_PIMCORE_VERSION: ${{ matrix.pimcore }} - TEST_SYMFONY_VERSION: ${{ matrix.symfony }} - run: | - chmod +x ./pimcore-codeception-framework/src/_etc/scripts/composer.sh - ./pimcore-codeception-framework/src/_etc/scripts/composer.sh - - - name: Assets Install - run: | - bin/console assets:install public --relative --symlink - - - name: Easy Coding Standard Check - continue-on-error: true - run: | - bin/console cache:warmup --env=test - vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/ --config ${{ github.workspace }}/lib/test-bundle/ecs.php \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1dedc83..a6c12bc 100644 --- a/.gitignore +++ b/.gitignore @@ -40,10 +40,9 @@ atlassian-ide-plugin.xml .project ehthumbs.db Thumbs.db -Vagrantfile -.vagrant php-cgi.core -.sass-cache +/vendor/ +/composer.lock # codeception (only stage *.dist.yml config files) /codeception.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 6985bfe..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,61 +0,0 @@ -# Contributing to a Members - -## Bug Reports & Feature Requests -The Members team heavily uses (and loves!) GitHub for all of our software management. -We use GitHub issues exclusively to track all bugs and features. - -* [Open an issue](https://github.com/dachcom-digital/pimcore-members/issues) here on GitHub. -If you can, **please provide a fix and create a pull request (PR) instead**; this will automatically create an issue for you. -* Report security issues **only** to support@dachcom.ch -* Please be patient as not all items will be tested immediately - remember, Members is open source and free of charge. -* Occasionally we'll close issues if they appear stale or are too vague - please don't take this personally! -Please feel free to re-open issues we've closed if there's something we've missed and they still need to be addressed. - -## Contributing Pull Requests -PR's are even better than issues. -We gladly accept community pull requests. -There are a few necessary steps before we can accept a pull request: - -* [Open an issue](https://github.com/dachcom-digital/pimcore-members/issues) describing the problem that you are looking to solve in -your PR (if one is not already open), and your approach to solving it (no necessary for bug fixes - only feature contributions). -* [Fork us!](https://help.github.com/articles/fork-a-repo/) Code! Follow the coding standards PSR-1, PSR-2 and PSR-4. -* [Send a pull request](https://help.github.com/articles/using-pull-requests/) from your fork’s branch to our `master` branch. - -### Contributor License Agreement -The following terms are used throughout this agreement: - -* **You** - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any -entity that controls or is controlled by the legal entity, or is under common control with it. - -* **Project** - is an umbrella term that refers to any and all Members projects. - -* **Contribution** - any type of work that is submitted to a Project, including any modifications or additions to -existing work. - -* **Submitted** - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or -verbal communication with Members, contributors or maintainers. - -#### 1. Grant of Copyright License. -Subject to the terms and conditions of this agreement, You grant to the Projects’ maintainers, contributors, users and -to Members a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, -prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your contributions and such -derivative works. Except for this license, You reserve all rights, title, and interest in your contributions. - -#### 2. Grant of Patent License. -Subject to the terms and conditions of this agreement, You grant to the Projects’ maintainers, contributors, users and -to dachcom-digital/i18n a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer your contributions, where -such license applies only to those patent claims licensable by you that are necessarily infringed by your contribution -or by combination of your contribution with the project to which this contribution was submitted. - -If any entity institutes patent litigation - including cross-claim or counterclaim in a lawsuit - against You alleging -that your contribution or any project it was submitted to constitutes or is responsible for direct or contributory -patent infringement, then any patent licenses granted to that entity under this agreement shall terminate as of the -date such litigation is filed. - -#### 3. Source of Contribution. -Your contribution is either your original creation, based upon previous work that, to the best of your knowledge, is -covered under an appropriate open source license and you have the right under that license to submit that work with -modifications, whether created in whole or in part by you, or you have clearly identified the source of the contribution -and any license or other restriction (like related patents, trademarks, and license agreements) of which you are -personally aware. diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index e5ce93d..b42afe3 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,9 +1,9 @@ -| Q | A | -|------------------|--------| -| Bug report? | yes/no | -| Feature request? | yes/no | -| BC Break report? | yes/no | -| RFC? | yes/no | +| Q | A +| ---------------- | ----- +| Bug report? | yes/no +| Feature request? | yes/no +| BC Break report? | yes/no +| RFC? | yes/no