Skip to content

Commit

Permalink
Internal: Create a Notifications package for plugins [ED-16360] (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
KingYes authored Jan 15, 2025
1 parent b5ec14b commit ba1f449
Show file tree
Hide file tree
Showing 7 changed files with 872 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/php-coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: PHP Lint

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: read

jobs:
PHP-Code-Standards:
name: Lint PHP files
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip PHPCS]') || !contains(github.event.head_commit.message, '[skip CI]')"
steps:
- name: Check out source code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # 2.27.1
with:
php-version: '7.4'
coverage: none
tools: composer, cs2pr, phpcs
env:
fail-fast: 'true'

- name: Log debug information
run: |
export PATH=$HOME/.composer/vendor/bin:$PATH
php --version
phpcs -i
composer --version
- name: Install dependencies
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # 2.2.0

- name: Run style check
run: |
export PATH=$HOME/.composer/vendor/bin:$PATH
composer run lint
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/
node_modules/
.idea/
23 changes: 23 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "elementor/wp-notifications-package",
"version": "1.0.0",
"require-dev": {
"squizlabs/php_codesniffer": "^3.10.2",
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0.0",
"wp-coding-standards/wpcs": "^3.1.0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"scripts": {
"lint": "vendor/bin/phpcs --standard=./phpcs.xml .",
"lint:fix": "vendor/bin/phpcbf ."
},
"autoload": {
"psr-4": {
"Elementor\\WPNotificationsPackage\\": "src/"
}
}
}
Loading

0 comments on commit ba1f449

Please sign in to comment.