Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
adrenth committed Sep 1, 2020
2 parents 091e62b + e86dd2d commit deb4f8b
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
37 changes: 37 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PHP Composer

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

# - name: Run test suite
# run: composer run-script test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
10 changes: 8 additions & 2 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Backend\Classes\FormTabs;
use Backend\Widgets\Form;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\Facades\Event;
use System\Classes\PluginBase;
use Vdlp\Redirect;
Expand Down Expand Up @@ -41,7 +42,6 @@ public function pluginDetails(): array
];
}


/** @noinspection PhpMissingParentCallCommonInspection */

/**
Expand All @@ -54,9 +54,15 @@ public function register()
ConditionParameter::class,
'table' => 'vdlp_redirectconditions_condition_parameters',
];

$redirect->bindEvent('model.afterSave', static function () use ($redirect) {
/** @var Dispatcher $dispatcher */
$dispatcher = resolve(Dispatcher::class);
$dispatcher->dispatch('vdlp.redirect.afterRedirectSave', ['redirect' => $redirect]);
});
});

Event::listen('vdlp.redirect.afterRedirectSave', function (Redirect\Models\Redirect $redirect) {
Event::listen('vdlp.redirect.afterRedirectSave', static function (Redirect\Models\Redirect $redirect) {
/** @var Redirect\Classes\Contracts\RedirectManagerInterface $manager */
$manager = resolve(Redirect\Classes\Contracts\RedirectManagerInterface::class);

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "vdlp/oc-redirectconditions-plugin",
"description": "Allows developers to create their own Redirect Conditions extension plugins for OctoberCMS.",
"description": "Allows developers to create their own Redirect Conditions extension plugins for October CMS.",
"type": "october-plugin",
"license": "GPL-2.0",
"license": "GPL-2.0-only",
"authors": [
{
"name": "Van der Let & Partners",
"email": "[email protected]"
}
],
"require": {
"php": "^7.1.3"
}
}
3 changes: 3 additions & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
- 20190201_0001_create_tables.php
1.0.1:
- Update plugin name and author
1.1.0:
- Add fix for deleted event (thanks to @NickolayCh)
- Minimal version of PHP required is 7.1

0 comments on commit deb4f8b

Please sign in to comment.