Skip to content

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
rawilk authored and actions-user committed Sep 29, 2023
1 parent 2f2bcc4 commit 7dc02e6
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 50 deletions.
52 changes: 26 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,93 +6,93 @@ All notable changes to `laravel-settings` will be documented in this file

### What's Changed

- Bump creyD/prettier_action from 4.2 to 4.3 by @dependabot in https://github.com/rawilk/laravel-settings/pull/15
- Bump aglipanci/laravel-pint-action from 2.1.0 to 2.2.0 by @dependabot in https://github.com/rawilk/laravel-settings/pull/17
- Add Laravel 10.x Support by @rawilk in https://github.com/rawilk/laravel-settings/pull/18
- Add Php 8.2 compatibility by @rawilk in https://github.com/rawilk/laravel-settings/pull/19
- Bump creyD/prettier_action from 4.2 to 4.3 by @dependabot in https://github.com/rawilk/laravel-settings/pull/15
- Bump aglipanci/laravel-pint-action from 2.1.0 to 2.2.0 by @dependabot in https://github.com/rawilk/laravel-settings/pull/17
- Add Laravel 10.x Support by @rawilk in https://github.com/rawilk/laravel-settings/pull/18
- Add Php 8.2 compatibility by @rawilk in https://github.com/rawilk/laravel-settings/pull/19

**Full Changelog**: https://github.com/rawilk/laravel-settings/compare/v2.2.1...v2.2.2

## v2.2.1 - 2023-02-07

### What's Changed

- Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/rawilk/laravel-settings/pull/13
- Bump aglipanci/laravel-pint-action from 1.0.0 to 2.1.0 by @dependabot in https://github.com/rawilk/laravel-settings/pull/10
- Improve internal handling of the Context object on Settings service class
- Prevent decryption errors when checking if a value should be persisted or not on `set()`
- Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/rawilk/laravel-settings/pull/13
- Bump aglipanci/laravel-pint-action from 1.0.0 to 2.1.0 by @dependabot in https://github.com/rawilk/laravel-settings/pull/10
- Improve internal handling of the Context object on Settings service class
- Prevent decryption errors when checking if a value should be persisted or not on `set()`

**Full Changelog**: https://github.com/rawilk/laravel-settings/compare/v2.2.0...v2.2.1

## v2.2.0 - 2022-12-07

### What's Changed

- Allow cache to be temporarily disabled (via `temporarilyDisableCache()`)
- Allow cache to be temporarily disabled (via `temporarilyDisableCache()`)

**Full Changelog**: https://github.com/rawilk/laravel-settings/compare/v2.1.1...v2.2.0

## v2.1.1 - 2022-12-06

### What's Changed

- Bump dependabot/fetch-metadata from 1.3.4 to 1.3.5 by @dependabot in https://github.com/rawilk/laravel-settings/pull/8
- Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/rawilk/laravel-settings/pull/9
- Prevent non-strings from being unserialized or decrypted
- Bump dependabot/fetch-metadata from 1.3.4 to 1.3.5 by @dependabot in https://github.com/rawilk/laravel-settings/pull/8
- Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/rawilk/laravel-settings/pull/9
- Prevent non-strings from being unserialized or decrypted

**Full Changelog**: https://github.com/rawilk/laravel-settings/compare/v2.1.0...v2.1.1

## v2.1.0 - 2022-11-01

### Added

- Feature: model settings by @rawilk in https://github.com/rawilk/laravel-settings/pull/7
- Feature: model settings by @rawilk in https://github.com/rawilk/laravel-settings/pull/7

### Changed

- Composer: Update doctrine/dbal requirement from ^2.12 to ^3.5 by @dependabot in https://github.com/rawilk/laravel-settings/pull/5
- Bump creyD/prettier_action from 3.0 to 4.2 by @dependabot in https://github.com/rawilk/laravel-settings/pull/6
- Drop official PHP 8.0 support
- Composer: Update doctrine/dbal requirement from ^2.12 to ^3.5 by @dependabot in https://github.com/rawilk/laravel-settings/pull/5
- Bump creyD/prettier_action from 3.0 to 4.2 by @dependabot in https://github.com/rawilk/laravel-settings/pull/6
- Drop official PHP 8.0 support

**Full Changelog**: https://github.com/rawilk/laravel-settings/compare/v2.0.1...v2.1.0

## 2.0.1 - 2022-02-23

### Updated

- Add support for Laravel 9.*
- Add support for PHP 8.1
- Add support for Laravel 9.\*
- Add support for PHP 8.1

## 2.0.0 - 2020-12-01

### Breaking Changes

- Drop support for Laravel v6 and v7
- Drop support for php 7
- Drop support for Laravel v6 and v7
- Drop support for php 7

### Updated

- Add support for php 8
- Update some of code base to use php 8 features
- Add support for php 8
- Update some of code base to use php 8 features

## 1.0.3 - 2020-10-26

### Fixed

