Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
adrenth committed Sep 1, 2020
2 parents 353ae72 + 26a06a3 commit dbf4122
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 15 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
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
# Vdlp.Hashids

Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers.
<p align="center">
<img height="60px" width="60px" src="https://plugins.vdlp.nl/octobercms/icons/Vdlp.Hashids.svg">
<h1 align="center">Vdlp.Hashids</h1>
</p>

<p align="center">
<em>Allows developers to use secure hashed ID's.</em>
</p>

<p align="center">
<img src="https://badgen.net/packagist/php/vdlp/oc-hashids-plugin">
<img src="https://badgen.net/packagist/license/vdlp/oc-hashids-plugin">
<img src="https://badgen.net/packagist/v/vdlp/oc-hashids-plugin/latest">
<img src="https://badgen.net/badge/cms/October%20CMS">
<img src="https://badgen.net/badge/type/plugin">
<img src="https://plugins.vdlp.nl/octobercms/badge/installations.php?plugin=vdlp-hashids">
</p>

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

It converts numbers like 347 into strings like "yr8", or array of numbers like [27, 986] into "3kTMd".

You can also decode those ids back. This is useful in bundling several parameters into one or simply using them as short UIDs.

## Requirements

* PHP 7.1 or higher
* Preferably one of the latest October CMS build
* PHP 7.2 or higher
* October CMS build 468 or higher

## Installation

Expand All @@ -28,7 +44,7 @@ Go to Settings > Updates & Plugins > Install plugins and search for 'Hashids'.
To configure this plugin execute the following command:

```
php artisan vendor:publish --provider="Vdlp\Hashids\ServiceProviders\HashidsServiceProvider" --tag="config"
php artisan vendor:publish --provider="Vdlp\Hashids\ServiceProvider" --tag="config"
```

This will create a `config/hashids.php` file in your app where you can modify the configuration.
Expand Down
6 changes: 0 additions & 6 deletions ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

class ServiceProvider extends BaseServiceProvider
{
/**
* @return void
*/
public function boot(): void
{
$this->publishes([
Expand All @@ -24,9 +21,6 @@ public function boot(): void
$this->mergeConfigFrom(__DIR__ . '/config.php', 'hashids');
}

/**
* @return void
*/
public function register(): void
{
$this->app->singleton(HashidsFactory::class, static function (): HashidsFactory {
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "vdlp/oc-hashids-plugin",
"description": "Allows developers to use secure hashed ID's in October CMS powered websites.",
"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",
"hashids/hashids": "^3.0"
"php": "^7.2",
"hashids/hashids": "^4.0"
},
"archive": {
"exclude": [
Expand Down
1 change: 1 addition & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
1.1.0:
- Code optimizations
- Moved service provider
2.0.0: Drop PHP 7.1 support

0 comments on commit dbf4122

Please sign in to comment.