Skip to content

Commit 8babfbf

Browse files
Merge pull request #1 from brianvarskonst/feature/upgrade
Feature/Upgrade - Modernize Library
2 parents 1616c3f + f4fd50e commit 8babfbf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1074
-1746
lines changed

.github/workflows/testing.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Testing
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
# Notice: Ubuntu will already ship composer 2 which currently breaks the used tools.
12+
- uses: shivammathur/setup-php@v2
13+
with:
14+
php-version: '7.4'
15+
tools: composer:v1
16+
# Save the current branch name in an environment variable, to be used for conditional logic below
17+
- name: Extract branch name into env
18+
id: git
19+
run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})"
20+
21+
- uses: actions/checkout@v1
22+
23+
- name: Get Composer Cache Directory
24+
id: composer-cache
25+
run: |
26+
echo "::set-output name=dir::$(composer config cache-files-dir)"
27+
- uses: actions/cache@v2
28+
with:
29+
path: ${{ steps.composer-cache.outputs.dir }}
30+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-composer-
33+
- name: Validate composer.json
34+
run: composer validate
35+
36+
- name: Install dependencies
37+
run: composer install --prefer-dist --no-progress --no-suggest
38+
39+
- name: Run Codesniffer
40+
run: composer cs

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
###> composer/general ###
2+
composer.lock
3+
/vendor
4+
###< composer/general ###
5+
6+
###> phpunit/general ###
7+
phpunit.xml
8+
.phpunit.result.cache
9+
###< phpunit/general ###

.psalm/autoloader.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php // phpcs:disable
2+
3+
if (defined('ABSPATH')) {
4+
return;
5+
}
6+
7+
define('MINUTE_IN_SECONDS', 60);
8+
define('HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS);
9+
define('DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS);
10+
define('WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS);
11+
define('MONTH_IN_SECONDS', 30 * DAY_IN_SECONDS);
12+
define('YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS);
13+
14+
define('ABSPATH', dirname(__DIR__) . '/vendor/wordpress/wordpress/');
15+
define('WPINC', 'wp-includes');
16+
17+
defined('WP_CONTENT_DIR') or define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
18+
defined('WP_PLUGIN_DIR') or define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
19+
20+
require_once ABSPATH . WPINC . '/pluggable.php';
21+
require_once ABSPATH . WPINC . '/kses.php';
22+
require_once ABSPATH . WPINC . '/functions.php';

LICENSE

Lines changed: 21 additions & 339 deletions
Large diffs are not rendered by default.

NonceTest.php

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)