diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a839255 --- /dev/null +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..0423d3f --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,51 @@ +name: PHP Composer + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ 8.0, 7.4, 7.3 ] + stability: [ prefer-lowest, prefer-stable ] + + name: PHP ${{ matrix.php }} - ${{ matrix.stability }} + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8781f1e..e318d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 2.2.0 + +- Update plugin dependencies (minimum required PHP version 7.3) + +# 2.1.0 + +- Fix Author parsing for Atom/RSS feeds. + # 2.0.0 - BC: The content of an Item will not be stripped from HTML tags (see Events). diff --git a/README.md b/README.md index c7ce256..77c9b73 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,20 @@ -# Vdlp.RssFetcher October CMS plugin - -Fetches RSS/Atom feeds to put on your website. It can be automated using a cronjob or triggered manually. +

+ +

Vdlp.RssFetcher

+

+ +

+ Fetches RSS/Atom feeds to put on your website. It can be automated using a cronjob or triggered manually. +

+ +

+ + + + + + +

## Installation diff --git a/composer.json b/composer.json index 1dd4799..0ad9416 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,9 @@ } ], "require": { - "php": ">=7.1", - "laminas/laminas-feed": "^2.9", - "laminas/laminas-http": "^2.7" + "php": "^7.3||^8.0", + "laminas/laminas-feed": "^2.14", + "laminas/laminas-http": "^2.14", + "composer/installers": "^1.0" } } diff --git a/updates/20180718_0001_create_sources_table.php b/updates/20180718_0001_create_sources_table.php index 5ebb974..7b36d66 100644 --- a/updates/20180718_0001_create_sources_table.php +++ b/updates/20180718_0001_create_sources_table.php @@ -8,16 +8,11 @@ use October\Rain\Database\Updates\Migration; use Schema; -/** @noinspection AutoloadingIssuesInspection */ - class CreateSourcesTable extends Migration { - /** - * Up - */ public function up(): void { - Schema::create('vdlp_rssfetcher_sources', function (Blueprint $table) { + Schema::create('vdlp_rssfetcher_sources', static function (Blueprint $table) { $table->engine = 'InnoDB'; $table->increments('id'); $table->string('name', 40)->nullable(); @@ -30,9 +25,6 @@ public function up(): void }); } - /** - * Down - */ public function down(): void { Schema::dropIfExists('vdlp_rssfetcher_sources'); diff --git a/updates/20180718_0002_create_items_table.php b/updates/20180718_0002_create_items_table.php index 97e6bbf..dd7aae6 100644 --- a/updates/20180718_0002_create_items_table.php +++ b/updates/20180718_0002_create_items_table.php @@ -8,16 +8,11 @@ use October\Rain\Database\Updates\Migration; use Schema; -/** @noinspection AutoloadingIssuesInspection */ - class CreateItemsTable extends Migration { - /** - * Up - */ public function up(): void { - Schema::create('vdlp_rssfetcher_items', function (Blueprint $table) { + Schema::create('vdlp_rssfetcher_items', static function (Blueprint $table) { $table->engine = 'InnoDB'; $table->increments('id'); $table->unsignedInteger('source_id'); @@ -43,9 +38,6 @@ public function up(): void }); } - /** - * Down - */ public function down(): void { Schema::dropIfExists('vdlp_rssfetcher_items'); diff --git a/updates/20180718_0003_seed_feeds_table.php b/updates/20180718_0003_seed_feeds_table.php index 3037c64..311b802 100644 --- a/updates/20180718_0003_seed_feeds_table.php +++ b/updates/20180718_0003_seed_feeds_table.php @@ -8,16 +8,11 @@ use October\Rain\Database\Updates\Migration; use Schema; -/** @noinspection AutoloadingIssuesInspection */ - class CreateFeedsTable extends Migration { - /** - * Up - */ public function up(): void { - Schema::create('vdlp_rssfetcher_feeds', function (Blueprint $table) { + Schema::create('vdlp_rssfetcher_feeds', static function (Blueprint $table) { $table->engine = 'InnoDB'; $table->increments('id'); $table->enum('type', ['rss', 'atom']); @@ -29,7 +24,7 @@ public function up(): void $table->timestamps(); }); - Schema::create('vdlp_rssfetcher_feeds_sources', function (Blueprint $table) { + Schema::create('vdlp_rssfetcher_feeds_sources', static function (Blueprint $table) { $table->engine = 'InnoDB'; $table->unsignedInteger('feed_id'); $table->unsignedInteger('source_id'); @@ -44,9 +39,6 @@ public function up(): void }); } - /** - * Down - */ public function down(): void { Schema::dropIfExists('vdlp_rssfetcher_feeds_sources'); diff --git a/updates/20180718_0004_seed_sources_table.php b/updates/20180718_0004_seed_sources_table.php index e05e7e8..47cd661 100644 --- a/updates/20180718_0004_seed_sources_table.php +++ b/updates/20180718_0004_seed_sources_table.php @@ -7,13 +7,8 @@ use October\Rain\Database\Updates\Seeder; use Vdlp\RssFetcher\Models\Source; -/** @noinspection AutoloadingIssuesInspection */ - class SeedAllTables extends Seeder { - /** - * {@inheritDoc} - */ public function run(): void { Source::create([ diff --git a/updates/20181012_0005_move_publish_new_items_to_sources_table.php b/updates/20181012_0005_move_publish_new_items_to_sources_table.php index e3a1ac5..ab1d872 100644 --- a/updates/20181012_0005_move_publish_new_items_to_sources_table.php +++ b/updates/20181012_0005_move_publish_new_items_to_sources_table.php @@ -8,13 +8,8 @@ use October\Rain\Database\Updates\Migration; use Schema; -/** @noinspection AutoloadingIssuesInspection */ - class MovePublishNewItemsToSourcesTable extends Migration { - /** - * Up - */ public function up(): void { Schema::table('vdlp_rssfetcher_items', function (Blueprint $table) { @@ -26,12 +21,8 @@ public function up(): void ->after('is_enabled') ->default(true); }); - } - /** - * Down - */ public function down(): void { Schema::table('vdlp_rssfetcher_sources', function (Blueprint $table) { diff --git a/updates/20200206_0006_remove_unique_constraint_from_items.php b/updates/20200206_0006_remove_unique_constraint_from_items.php index ed513de..ca1fd35 100644 --- a/updates/20200206_0006_remove_unique_constraint_from_items.php +++ b/updates/20200206_0006_remove_unique_constraint_from_items.php @@ -8,13 +8,8 @@ use October\Rain\Database\Updates\Migration; use Schema; -/** @noinspection AutoloadingIssuesInspection */ - class RemoveUniqueConstraintFromItems extends Migration { - /** - * Up - */ public function up(): void { Schema::table('vdlp_rssfetcher_items', static function (Blueprint $table) { @@ -22,9 +17,6 @@ public function up(): void }); } - /** - * Down - */ public function down(): void { Schema::table('vdlp_rssfetcher_sources', static function (Blueprint $table) { diff --git a/updates/version.yaml b/updates/version.yaml index b824d3d..128a72e 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -18,3 +18,4 @@ 2.0.0: - "Replace Zend Framework with Laminas and added events" 2.1.0: "Fix Author parsing for Atom/RSS feeds" +2.2.0: Update plugin dependencies (minimum required PHP version 7.3)