mirror of
https://github.com/beste/clock.git
synced 2026-10-17 19:27:35 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7004b55fcd | ||
|
|
ebd491dc6e | ||
|
|
cf2cc16e66 | ||
|
|
6ee3f318f8 | ||
|
|
2ba952cc73 | ||
|
|
2861280adc | ||
|
|
a5e62affe0 | ||
|
|
5acec1192d | ||
|
|
fd2e55f899 | ||
|
|
24b2fc5716 | ||
|
|
04017e5bc2 | ||
|
|
b47e76adf3 | ||
|
|
4b16082f08 | ||
|
|
317ed729ce |
@@ -0,0 +1,15 @@
|
|||||||
|
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
commit-message:
|
||||||
|
include: "scope"
|
||||||
|
prefix: "github-actions"
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
labels:
|
||||||
|
- "dependency"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# https://probot.github.io/apps/settings/
|
||||||
|
_extends: beste/.github
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
name: "Dependabot auto-merge"
|
||||||
|
|
||||||
|
on: [pull_request_target] # yamllint disable-line rule:truthy
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: "write"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dependabot:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
if: "${{ github.actor == 'dependabot[bot]' }}"
|
||||||
|
steps:
|
||||||
|
- name: "Dependabot metadata"
|
||||||
|
id: "metadata"
|
||||||
|
uses: "dependabot/[email protected]"
|
||||||
|
with:
|
||||||
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
- name: "Enable auto-merge for Dependabot PRs"
|
||||||
|
if: "${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}"
|
||||||
|
run: "gh pr merge --auto --merge \"$PR_URL\""
|
||||||
|
env:
|
||||||
|
PR_URL: "${{github.event.pull_request.html_url}}"
|
||||||
|
GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
|
||||||
@@ -6,6 +6,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- '1.x'
|
- '1.x'
|
||||||
- '2.x'
|
- '2.x'
|
||||||
|
- '3.x'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
@@ -15,16 +16,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php:
|
php:
|
||||||
- "7.4"
|
|
||||||
- "8.0"
|
- "8.0"
|
||||||
- "8.1"
|
- "8.1"
|
||||||
dependencies:
|
- "8.2"
|
||||||
- "lowest"
|
|
||||||
- "highest"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
@@ -34,10 +32,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: "ramsey/composer-install@v1"
|
- uses: "ramsey/composer-install@v2"
|
||||||
with:
|
|
||||||
dependency-versions: "${{ matrix.dependencies }}"
|
|
||||||
composer-options: "${{ matrix.composer-options }}"
|
|
||||||
|
|
||||||
- name: Setup problem matchers for PHP
|
- name: Setup problem matchers for PHP
|
||||||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
|
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 3.0.0 - 2022-11-26
|
||||||
|
This release replaces `stella-maris/clock` with `psr/clock`.
|
||||||
|
|
||||||
|
## 2.3.1 - 2022-11-25
|
||||||
|
This release reverts the change to implement `psr/clock` directly, to not break dependents who rely on `stella-maris/clock`
|
||||||
|
|
||||||
|
## 2.3.0 - 2022-11-25
|
||||||
|
This release re-introduces support for PHP ^8.0 and implements the freshly released `psr/clock` (PSR-20) directly.
|
||||||
|
|
||||||
|
## 2.2.0 - 2022-11-04
|
||||||
|
This release drops support for PHP <8.1.
|
||||||
|
|
||||||
## 2.1.0 - 2022-04-22
|
## 2.1.0 - 2022-04-22
|
||||||
Adds the `WrappingClock` which allows using an object with a `now()` method returning a `DateTimeImmutable` object
|
Adds the `WrappingClock` which allows using an object with a `now()` method returning a `DateTimeImmutable` object
|
||||||
as a "real" clock.
|
as a "real" clock.
|
||||||
|
|||||||
+9
-9
@@ -11,17 +11,17 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "~7.4.0 || ~8.0.0 || ~8.1.0",
|
"php": "^8.0",
|
||||||
"stella-maris/clock": "^0.1.4"
|
"psr/clock": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/extension-installer": "^1.1",
|
"phpstan/extension-installer": "^1.2",
|
||||||
"phpstan/phpstan": "^1.0",
|
"phpstan/phpstan": "^1.9.1",
|
||||||
"phpstan/phpstan-phpunit": "^1.0",
|
"phpstan/phpstan-phpunit": "^1.2.2",
|
||||||
"phpstan/phpstan-strict-rules": "^1.0",
|
"phpstan/phpstan-strict-rules": "^1.4.4",
|
||||||
"phpunit/phpunit": "^9.5.10",
|
"phpunit/phpunit": "^9.5.26",
|
||||||
"psalm/plugin-phpunit": "^0.16.0",
|
"psalm/plugin-phpunit": "^0.16.1",
|
||||||
"vimeo/psalm": "^4.15"
|
"vimeo/psalm": "^4.29"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Beste;
|
namespace Beste;
|
||||||
|
|
||||||
use StellaMaris\Clock\ClockInterface;
|
use Psr\Clock\ClockInterface;
|
||||||
|
|
||||||
interface Clock extends ClockInterface
|
interface Clock extends ClockInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace Beste\Clock;
|
|||||||
use Beste\Clock;
|
use Beste\Clock;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use DateTimeZone;
|
use DateTimeZone;
|
||||||
use StellaMaris\Clock\ClockInterface;
|
use Psr\Clock\ClockInterface;
|
||||||
|
|
||||||
final class FrozenClock implements Clock
|
final class FrozenClock implements Clock
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Beste\Clock;
|
|||||||
|
|
||||||
use Beste\Clock;
|
use Beste\Clock;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use StellaMaris\Clock\ClockInterface;
|
use Psr\Clock\ClockInterface;
|
||||||
|
|
||||||
final class MinuteClock implements Clock
|
final class MinuteClock implements Clock
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Beste\Clock;
|
|||||||
|
|
||||||
use Beste\Clock;
|
use Beste\Clock;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use StellaMaris\Clock\ClockInterface;
|
use Psr\Clock\ClockInterface;
|
||||||
|
|
||||||
final class WrappingClock implements Clock
|
final class WrappingClock implements Clock
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace Beste\Clock\Tests;
|
|||||||
use Beste\Clock\FrozenClock;
|
use Beste\Clock\FrozenClock;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use StellaMaris\Clock\ClockInterface;
|
use Psr\Clock\ClockInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace Beste\Clock\Tests;
|
|||||||
use Beste\Clock\MinuteClock;
|
use Beste\Clock\MinuteClock;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use StellaMaris\Clock\ClockInterface;
|
use Psr\Clock\ClockInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
|||||||
Reference in New Issue
Block a user