Skip to content

Commit

Permalink
Merge branch 'main' into implicit-model-binding
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored Dec 15, 2021
2 parents 2207cf8 + 8a6fc58 commit 1b0f879
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 15 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.0]
php: [8.1, 8.0]
laravel: [8.76.1]
dependency-version: [prefer-lowest, prefer-stable]

Expand All @@ -18,17 +18,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Determine composer cache directory
id: determine-composer-cache-directory
run: 'echo "::set-output name=directory::$(composer config cache-dir)"'

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Update Changelog"

on:
release:
types: [released]

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.name }}
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to `laravel-sluggable` will be documented in this file

## 3.1.1 - 2021-12-13

## What's Changed

- Migrate to PHP-CS-Fixer 3.x by @shuvroroy in https://github.com/spatie/laravel-sluggable/pull/203
- Adds test case for replicate method by @eduarguz in https://github.com/spatie/laravel-sluggable/pull/212
- Fix Deprecation: currentSlug is null by @phh in https://github.com/spatie/laravel-sluggable/pull/218

## New Contributors

- @shuvroroy made their first contribution in https://github.com/spatie/laravel-sluggable/pull/203
- @eduarguz made their first contribution in https://github.com/spatie/laravel-sluggable/pull/212
- @phh made their first contribution in https://github.com/spatie/laravel-sluggable/pull/218

**Full Changelog**: https://github.com/spatie/laravel-sluggable/compare/3.1.0...3.1.1

## 3.1.0 - 2021-06-04

- add extra scope callback option (#201)
Expand Down Expand Up @@ -63,9 +79,11 @@ All notable changes to `laravel-sluggable` will be documented in this file
- drop support for anything below PHP 7.4 and Laravel 6

## 2.2.1 - 2019-09-16

- Changed: Updated Laravel 6 compatibility for future versions

## 2.2.0 - 2019-09-04

- Drop support for PHP 7.1
- Add support for Laravel 6.0

Expand Down Expand Up @@ -98,36 +116,47 @@ All notable changes to `laravel-sluggable` will be documented in this file
- Support Laravel 5.6

## 2.1.1 - 2017-01-28

- improve compatibility with Lumen

## 2.1.0 - 2017-09-13

- add `usingLanguage`

## 2.0.0 - 2017-08-31

- add support for Laravel 5.5, drop support for all older versions of the framework

## 1.5.2 - 2018-05-08

- make compatible with PHP 7.2

## 1.5.1 - 2017-08-19

- fix bugs when using a custom separator

## 1.5.0 - 2017-04-13

- add `usingSeparator()`

## 1.4.1 - 2017-04-11
- ignore global scopes when determining a unique slug

- ignore global scopes when determining a unique slug

## 1.4.0 - 2017-01-24

- add support for Laravel 5.4

## 1.3.0 - 2016-11-14

- add `doNotGenerateSlugsOnCreate` and `doNotGenerateSlugsOnUpdate`

## 1.2.0 - 2016-06-13

- Added the ability to generate slugs from a callable

## 1.1.0 - 2016-01-24

- Allow custom slugs

## 1.0.2 - 2016-01-12
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"illuminate/support": "^8.0"
},
"require-dev": {
"orchestra/testbench": "^5.16|^6.11",
"orchestra/testbench": "^6.23",
"spatie/laravel-translatable": "^4.6",
"friendsofphp/php-cs-fixer": "^2.18",
"phpunit/phpunit": "^9.5.1"
Expand Down
2 changes: 1 addition & 1 deletion src/HasTranslatableSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function generateNonUniqueSlug(): string

$slugGeneratedFromCallable = is_callable($this->slugOptions->generateSlugFrom);
$hasCustomSlug = $this->hasCustomSlugBeenUsed() && ! empty($slug);
$hasNonChangedCustomSlug = ! $slugGeneratedFromCallable && ! $this->slugIsBasedOnTitle() && ! empty($slug);
$hasNonChangedCustomSlug = ! $slugGeneratedFromCallable && ! empty($slug) && ! $this->slugIsBasedOnTitle();

if ($hasCustomSlug || $hasNonChangedCustomSlug) {
$slugString = $slug;
Expand Down

0 comments on commit 1b0f879

Please sign in to comment.