diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml new file mode 100644 index 0000000..d834de8 --- /dev/null +++ b/.github/workflows/lint-php.yml @@ -0,0 +1,35 @@ +name: PHP Lint + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: PHP ${{ matrix.php }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['7.4', '8.0', '8.1', '8.2', '8.3'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: parallel-lint + coverage: none + + - name: Lint PHP files + run: parallel-lint . diff --git a/.github/workflows/wpcs.yml b/.github/workflows/wpcs.yml new file mode 100644 index 0000000..b3ade22 --- /dev/null +++ b/.github/workflows/wpcs.yml @@ -0,0 +1,29 @@ +name: WordPress Coding Standards + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + phpcs: + name: WPCS + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: WPCS check + uses: 10up/wpcs-action@stable + with: + enable_warnings: true + standard: WordPress + only_changed_lines: true diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..ce5524c --- /dev/null +++ b/composer.json @@ -0,0 +1,20 @@ +{ + "name": "progressplanner/pp-disable-xml-rpc", + "description": "A utility plugin to disable XML-RPC in WordPress.", + "type": "wordpress-plugin", + "homepage": "https://progressplanner.com", + "license": "MIT", + "authors": [ + { + "name": "Team Emilia Projects", + "homepage": "https://prpl.fyi/about" + } + ], + "require": { + "php": ">=7.4" + }, + "config": { + "optimize-autoloader": true, + "sort-packages": true + } +}