Skip to content

Commit

Permalink
Merge branch 'main' into bug/better-exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfox authored Dec 2, 2023
2 parents a4d0bbd + c4dbf92 commit ff3ea2b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_pgsql
tools: composer:v2
coverage: pcov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
coverage: none

- name: Install composer dependencies
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,31 @@ on:
push:
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * *'

jobs:
test:
if: github.event_name != 'schedule' || github.repository == 'ylsideas/feature-flags'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1, 8.0]
php: [8.3, 8.2, 8.1]
laravel: [9.*, 10.*]
dependencies: [lowest, stable]
include:
- laravel: 9.*
testbench: ^7.0
- laravel: 10.*
testbench: ^8.0
- php: 8.3
dependencies: lowest
carbon: ^2.62.1
- php: 8.2
dependencies: lowest
carbon: ^2.62.1
exclude:
- laravel: 10.*
php: 8.0
- laravel: 10.*
os: windows-latest

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependencies }} - ${{ matrix.os }}

Expand All @@ -54,7 +55,7 @@ jobs:
--no-interaction --no-update
- name: Require Minimum Packages for version
if: ${{ matrix.php == '8.2' && matrix.dependencies == 'lowest' }}
if: ${{ (matrix.php == '8.2' || matrix.php == '8.3') && matrix.dependencies == 'lowest' }}
run: >
composer require
"nesbot/carbon:${{ matrix.carbon }}"
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

All notable changes to `feature-flags` will be documented in this file

## v2.4.2 - 2023-12-02

### What's Changed

* Fix maintenance mode by @peterfox in https://github.com/ylsideas/feature-flags/pull/62
* Fix a typo in the about command by @peterfox in https://github.com/ylsideas/feature-flags/pull/63

**Full Changelog**: https://github.com/ylsideas/feature-flags/compare/v2.4.1...v2.4.2

## v2.4.1 - 2023-02-09

### What's Changed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"illuminate/contracts": "10.*|^9.6"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/FeatureFlagsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected function aboutCommandInfo(): void
{
if (class_exists(AboutCommand::class)) {
AboutCommand::add('Feature Flags', [
'Pipeline' => fn () => implode(', Hello', config('features.pipeline')),
'Pipeline' => fn () => implode(', ', config('features.pipeline')),
]);
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/Support/MaintenanceRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class MaintenanceRepository implements Maintenance
{
public array $scenarios = [];

public ?MaintenanceScenario $foundScenario = null;
public MaintenanceScenario|null|false $foundScenario = false;
protected \Closure $uponActivation;
protected \Closure $uponDeactivation;

Expand Down Expand Up @@ -65,6 +65,10 @@ public function active(): bool

public function parameters(): ?array
{
if ($this->foundScenario === false) {
$this->findScenario();
}

return $this->foundScenario?->toArray();
}

Expand Down

0 comments on commit ff3ea2b

Please sign in to comment.