- Fix bug with context being reset when saving ([#3](https://github.com/rawilk/laravel-settings/issues/3))
- Fix bug with context being reset when saving ([#3](https://github.com/rawilk/laravel-settings/issues/3))

## 1.0.2 - 2020-10-09

### Fixed

- Wrap decrypting values in a try/catch to help prevent decryption errors when caching is used - [#2](https://github.com/rawilk/laravel-settings/issues/2)
- Wrap decrypting values in a try/catch to help prevent decryption errors when caching is used - [#2](https://github.com/rawilk/laravel-settings/issues/2)

## 1.0.1 - 2020-09-09

### Added

- Add support for Laravel 8
- Add support for Laravel 8

## 1.0.0 - 2020-08-02

- initial release
- initial release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If you discover any security related issues, please email [email protected]

## Alternatives

- [spatie/laravel-settings](https://github.com/spatie/laravel-settings)
- [spatie/laravel-settings](https://github.com/spatie/laravel-settings)

## Disclaimer

Expand Down
24 changes: 12 additions & 12 deletions docs/advanced-usage/custom-generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,30 @@ use Illuminate\Support\Str;
class CustomKeyGenerator implements KeyGenerator
{
protected ContextSerializer $contextSerializer;

public function generate(string $key, Context $context = null): string
{
$key = strtoupper($key);

if ($context) {
$key .= $this->contextPrefix() . $this->serializer->serialize($context);
}
return $key;

return $key;
}

public function removeContextFromKey(string $key): string
{
return Str::before($key, $this->contextPrefix());
}

public function setContextSerializer(ContextSerializer $serializer): self
{
$this->serializer = $serializer;

return $this;
}
}

/**
* This prefix is how we will determine that a database record has a context when
* flushing/retrieving all settings from the setting drivers.
Expand Down Expand Up @@ -93,8 +93,8 @@ class CustomContextSerializer implements ContextSerializer
{
if (is_null($context)) {
return '';
}
}

return json_encode($context->toArray());
}
}
Expand Down Expand Up @@ -124,7 +124,7 @@ class CustomValueSerializer implements ValueSerializer
{
return json_encode($value);
}

public function unserialize(string $serialized): mixed
{
return json_decode($serialized, true);
Expand Down
4 changes: 2 additions & 2 deletions docs/api/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function get(string $key, $default = null)
```php
/**
* Retrieve all stored settings.
*
*
* @param array|string|null $keys Only return a subset of settings.
* @return \Illuminate\Support\Collection<int, object>
*/
Expand Down Expand Up @@ -123,7 +123,7 @@ public function flush($keys = null): void

```php
/**
* Get the correct cache key for a given setting.
* Get the correct cache key for a given setting.
*
* @param string $key
* @return string
Expand Down
2 changes: 1 addition & 1 deletion docs/basic-usage/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The collection of settings returned from this method will contain objects struct

> {tip} The `original_key` property is set by settings to reflect the key that is used in the database.
> {tip} If you'd like to retrieve all settings that do not have a context, you may provide a `false` value for a context: `settings()->context(false)->all()`
> {tip} If you'd like to retrieve all settings that do not have a context, you may provide a `false` value for a context: `settings()->context(false)->all()`
## Flushing settings

Expand Down
2 changes: 1 addition & 1 deletion docs/basic-usage/model-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ class User extends Model
If you are using soft-deletes on your model, you may need to disable this behavior as well, and manually flush the model's settings
when you force delete it.

> {note} This will only work when the `ReadableKeyGenerator` is used.
> {note} This will only work when the `ReadableKeyGenerator` is used.
For more information on the key generators, see [Custom Generators](/docs/laravel-settings/{version}/advanced-usage/custom-generators).
10 changes: 5 additions & 5 deletions docs/basic-usage/teams.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ By default, teams are disabled, however you can easily enable them by setting th
## Enabling the Teams Feature

> {info} These configuration changes must be made **before** running the migrations when first installing the package or when upgrading from v2.
>
>
> If you have already run the migrations and want to upgrade your implementation, you can add a migration and copy the contents of the `add_settings_team_field` migration from the package
> after you make the configuration changes below.
Expand All @@ -32,7 +32,7 @@ If you want to use a custom foreign key for teams, you can also set it in the co
## Working with Teams Settings

After implementing a solution for selecting a team on the authentication process (for example, setting the `team_id`
of the currently selected team on the **session:** `session(['team_id' => $team->id]);`), we can set the global `team_id`
of the currently selected team on the **session:** `session(['team_id' => $team->id]);`), we can set the global `team_id`
from anywhere, but we recommend setting it in a middleware.

Example Team Middleware:
Expand All @@ -47,17 +47,17 @@ class TeamMiddleware
public function handle($request, Closure $next)
{
if (auth()->check()) {
Settings::setTeamId(session('team_id'));
Settings::setTeamId(session('team_id'));
}

// Other custom ways to get the team id
/* if (! empty(auth('api')->user())) {
// `getTeamIdFromToken()` example of custom method for getting the set team_id
Settings::setTeamId(
auth('api')->user()->getTeamIdFromToken()
);
} */

return $next($request);
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ settings('foo');

## Alternatives

- [spatie/laravel-settings](https://github.com/spatie/laravel-settings)
- [spatie/laravel-settings](https://github.com/spatie/laravel-settings)

## Disclaimer

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sort: 2
## Version Matrix

| Laravel | Minimum Version | Maximum Version |
| ------- | --------------- |-----------------|
| ------- | --------------- | --------------- |
| 6.0 | 1.0.0 | 1.0.3 |
| 7.0 | 1.0.0 | 1.0.3 |
| 8.0 | 1.0.1 | 2.2.2 |
Expand Down

0 comments on commit 7dc02e6

Please sign in to comment.