From 016883d306a484aa7b3c7a751395644a1d977fbe Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 31 Aug 2022 22:04:55 -0400 Subject: [PATCH 1/4] Updating github actions --- .github/dependabot.yml | 12 + .github/workflows/build.yml | 44 -- .github/workflows/built-branch.yml | 10 + .github/workflows/built-tag.yml | 11 + .github/workflows/coding-standards.yml | 42 +- .github/workflows/release-tag.yml | 47 -- .github/workflows/release.yml | 24 - .github/workflows/unit-test.yml | 84 +-- composer.json | 4 +- composer.lock | 868 ++++++++++--------------- 10 files changed, 390 insertions(+), 756 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/built-branch.yml create mode 100644 .github/workflows/built-tag.yml delete mode 100644 .github/workflows/release-tag.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f33f0346..ff0cf803 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,3 +13,15 @@ updates: directory: "/" schedule: interval: "weekly" + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + day: "saturday" + time: "09:00" + timezone: "America/New_York" + ignore: + - dependency-name: "@wordpress/*" + labels: + - "dependabot" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 1e50f9cb..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Update the -built branch - -on: - push: - branches: - - main - - develop - -jobs: - built-branch: - name: Built Branch - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Clear previous vendor - shell: bash - run: rm -rf vendor - - name: Install dependencies - uses: php-actions/composer@v6 - with: - php_version: 8.0 - composer_version: 2 - args: --prefer-dist --no-dev - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Push to -built branch - shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BUILT_BRANCH: '${{ steps.extract_branch.outputs.branch }}-built' - run: | - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - git config --global user.name "$GITHUB_ACTOR" - - rm -rf .gitignore docker_tag output.log .github - mv .deployignore .gitignore - - git checkout -b $BUILT_BRANCH - - git add -A && git commit -m "Changes from $GITHUB_SHA" - git push --force -u origin "${BUILT_BRANCH}" diff --git a/.github/workflows/built-branch.yml b/.github/workflows/built-branch.yml new file mode 100644 index 00000000..d9ec0be7 --- /dev/null +++ b/.github/workflows/built-branch.yml @@ -0,0 +1,10 @@ +name: Create a -built branch + +on: + push: + branches: + - main + +jobs: + built-branch: + uses: alleyinteractive/.github/.github/workflows/built-branch.yml@main diff --git a/.github/workflows/built-tag.yml b/.github/workflows/built-tag.yml new file mode 100644 index 00000000..e6f5c223 --- /dev/null +++ b/.github/workflows/built-tag.yml @@ -0,0 +1,11 @@ +name: Create a -built tag + +on: + push: + tags: + - 'v*.*.*' + - '!*-built' + +jobs: + built-tag: + uses: alleyinteractive/.github/.github/workflows/built-tag.yml@main diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 0a7a63a0..c3364073 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -9,43 +9,5 @@ on: - cron: '0 0 * * *' jobs: - tests: - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - php: [8.0] - name: PHP ${{ matrix.php }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Get Composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Set up Composer caching - uses: actions/cache@v3 - env: - cache-name: cache-composer-dependencies - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ matrix.php }}-composer- - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd - tools: composer:v2 - coverage: none - - name: Validate Composer - run: composer validate --strict - - name: Install dependencies - uses: nick-invision/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer install - - name: Run phpcs - run: composer run phpcs + coding-standards: + uses: alleyinteractive/.github/.github/workflows/php-coding-standards.yml@main diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml deleted file mode 100644 index ed5d9a8f..00000000 --- a/.github/workflows/release-tag.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Create a -built tag - -on: - push: - tags: - - 'v*.*.*' - - '!*-built' - -jobs: - built-branch: - name: Create Built Release - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Clear previous vendor - shell: bash - run: rm -rf vendor && rm -rf composer.lock - - name: Install dependencies - uses: php-actions/composer@v6 - with: - php_version: 8.0 - composer_version: 2 - args: --prefer-dist --no-dev - - name: Extract branch name - shell: bash - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - id: vars - - name: Push to -built branch - shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BUILT_BRANCH: '${{ steps.vars.outputs.tag }}-built' - TAG_NAME: '${{ steps.vars.outputs.tag }}-built' - run: | - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - git config --global user.name "$GITHUB_ACTOR" - - rm -rf .gitignore docker_tag output.log .github - mv .deployignore .gitignore - - git checkout -b $BUILT_BRANCH - - git add -A && git commit -m "Built changes for $TAG_NAME" - - git tag -a "$TAG_NAME" -m "Build assets for $TAG_NAME" - git push origin "refs/tags/$TAG_NAME" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 51418060..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: - push: - tags: - - 'v*-built' # Create releases for built branches (eg. v2.0.8-built) - -name: Create -built release - -jobs: - release: - name: Create release - runs-on: ubuntu-latest - - steps: - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by Actions - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - body: A version that contains Composer dependencies for use as a submodule. - draft: false - prerelease: true diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index e09f5b9a..23a73ad6 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -9,84 +9,12 @@ on: - cron: '0 0 * * *' jobs: - tests: - runs-on: ubuntu-latest - - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - redis: - image: redis:5.0 - ports: - - 6379:6379 - options: --entrypoint redis-server - continue-on-error: ${{ matrix.can_fail }} + php-tests: strategy: - fail-fast: true matrix: php: [7.4, 8.0] - wp_version: ["latest"] - can_fail: [false] - - name: PHP ${{ matrix.php }} -- ${{ matrix.wp_version }} - env: - CACHEDIR: /tmp/test-cache - WP_CORE_DIR: /tmp/wordpress - WP_VERSION: ${{ matrix.wp_version }} - WP_DB_HOST: 127.0.0.1 - WP_DB_USER: root - WP_DB_PASSWORD: '""' - - steps: - - name: Cancel previous runs of this workflow (pull requests only) - if: ${{ github.event_name == 'pull_request' }} - uses: styfle/cancel-workflow-action@0.10.0 - with: - access_token: ${{ github.token }} - - - name: Checkout code - uses: actions/checkout@v3 - - - name: Get Composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Set up Composer caching - uses: actions/cache@v3 - env: - cache-name: cache-composer-dependencies - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd - tools: composer:v2 - coverage: none - - - name: Setup Memcached - uses: niden/actions-memcached@v7 - - - name: Validate Composer - run: composer validate --strict - - - name: Install dependencies - uses: nick-invision/retry@v2 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer install - - - name: Test Package - shell: bash - run: composer run phpunit + wordpress: ["latest"] + uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main + with: + php: ${{ matrix.php }} + wordpress: ${{ matrix.wordpress }} diff --git a/composer.json b/composer.json index f52ddda6..c45f422d 100644 --- a/composer.json +++ b/composer.json @@ -12,13 +12,13 @@ ], "require": { "php": "^7.4 || ^8.0", - "alleyinteractive/composer-wordpress-autoloader": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", "monolog/monolog": "^2.0", "psr/log": "^1.1" }, "require-dev": { "alleyinteractive/alley-coding-standards": "^0.3", - "mantle-framework/testkit": "^0.4", + "mantle-framework/testkit": "^0.5", "mockery/mockery": "^1.3", "phpunit/phpunit": "^9.3.3" }, diff --git a/composer.lock b/composer.lock index cabb2118..52df23d6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,24 +4,24 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "368851554b8a5d2052a9941768ddbf61", + "content-hash": "c866c5553629e9b0b21fe4c4455b17bf", "packages": [ { "name": "alleyinteractive/composer-wordpress-autoloader", - "version": "v0.4.1", + "version": "v0.6.0", "source": { "type": "git", "url": "https://github.com/alleyinteractive/composer-wordpress-autoloader.git", - "reference": "4964609549c2589609607aae04cd1079b1438c0c" + "reference": "01662487d8121b0fe2e08d904338a825555de300" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alleyinteractive/composer-wordpress-autoloader/zipball/4964609549c2589609607aae04cd1079b1438c0c", - "reference": "4964609549c2589609607aae04cd1079b1438c0c", + "url": "https://api.github.com/repos/alleyinteractive/composer-wordpress-autoloader/zipball/01662487d8121b0fe2e08d904338a825555de300", + "reference": "01662487d8121b0fe2e08d904338a825555de300", "shasum": "" }, "require": { - "alleyinteractive/wordpress-autoloader": "^0.2", + "alleyinteractive/wordpress-autoloader": "^1.0", "composer-plugin-api": "^2.0", "php": "^7.4.0|^8.0|^8.1" }, @@ -35,6 +35,9 @@ "class": "ComposerWordPressAutoloader\\Plugin" }, "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { "ComposerWordPressAutoloader\\": "src/" } @@ -56,22 +59,22 @@ "description": "Autoload files using WordPress File Conventions using Composer", "support": { "issues": "https://github.com/alleyinteractive/composer-wordpress-autoloader/issues", - "source": "https://github.com/alleyinteractive/composer-wordpress-autoloader/tree/v0.4.1" + "source": "https://github.com/alleyinteractive/composer-wordpress-autoloader/tree/v0.6.0" }, - "time": "2022-04-14T19:47:12+00:00" + "time": "2022-07-29T21:20:17+00:00" }, { "name": "alleyinteractive/wordpress-autoloader", - "version": "v0.2.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/alleyinteractive/wordpress-autoloader.git", - "reference": "b02e276f1fa710f7985ae1acb352e524d65dd38e" + "reference": "c7599d95f49f1cdc38fad19944a50b19ec0dd6ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alleyinteractive/wordpress-autoloader/zipball/b02e276f1fa710f7985ae1acb352e524d65dd38e", - "reference": "b02e276f1fa710f7985ae1acb352e524d65dd38e", + "url": "https://api.github.com/repos/alleyinteractive/wordpress-autoloader/zipball/c7599d95f49f1cdc38fad19944a50b19ec0dd6ca", + "reference": "c7599d95f49f1cdc38fad19944a50b19ec0dd6ca", "shasum": "" }, "require": { @@ -100,9 +103,9 @@ "description": "Autoload files using WordPress File Conventions", "support": { "issues": "https://github.com/alleyinteractive/wordpress-autoloader/issues", - "source": "https://github.com/alleyinteractive/wordpress-autoloader/tree/v0.2.0" + "source": "https://github.com/alleyinteractive/wordpress-autoloader/tree/v1.1.1" }, - "time": "2022-04-06T15:27:01+00:00" + "time": "2022-08-31T20:51:21+00:00" }, { "name": "monolog/monolog", @@ -291,6 +294,67 @@ }, "time": "2021-02-26T16:08:31+00:00" }, + { + "name": "alleyinteractive/wp-concurrent-remote-requests", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/alleyinteractive/wp-concurrent-remote-requests.git", + "reference": "a52fa5add36c622f25c7a54ed0ac6eaf63bdbd87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alleyinteractive/wp-concurrent-remote-requests/zipball/a52fa5add36c622f25c7a54ed0ac6eaf63bdbd87", + "reference": "a52fa5add36c622f25c7a54ed0ac6eaf63bdbd87", + "shasum": "" + }, + "require": { + "alleyinteractive/composer-wordpress-autoloader": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "alleyinteractive/alley-coding-standards": "^0.3", + "nunomaduro/collision": "^5.0", + "phpunit/phpunit": "^9.3.3" + }, + "type": "wordpress-plugin", + "extra": { + "wordpress-autoloader": { + "autoload": { + "Alley\\WP\\Concurrent_Remote_Requests\\": "src" + }, + "autoload-dev": { + "Alley\\WP\\Concurrent_Remote_Requests\\Tests\\": "tests" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Sean Fisher", + "email": "srtfisher@gmail.com" + } + ], + "description": "Feature plugin for concurrent HTTP remote requests", + "homepage": "https://github.com/alleyinteractive/wp-concurrent-remote-requests", + "keywords": [ + "alleyinteractive", + "wp-concurrent-remote-requests" + ], + "support": { + "issues": "https://github.com/alleyinteractive/wp-concurrent-remote-requests/issues", + "source": "https://github.com/alleyinteractive/wp-concurrent-remote-requests/tree/v1.0.0" + }, + "time": "2022-07-30T03:18:37+00:00" + }, { "name": "automattic/vipwpcs", "version": "2.3.3", @@ -581,16 +645,16 @@ }, { "name": "fakerphp/faker", - "version": "v1.19.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75" + "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/d7f08a622b3346766325488aa32ddc93ccdecc75", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", + "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", "shasum": "" }, "require": { @@ -617,7 +681,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.19-dev" + "dev-main": "v1.20-dev" } }, "autoload": { @@ -642,9 +706,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.19.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" }, - "time": "2022-02-02T17:38:57+00:00" + "time": "2022-07-20T13:12:54+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -699,7 +763,7 @@ }, { "name": "illuminate/bus", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/bus.git", @@ -752,7 +816,7 @@ }, { "name": "illuminate/collections", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", @@ -806,7 +870,7 @@ }, { "name": "illuminate/container", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", @@ -857,7 +921,7 @@ }, { "name": "illuminate/contracts", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -905,7 +969,7 @@ }, { "name": "illuminate/events", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", @@ -960,7 +1024,7 @@ }, { "name": "illuminate/filesystem", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", @@ -1022,7 +1086,7 @@ }, { "name": "illuminate/macroable", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -1068,7 +1132,7 @@ }, { "name": "illuminate/pipeline", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/pipeline.git", @@ -1116,7 +1180,7 @@ }, { "name": "illuminate/support", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", @@ -1184,7 +1248,7 @@ }, { "name": "illuminate/view", - "version": "v8.83.18", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", @@ -1439,28 +1503,28 @@ }, { "name": "mantle-framework/config", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/config.git", - "reference": "73d6ff62c6c978b23713937276a7e8fd657dd50b" + "reference": "8f2008269f492cacb2ab7808b4a752d98310ca78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/config/zipball/73d6ff62c6c978b23713937276a7e8fd657dd50b", - "reference": "73d6ff62c6c978b23713937276a7e8fd657dd50b", + "url": "https://api.github.com/repos/mantle-framework/config/zipball/8f2008269f492cacb2ab7808b4a752d98310ca78", + "reference": "8f2008269f492cacb2ab7808b4a752d98310ca78", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", - "mantle-framework/contracts": "^0.4", - "mantle-framework/support": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", + "mantle-framework/contracts": "^0.5", + "mantle-framework/support": "^0.5", "php": "^7.4|^8.0" }, "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1480,27 +1544,27 @@ ], "description": "The Mantle Framework Config Package", "support": { - "source": "https://github.com/mantle-framework/config/tree/v0.4.0" + "source": "https://github.com/mantle-framework/config/tree/v0.5.4" }, - "time": "2022-06-27T22:25:24+00:00" + "time": "2022-07-30T03:28:27+00:00" }, { "name": "mantle-framework/container", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/container.git", - "reference": "36a7a260f8d0926670bc9ae00a9264a16e7b7847" + "reference": "a725d940c3e60106caacb179d562cd83fe898b51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/container/zipball/36a7a260f8d0926670bc9ae00a9264a16e7b7847", - "reference": "36a7a260f8d0926670bc9ae00a9264a16e7b7847", + "url": "https://api.github.com/repos/mantle-framework/container/zipball/a725d940c3e60106caacb179d562cd83fe898b51", + "reference": "a725d940c3e60106caacb179d562cd83fe898b51", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", - "mantle-framework/contracts": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", + "mantle-framework/contracts": "^0.5", "php": "^7.4|^8.0", "psr/container": "^1.1.1 || ^2.0.1" }, @@ -1510,7 +1574,7 @@ "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1530,26 +1594,26 @@ ], "description": "The Mantle Framework Container Package", "support": { - "source": "https://github.com/mantle-framework/container/tree/v0.4.0" + "source": "https://github.com/mantle-framework/container/tree/v0.5.4" }, - "time": "2022-06-27T22:25:15+00:00" + "time": "2022-07-30T03:28:30+00:00" }, { "name": "mantle-framework/contracts", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/contracts.git", - "reference": "1ed8440f4f43f903d2418e22134b4b1a47e1089b" + "reference": "81a82d1b0c6dd6a164614d67f9b80cf0481df449" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/contracts/zipball/1ed8440f4f43f903d2418e22134b4b1a47e1089b", - "reference": "1ed8440f4f43f903d2418e22134b4b1a47e1089b", + "url": "https://api.github.com/repos/mantle-framework/contracts/zipball/81a82d1b0c6dd6a164614d67f9b80cf0481df449", + "reference": "81a82d1b0c6dd6a164614d67f9b80cf0481df449", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", "php": "^7.4|^8.0", "psr/container": "^1.1.1 || ^2.0.1" }, @@ -1559,7 +1623,7 @@ "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1579,28 +1643,28 @@ ], "description": "The Mantle Framework Contracts Package", "support": { - "source": "https://github.com/mantle-framework/contracts/tree/v0.4.0" + "source": "https://github.com/mantle-framework/contracts/tree/v0.5.4" }, - "time": "2022-06-27T22:25:17+00:00" + "time": "2022-07-30T03:28:29+00:00" }, { "name": "mantle-framework/database", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/database.git", - "reference": "4e444866e777e58d0f58545eb8b2f03f293c4d96" + "reference": "b154216a64f1924db5d031e077ef2fbcede3eec8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/database/zipball/4e444866e777e58d0f58545eb8b2f03f293c4d96", - "reference": "4e444866e777e58d0f58545eb8b2f03f293c4d96", + "url": "https://api.github.com/repos/mantle-framework/database/zipball/b154216a64f1924db5d031e077ef2fbcede3eec8", + "reference": "b154216a64f1924db5d031e077ef2fbcede3eec8", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", - "mantle-framework/contracts": "^0.4", - "mantle-framework/support": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", + "mantle-framework/contracts": "^0.5", + "mantle-framework/support": "^0.5", "php": "^7.4|^8.0", "psr/container": "^1.1.1 || ^2.0.1", "symfony/finder": "^5.3" @@ -1608,7 +1672,7 @@ "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1628,29 +1692,29 @@ ], "description": "The Mantle Framework Database Package", "support": { - "source": "https://github.com/mantle-framework/database/tree/v0.4.0" + "source": "https://github.com/mantle-framework/database/tree/v0.5.4" }, - "time": "2022-06-27T22:25:19+00:00" + "time": "2022-07-30T03:28:27+00:00" }, { "name": "mantle-framework/events", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/events.git", - "reference": "5ce8424bbdebde560bf16f3d073bc68d9c2dd714" + "reference": "087803314cfbaa22529499c82437ef4fa17a65c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/events/zipball/5ce8424bbdebde560bf16f3d073bc68d9c2dd714", - "reference": "5ce8424bbdebde560bf16f3d073bc68d9c2dd714", + "url": "https://api.github.com/repos/mantle-framework/events/zipball/087803314cfbaa22529499c82437ef4fa17a65c9", + "reference": "087803314cfbaa22529499c82437ef4fa17a65c9", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", - "mantle-framework/container": "^0.4", - "mantle-framework/contracts": "^0.4", - "mantle-framework/support": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", + "mantle-framework/container": "^0.5", + "mantle-framework/contracts": "^0.5", + "mantle-framework/support": "^0.5", "php": "^7.4|^8.0", "psr/container": "^1.1.1 || ^2.0.1", "symfony/finder": "^5.3" @@ -1658,7 +1722,7 @@ "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1678,33 +1742,33 @@ ], "description": "The Mantle Framework Events Package", "support": { - "source": "https://github.com/mantle-framework/events/tree/v0.4.0" + "source": "https://github.com/mantle-framework/events/tree/v0.5.4" }, - "time": "2022-06-27T22:25:14+00:00" + "time": "2022-07-30T03:28:34+00:00" }, { "name": "mantle-framework/faker", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/faker.git", - "reference": "7070f33406855fbb013ce735830fafc4fb031954" + "reference": "759404dbd10e3bc2ae35dde1357cbc8f7b99dfe0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/faker/zipball/7070f33406855fbb013ce735830fafc4fb031954", - "reference": "7070f33406855fbb013ce735830fafc4fb031954", + "url": "https://api.github.com/repos/mantle-framework/faker/zipball/759404dbd10e3bc2ae35dde1357cbc8f7b99dfe0", + "reference": "759404dbd10e3bc2ae35dde1357cbc8f7b99dfe0", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", "fakerphp/faker": "^1.16", "php": "^7.4|^8.0" }, "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1724,30 +1788,30 @@ ], "description": "The Mantle Framework Faker Package", "support": { - "source": "https://github.com/mantle-framework/faker/tree/v0.4.0" + "source": "https://github.com/mantle-framework/faker/tree/v0.5.4" }, - "time": "2022-06-27T22:25:22+00:00" + "time": "2022-07-30T03:28:31+00:00" }, { "name": "mantle-framework/filesystem", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/filesystem.git", - "reference": "ddafc0cb7995961b933c37a631a9dff1703da144" + "reference": "a0c8bdaa2993d61561fb64247f6694ff4d640536" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/filesystem/zipball/ddafc0cb7995961b933c37a631a9dff1703da144", - "reference": "ddafc0cb7995961b933c37a631a9dff1703da144", + "url": "https://api.github.com/repos/mantle-framework/filesystem/zipball/a0c8bdaa2993d61561fb64247f6694ff4d640536", + "reference": "a0c8bdaa2993d61561fb64247f6694ff4d640536", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", "league/flysystem": "^1.1", "league/flysystem-cached-adapter": "^1.1", - "mantle-framework/contracts": "^0.4", - "mantle-framework/support": "^0.4", + "mantle-framework/contracts": "^0.5", + "mantle-framework/support": "^0.5", "php": "^7.4|^8.0", "psr/container": "^1.1.1 || ^2.0.1", "symfony/finder": "^5.3", @@ -1756,7 +1820,7 @@ "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1776,29 +1840,29 @@ ], "description": "The Mantle Framework Filesystem Package", "support": { - "source": "https://github.com/mantle-framework/filesystem/tree/v0.4.0" + "source": "https://github.com/mantle-framework/filesystem/tree/v0.5.4" }, - "time": "2022-06-27T22:25:19+00:00" + "time": "2022-07-30T03:28:25+00:00" }, { "name": "mantle-framework/http", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/http.git", - "reference": "b94398f09c547045f16a5ef3a29923e7d3f57d76" + "reference": "40a67fcc654573e451108b0a2e02c1680c930a5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/http/zipball/b94398f09c547045f16a5ef3a29923e7d3f57d76", - "reference": "b94398f09c547045f16a5ef3a29923e7d3f57d76", + "url": "https://api.github.com/repos/mantle-framework/http/zipball/40a67fcc654573e451108b0a2e02c1680c930a5e", + "reference": "40a67fcc654573e451108b0a2e02c1680c930a5e", "shasum": "" }, "require": { "illuminate/view": "^8.6", - "mantle-framework/contracts": "^0.4", - "mantle-framework/filesystem": "^0.4", - "mantle-framework/support": "^0.4", + "mantle-framework/contracts": "^0.5", + "mantle-framework/filesystem": "^0.5", + "mantle-framework/support": "^0.5", "php": "^7.4|^8.0", "symfony/http-foundation": "^5.3", "symfony/http-kernel": "^5.3", @@ -1809,7 +1873,7 @@ "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1829,27 +1893,73 @@ ], "description": "The Mantle Framework Http Package", "support": { - "source": "https://github.com/mantle-framework/http/tree/v0.4.0" + "source": "https://github.com/mantle-framework/http/tree/v0.5.4" }, - "time": "2022-06-27T22:25:18+00:00" + "time": "2022-07-26T03:36:44+00:00" + }, + { + "name": "mantle-framework/http-client", + "version": "v0.5.4", + "source": { + "type": "git", + "url": "https://github.com/mantle-framework/http-client.git", + "reference": "b872c95719f9b606cac87af9b6d887c5d93d5910" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mantle-framework/http-client/zipball/b872c95719f9b606cac87af9b6d887c5d93d5910", + "reference": "b872c95719f9b606cac87af9b6d887c5d93d5910", + "shasum": "" + }, + "require": { + "alleyinteractive/wp-concurrent-remote-requests": "^1.0.0", + "mantle-framework/support": "^0.5", + "php": "^7.4|^8.0" + }, + "type": "project", + "extra": { + "branch-alias": { + "dev-main": "0.5-dev" + }, + "wordpress-autoloader": { + "autoload": { + "Mantle\\Http_Client": "./" + } + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Alley", + "email": "info@alley.co" + } + ], + "description": "The Mantle Framework Http Client Package", + "support": { + "source": "https://github.com/mantle-framework/http-client/tree/v0.5.4" + }, + "time": "2022-08-03T13:39:52+00:00" }, { "name": "mantle-framework/support", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/support.git", - "reference": "27770ca24676c25870186b273809836e43ce948c" + "reference": "80d57c02cafa8f61d19bc01963457fc869b7040e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/support/zipball/27770ca24676c25870186b273809836e43ce948c", - "reference": "27770ca24676c25870186b273809836e43ce948c", + "url": "https://api.github.com/repos/mantle-framework/support/zipball/80d57c02cafa8f61d19bc01963457fc869b7040e", + "reference": "80d57c02cafa8f61d19bc01963457fc869b7040e", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", - "mantle-framework/contracts": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", + "mantle-framework/contracts": "^0.5", "monolog/monolog": "^2.7", "nesbot/carbon": "^2.53", "php": "^7.4|^8.0", @@ -1865,7 +1975,7 @@ "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1890,30 +2000,31 @@ ], "description": "The Mantle Framework Support Package", "support": { - "source": "https://github.com/mantle-framework/support/tree/v0.4.0" + "source": "https://github.com/mantle-framework/support/tree/v0.5.4" }, - "time": "2022-06-27T22:25:50+00:00" + "time": "2022-07-30T03:28:56+00:00" }, { "name": "mantle-framework/testing", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/testing.git", - "reference": "49d99548ef0af5db13aedcc32e29b91b05a48f50" + "reference": "c504775bdf6ae1309088fa8e3a29fb2e7d3fc2fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/testing/zipball/49d99548ef0af5db13aedcc32e29b91b05a48f50", - "reference": "49d99548ef0af5db13aedcc32e29b91b05a48f50", + "url": "https://api.github.com/repos/mantle-framework/testing/zipball/c504775bdf6ae1309088fa8e3a29fb2e7d3fc2fb", + "reference": "c504775bdf6ae1309088fa8e3a29fb2e7d3fc2fb", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", - "mantle-framework/contracts": "^0.4", - "mantle-framework/database": "^0.4", - "mantle-framework/http": "^0.4", - "mantle-framework/support": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", + "mantle-framework/contracts": "^0.5", + "mantle-framework/database": "^0.5", + "mantle-framework/http": "^0.5", + "mantle-framework/http-client": "^0.5", + "mantle-framework/support": "^0.5", "php": "^7.4|^8.0" }, "suggest": { @@ -1922,7 +2033,7 @@ "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -1947,40 +2058,40 @@ ], "description": "The Mantle Framework Testing Package", "support": { - "source": "https://github.com/mantle-framework/testing/tree/v0.4.0" + "source": "https://github.com/mantle-framework/testing/tree/v0.5.4" }, - "time": "2022-06-27T22:25:49+00:00" + "time": "2022-08-04T19:24:10+00:00" }, { "name": "mantle-framework/testkit", - "version": "v0.4.0", + "version": "v0.5.4", "source": { "type": "git", "url": "https://github.com/mantle-framework/testkit.git", - "reference": "9693383ce88a016d906708967fc5b9202cc81f9f" + "reference": "d30d1790a28ab53b006d1d65416230dc48018cde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantle-framework/testkit/zipball/9693383ce88a016d906708967fc5b9202cc81f9f", - "reference": "9693383ce88a016d906708967fc5b9202cc81f9f", + "url": "https://api.github.com/repos/mantle-framework/testkit/zipball/d30d1790a28ab53b006d1d65416230dc48018cde", + "reference": "d30d1790a28ab53b006d1d65416230dc48018cde", "shasum": "" }, "require": { - "alleyinteractive/composer-wordpress-autoloader": "^0.4", - "mantle-framework/config": "^0.4", - "mantle-framework/container": "^0.4", - "mantle-framework/contracts": "^0.4", - "mantle-framework/events": "^0.4", - "mantle-framework/faker": "^0.4", - "mantle-framework/support": "^0.4", - "mantle-framework/testing": "^0.4", + "alleyinteractive/composer-wordpress-autoloader": "^0.6", + "mantle-framework/config": "^0.5", + "mantle-framework/container": "^0.5", + "mantle-framework/contracts": "^0.5", + "mantle-framework/events": "^0.5", + "mantle-framework/faker": "^0.5", + "mantle-framework/support": "^0.5", + "mantle-framework/testing": "^0.5", "php": "^7.4|^8.0", "phpunit/phpunit": "^9.3.3" }, "type": "project", "extra": { "branch-alias": { - "dev-main": "0.4-dev" + "dev-main": "0.5-dev" }, "wordpress-autoloader": { "autoload": { @@ -2000,9 +2111,9 @@ ], "description": "The Mantle Framework Teskit Package", "support": { - "source": "https://github.com/mantle-framework/testkit/tree/v0.4.0" + "source": "https://github.com/mantle-framework/testkit/tree/v0.5.4" }, - "time": "2022-06-27T22:25:55+00:00" + "time": "2022-08-01T23:27:33+00:00" }, { "name": "mockery/mockery", @@ -2137,16 +2248,16 @@ }, { "name": "nesbot/carbon", - "version": "2.59.1", + "version": "2.62.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "a9000603ea337c8df16cc41f8b6be95a65f4d0f5" + "reference": "7507aec3d626797ce2123cf6c6556683be22b5f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a9000603ea337c8df16cc41f8b6be95a65f4d0f5", - "reference": "a9000603ea337c8df16cc41f8b6be95a65f4d0f5", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7507aec3d626797ce2123cf6c6556683be22b5f8", + "reference": "7507aec3d626797ce2123cf6c6556683be22b5f8", "shasum": "" }, "require": { @@ -2235,7 +2346,7 @@ "type": "tidelift" } ], - "time": "2022-06-29T21:43:55+00:00" + "time": "2022-08-28T19:48:05+00:00" }, { "name": "nikic/php-parser", @@ -2576,245 +2687,18 @@ }, "time": "2021-12-30T16:37:40+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, { "name": "phpunit/php-code-coverage", - "version": "9.2.16", + "version": "9.2.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073" + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2593003befdcc10db5e213f9f28814f5aa8ac073", - "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", "shasum": "" }, "require": { @@ -2870,7 +2754,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.16" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" }, "funding": [ { @@ -2878,7 +2762,7 @@ "type": "github" } ], - "time": "2022-08-20T05:26:47+00:00" + "time": "2022-08-30T12:24:04+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3123,16 +3007,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.22", + "version": "9.5.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e329ac6e8744f461518272612a479fde958752fe" + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e329ac6e8744f461518272612a479fde958752fe", - "reference": "e329ac6e8744f461518272612a479fde958752fe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", "shasum": "" }, "require": { @@ -3147,7 +3031,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -3162,12 +3045,9 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.1", "sebastian/version": "^3.0.2" }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -3209,7 +3089,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.22" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" }, "funding": [ { @@ -3221,7 +3101,7 @@ "type": "github" } ], - "time": "2022-08-20T08:25:46+00:00" + "time": "2022-08-30T07:42:16+00:00" }, { "name": "psr/cache", @@ -4278,16 +4158,16 @@ }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb44e1cc6e557418387ad815780360057e40753e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb44e1cc6e557418387ad815780360057e40753e", + "reference": "fb44e1cc6e557418387ad815780360057e40753e", "shasum": "" }, "require": { @@ -4299,7 +4179,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -4322,7 +4202,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.1.0" }, "funding": [ { @@ -4330,7 +4210,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2022-08-29T06:55:37+00:00" }, { "name": "sebastian/version", @@ -4387,28 +4267,29 @@ }, { "name": "sirbrillig/phpcs-variable-analysis", - "version": "v2.11.3", + "version": "v2.11.7", "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "c921498b474212fe4552928bbeb68d70250ce5e8" + "reference": "ad2b0b57803a48bb3495777bee2a9a13c8e9da53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/c921498b474212fe4552928bbeb68d70250ce5e8", - "reference": "c921498b474212fe4552928bbeb68d70250ce5e8", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/ad2b0b57803a48bb3495777bee2a9a13c8e9da53", + "reference": "ad2b0b57803a48bb3495777bee2a9a13c8e9da53", "shasum": "" }, "require": { "php": ">=5.4.0", - "squizlabs/php_codesniffer": "^3.5" + "squizlabs/php_codesniffer": "^3.5.6" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "limedeck/phpunit-detailed-printer": "^3.1 || ^4.0 || ^5.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^5.0 || ^6.5 || ^7.0 || ^8.0", - "sirbrillig/phpcs-import-detection": "^1.1" + "phpcsstandards/phpcsdevcs": "^1.1", + "phpstan/phpstan": "^1.7", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0", + "sirbrillig/phpcs-import-detection": "^1.1", + "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0@beta" }, "type": "phpcodesniffer-standard", "autoload": { @@ -4436,20 +4317,20 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2022-02-21T17:01:13+00:00" + "time": "2022-08-16T22:19:00+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.2", + "version": "3.7.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", "shasum": "" }, "require": { @@ -4492,7 +4373,7 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-12-12T21:44:58+00:00" + "time": "2022-06-18T07:21:10+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4563,16 +4444,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.9", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c116cda1f51c678782768dce89a45f13c949455d" + "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c116cda1f51c678782768dce89a45f13c949455d", - "reference": "c116cda1f51c678782768dce89a45f13c949455d", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/f75d17cb4769eb38cd5fccbda95cd80a054d35c8", + "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8", "shasum": "" }, "require": { @@ -4614,7 +4495,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.9" + "source": "https://github.com/symfony/error-handler/tree/v5.4.11" }, "funding": [ { @@ -4630,7 +4511,7 @@ "type": "tidelift" } ], - "time": "2022-05-21T13:57:48+00:00" + "time": "2022-07-29T07:37:50+00:00" }, { "name": "symfony/event-dispatcher", @@ -4798,16 +4679,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.8", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9" + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9", + "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", "shasum": "" }, "require": { @@ -4841,7 +4722,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.8" + "source": "https://github.com/symfony/finder/tree/v5.4.11" }, "funding": [ { @@ -4857,20 +4738,20 @@ "type": "tidelift" } ], - "time": "2022-04-15T08:07:45+00:00" + "time": "2022-07-29T07:37:50+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.10", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e" + "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", - "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f4bfe9611b113b15d98a43da68ec9b5a00d56791", + "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791", "shasum": "" }, "require": { @@ -4882,8 +4763,11 @@ "require-dev": { "predis/predis": "~1.0", "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -4914,7 +4798,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.10" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.12" }, "funding": [ { @@ -4930,20 +4814,20 @@ "type": "tidelift" } ], - "time": "2022-06-19T13:13:40+00:00" + "time": "2022-08-19T07:33:17+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.10", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "255ae3b0a488d78fbb34da23d3e0c059874b5948" + "reference": "37f660fa3bcd78fe4893ce23ebe934618ec099be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/255ae3b0a488d78fbb34da23d3e0c059874b5948", - "reference": "255ae3b0a488d78fbb34da23d3e0c059874b5948", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/37f660fa3bcd78fe4893ce23ebe934618ec099be", + "reference": "37f660fa3bcd78fe4893ce23ebe934618ec099be", "shasum": "" }, "require": { @@ -5026,7 +4910,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.10" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.12" }, "funding": [ { @@ -5042,20 +4926,20 @@ "type": "tidelift" } ], - "time": "2022-06-26T16:57:59+00:00" + "time": "2022-08-26T14:40:40+00:00" }, { "name": "symfony/mime", - "version": "v5.4.10", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc" + "reference": "03876e9c5a36f5b45e7d9a381edda5421eff8a90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/02265e1e5111c3cd7480387af25e82378b7ab9cc", - "reference": "02265e1e5111c3cd7480387af25e82378b7ab9cc", + "url": "https://api.github.com/repos/symfony/mime/zipball/03876e9c5a36f5b45e7d9a381edda5421eff8a90", + "reference": "03876e9c5a36f5b45e7d9a381edda5421eff8a90", "shasum": "" }, "require": { @@ -5109,7 +4993,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.10" + "source": "https://github.com/symfony/mime/tree/v5.4.12" }, "funding": [ { @@ -5125,7 +5009,7 @@ "type": "tidelift" } ], - "time": "2022-06-09T12:22:40+00:00" + "time": "2022-08-19T14:24:03+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5703,16 +5587,16 @@ }, { "name": "symfony/routing", - "version": "v5.4.8", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e07817bb6244ea33ef5ad31abc4a9288bef3f2f7" + "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e07817bb6244ea33ef5ad31abc4a9288bef3f2f7", - "reference": "e07817bb6244ea33ef5ad31abc4a9288bef3f2f7", + "url": "https://api.github.com/repos/symfony/routing/zipball/3e01ccd9b2a3a4167ba2b3c53612762300300226", + "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226", "shasum": "" }, "require": { @@ -5773,7 +5657,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.8" + "source": "https://github.com/symfony/routing/tree/v5.4.11" }, "funding": [ { @@ -5789,20 +5673,20 @@ "type": "tidelift" } ], - "time": "2022-04-18T21:45:37+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/translation", - "version": "v5.4.9", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "1639abc1177d26bcd4320e535e664cef067ab0ca" + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/1639abc1177d26bcd4320e535e664cef067ab0ca", - "reference": "1639abc1177d26bcd4320e535e664cef067ab0ca", + "url": "https://api.github.com/repos/symfony/translation/zipball/42ecc77eb4f229ce2df702a648ec93b8478d76ae", + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae", "shasum": "" }, "require": { @@ -5870,7 +5754,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.9" + "source": "https://github.com/symfony/translation/tree/v5.4.12" }, "funding": [ { @@ -5886,7 +5770,7 @@ "type": "tidelift" } ], - "time": "2022-05-06T12:33:37+00:00" + "time": "2022-08-02T15:52:22+00:00" }, { "name": "symfony/translation-contracts", @@ -5968,16 +5852,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.9", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "af52239a330fafd192c773795520dc2dd62b5657" + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/af52239a330fafd192c773795520dc2dd62b5657", - "reference": "af52239a330fafd192c773795520dc2dd62b5657", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", "shasum": "" }, "require": { @@ -6037,7 +5921,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.9" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" }, "funding": [ { @@ -6053,7 +5937,7 @@ "type": "tidelift" } ], - "time": "2022-05-21T10:24:18+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "theseer/tokenizer", @@ -6179,64 +6063,6 @@ ], "time": "2022-01-24T18:55:24+00:00" }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - }, { "name": "wp-coding-standards/wpcs", "version": "2.3.0", From 79f7cc895045966d0c08775b84b445b11cbe6ae3 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 31 Aug 2022 22:06:05 -0400 Subject: [PATCH 2/4] Setting up 2.2.0 --- CHANGELOG.md | 4 ++++ ai-logger.php | 2 +- readme.txt | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e839161a..ecb7788e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ CHANGELOG](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +## 2.2.0 + +- Dependency bumps. + ## 2.1.0 ### Added diff --git a/ai-logger.php b/ai-logger.php index cc1aaf18..50839ae3 100644 --- a/ai-logger.php +++ b/ai-logger.php @@ -3,7 +3,7 @@ * Plugin Name: AI Logger * Plugin URI: https://github.com/alleyinteractive/logger * Description: A Monolog-based logging tool for WordPress. Supports storing log message in a custom post type or in individual posts and terms. - * Version: 2.1.3 + * Version: 2.2.0 * Author: Alley Interactive, Jared Cobb * Author URI: https://alley.co/ * Requires at least: 5.4 diff --git a/readme.txt b/readme.txt index 618a2b44..1f66b1a7 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: alleyinteractive, jaredcobb Requires at least: 5.4 Tested up to: 5.4 Requires PHP: 7.4 -Stable tag: 2.1.3 +Stable tag: 2.2.0 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -25,6 +25,10 @@ error. == Changelog == += 2.2.0 = + +- Dependency updates. + = 2.1.0 = ### Added From ce4cb4ab278219b4387698a271e4d8ea8b30b9f5 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 31 Aug 2022 22:28:01 -0400 Subject: [PATCH 3/4] Adding some helpers --- ai-logger.php | 40 +++++++++++++++++++ composer.json | 5 ++- inc/class-ai-logger.php | 63 +++++++++++++++++++++++------- inc/class-cli.php | 2 +- inc/handler/class-meta-handler.php | 6 +-- phpcs.xml | 7 +--- tests/test-handlers.php | 6 +-- tests/test-logger.php | 4 +- 8 files changed, 104 insertions(+), 29 deletions(-) diff --git a/ai-logger.php b/ai-logger.php index 50839ae3..fa00517c 100644 --- a/ai-logger.php +++ b/ai-logger.php @@ -16,6 +16,8 @@ * @author jaredcobb */ +use Monolog\Logger; + if ( ! defined( 'ABSPATH' ) ) { exit; } @@ -51,3 +53,41 @@ function() { function ai_logger(): \AI_Logger\AI_Logger { return \AI_Logger\AI_Logger::instance(); } + +/** + * Create a Query Monitor Logger instance. + * + * @param string $level The log level to use. + * @return \AI_Logger\AI_Logger + */ +function ai_logger_to_qm( string $level = Logger::DEBUG ): \AI_Logger\AI_Logger { + return ai_logger()->with_handlers( + [ + new \AI_Logger\Handler\Query_Monitor_Handler( $level ), + ] + ); +} + +/** + * Create a post logger instance. + * + * @param int $post_id Post ID. + * @param string $meta_key Meta key to log to. + * @param string $level The log level to use. + * @return \AI_Logger\AI_Logger + */ +function ai_logger_to_post( int $post_id, string $meta_key = 'log', string $level = Logger::DEBUG ): \AI_Logger\AI_Logger { + return ai_logger()->to_post( $meta_key, $post_id, $level ); +} + +/** + * Create a term logger instance. + * + * @param int $term_id Term ID. + * @param string $meta_key Meta key to log to. + * @param string $level The log level to use. + * @return \AI_Logger\AI_Logger + */ +function ai_logger_to_term( int $term_id, string $meta_key = 'log', string $level = Logger::DEBUG ): \AI_Logger\AI_Logger { + return ai_logger()->to_term( $meta_key, $term_id, $level ); +} diff --git a/composer.json b/composer.json index c45f422d..8435f697 100644 --- a/composer.json +++ b/composer.json @@ -44,6 +44,9 @@ "phpcbf": "phpcbf --standard=./phpcs.xml .", "phpcs": "phpcs --standard=./phpcs.xml .", "phpunit": "phpunit", - "test": "@phpunit" + "test": [ + "@phpcs", + "@phpunit" + ] } } diff --git a/inc/class-ai-logger.php b/inc/class-ai-logger.php index f4b1e659..aed0deca 100644 --- a/inc/class-ai-logger.php +++ b/inc/class-ai-logger.php @@ -12,6 +12,8 @@ /** * Main class responsible for defining the logger functionality + * + * @mixin \Monolog\Logger */ class AI_Logger implements LoggerInterface { /** @@ -58,9 +60,31 @@ protected function __construct() { \add_action( 'init', [ AI_Logger_Garbage_Collector::class, 'add_hooks' ] ); } + /** + * Retrieve the logger instance. + * + * @return Logger + */ + public function logger(): Logger { + return $this->logger; + } + + /** + * Retrieve a logger instance with specific handlers attached. + * + * @param \Monolog\Handler\Handler[] $handlers Handlers to attach to the logger. + * @return static + */ + public function with_handlers( array $handlers ) { + $logger = clone $this; + $logger->logger->setHandlers( $handlers ); + return $logger; + } + /** * Getter for the Logger instance. * + * @deprecated Renamed to {@see AI_Logger::logger()} * @return Logger */ public function get_logger(): Logger { @@ -129,15 +153,15 @@ public function insert_legacy_log( $key, $message, $args = [] ) { * Create a logger for logging to a specific post. * * @param string $key Meta key to log to. - * @param int $object_id Post ID. + * @param int $post_id Post ID. * @param int|string $level The minimum logging level at which this handler will be triggered. - * @return LoggerInterface + * @return static */ - public function to_post( string $key, int $object_id, $level = Logger::DEBUG ): LoggerInterface { - return new Logger( - 'Post Logger', - [ new Handler\Post_Meta_Handler( $level, true, $object_id, $key ) ], - $this->get_processors() + public function to_post( string $key, int $post_id, $level = Logger::DEBUG ) { + return $this->with_handlers( + [ + new Handler\Post_Meta_Handler( $post_id, $key, $level, true ), + ] ); } @@ -145,15 +169,15 @@ public function to_post( string $key, int $object_id, $level = Logger::DEBUG ): * Create a logger for logging to a specific term. * * @param string $key Meta key to log to. - * @param int $object_id Term object. + * @param int $term_id Term object. * @param int|string $level The minimum logging level at which this handler will be triggered. - * @return LoggerInterface + * @return static */ - public function to_term( string $key, int $object_id, $level = Logger::DEBUG ): LoggerInterface { - return new Logger( - 'Term Logger', - [ new Handler\Term_Meta_Handler( $level, true, $object_id, $key ) ], - $this->get_processors() + public function to_term( string $key, int $term_id, $level = Logger::DEBUG ) { + return $this->with_handlers( + [ + new Handler\Term_Meta_Handler( $term_id, $key, $level, true ), + ] ); } @@ -275,4 +299,15 @@ public function debug( $message, array $context = [] ) { public function log( $level, $message, array $context = [] ) { $this->logger->log( $level, $message, $context ); } + + /** + * Forward any calls to Monolog. + * + * @param string $name Method name. + * @param array $arguments Method arguments. + * @return mixed + */ + public function __call( string $name, $arguments ) { + return $this->logger->$name( ...$arguments ); + } } diff --git a/inc/class-cli.php b/inc/class-cli.php index 09e0cc76..93e621c8 100644 --- a/inc/class-cli.php +++ b/inc/class-cli.php @@ -156,7 +156,7 @@ public function generate_for_blog( $args, $assoc_args ) { ] ); - $logger = AI_Logger::instance()->get_logger(); + $logger = AI_Logger::instance()->logger(); $levels = [ LogLevel::EMERGENCY, diff --git a/inc/handler/class-meta-handler.php b/inc/handler/class-meta-handler.php index fda2f6a4..7dbd9465 100644 --- a/inc/handler/class-meta-handler.php +++ b/inc/handler/class-meta-handler.php @@ -51,12 +51,12 @@ abstract class Meta_Handler extends AbstractProcessingHandler implements Handler /** * Constructor. * - * @param int|string $level The minimum logging level at which this handler will be triggered. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not. * @param int $object_id Object ID to use. * @param string $log_key Meta key to use, defaults to 'log'. + * @param int|string $level The minimum logging level at which this handler will be triggered. + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not. */ - public function __construct( $level = Logger::DEBUG, bool $bubble = true, int $object_id, string $log_key = 'log' ) { + public function __construct( int $object_id, string $log_key = 'log', string $level = Logger::DEBUG, bool $bubble = true ) { parent::__construct( $level, $bubble ); $this->object_id = $object_id; diff --git a/phpcs.xml b/phpcs.xml index 3681a084..52015a0d 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -13,6 +13,7 @@ + @@ -20,14 +21,10 @@ tests/ - - - - - + diff --git a/tests/test-handlers.php b/tests/test-handlers.php index f251351d..61c6ae7a 100644 --- a/tests/test-handlers.php +++ b/tests/test-handlers.php @@ -40,7 +40,7 @@ public function test_post_handler() { $this->assertEmpty( get_post_meta( $post_id, 'test_key', false ), 'Log should be empty.' ); // Write the log. - $post_logger = new Logger( 'Unit Test', [ new Post_Meta_Handler( Logger::DEBUG, true, $post_id, 'test_key' ) ] ); + $post_logger = new Logger( 'Unit Test', [ new Post_Meta_Handler( $post_id, 'test_key', Logger::DEBUG, true ) ] ); $post_logger->info( 'Test message' ); do_action( 'shutdown' ); @@ -59,7 +59,7 @@ public function test_switch_site_writing() { $this->assertEmpty( get_post_meta( $post_id, 'test_key', false ), 'Log should be empty.' ); // Write the log. - $post_logger = new Logger( 'Unit Test', [ new Post_Meta_Handler( Logger::DEBUG, true, $post_id, 'test_key' ) ] ); + $post_logger = new Logger( 'Unit Test', [ new Post_Meta_Handler( $post_id, 'test_key', Logger::DEBUG, true ) ] ); $post_logger->info( 'Test message' ); $new_blog_id = $this->factory->blog->create(); @@ -97,7 +97,7 @@ public function test_term_handler() { $this->assertEmpty( get_term_meta( $term_id, 'test_key', false ), 'Log should be empty.' ); // Write the log. - $post_logger = new Logger( 'Unit Test', [ new Term_Meta_Handler( Logger::DEBUG, true, $term_id, 'test_key' ) ] ); + $post_logger = new Logger( 'Unit Test', [ new Term_Meta_Handler( $term_id, 'test_key', Logger::DEBUG, true ) ] ); $post_logger->info( 'Test message' ); do_action( 'shutdown' ); diff --git a/tests/test-logger.php b/tests/test-logger.php index 522dfb38..24ea4a2d 100644 --- a/tests/test-logger.php +++ b/tests/test-logger.php @@ -36,7 +36,7 @@ public function test_to_term() { public function test_logger_pass_through() { $logger = AI_Logger::instance(); $handler = new TestHandler(); - $logger->get_logger()->setHandlers( [ $handler ] ); + $logger->logger()->setHandlers( [ $handler ] ); $logger->alert( 'A alert message.' ); $this->assertTrue( $handler->hasAlert( [ 'message' => 'A alert message.' ] ) ); @@ -78,7 +78,7 @@ function() { $instance = Non_Static_Logger::instance(); $this->assertTrue( $_SERVER['__filter_invoked'] ); - $this->assertInstanceOf( NullHandler::class, $instance->get_logger()->getHandlers()[0] ); + $this->assertInstanceOf( NullHandler::class, $instance->logger()->getHandlers()[0] ); } } From 3d9346fba679f966aecd82ba6b136472f106b226 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 31 Aug 2022 22:34:13 -0400 Subject: [PATCH 4/4] Adding helper methods and docs, readme format --- README.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9eed0b14..9d60039a 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,11 @@ Suite](https://github.com/alleyinteractive/logger/workflows/Testing%20Suite/badg Providing a WordPress integration with Monolog, allowing site-wide and post and term specific logging. -## Documentation - -See the [wiki](https://github.com/alleyinteractive/logger/wiki). +Screen Shot 2020-05-14 at 4 13 47 PM -```php -ai_logger()->info( 'Log message...' ); +## Documentation -\AI_Logger\AI_Logger::info( 'Another format for logging.' ); -``` +See the [wiki](https://github.com/alleyinteractive/logger/wiki) for complete information and more examples. ## Installation @@ -27,3 +23,55 @@ composer install You can use it as a submodule in your project by loading the `main-built` branch. + + +## Usage + +AI Logger is a complete interface to Monolog with some nice WordPress handlers built in. + +```php +// Log site-wide to the ai_log post type. +ai_logger()->info( 'Log message...' ); + +\AI_Logger\AI_Logger::info( 'Another format for logging.' ); +``` + +### Logging to a Specific Post + +Logs will be appended to a post's meta for review. + +```php +ai_logger_to_post( $post_id, 'meta-key' )->info( 'This will log to the for a specific post.' ); +``` + +### Logging to a Specific Term + +Logs will be appended to a term's meta for review. + +```php +ai_logger_to_term( $term_id, 'meta-key' )->info( 'This will log to the for a specific term.' ); +``` + +### Logging to Query Monitor + +```php +ai_logger_to_qm()->info( 'This will show up in Query Monitor!' ); +``` + +## Changelog + +Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed +recently. + +## Maintainers + +This project is actively maintained by [Alley +Interactive](https://github.com/alleyinteractive). Like what you see? [Come work +with us](https://alley.co/careers/). + +![Alley logo](https://avatars.githubusercontent.com/u/1733454?s=200&v=4) + +## License + +This software is released under the terms of the GNU General Public License +version 2 or any later version.