Implement forward compatible Clock-Interface

The stella-maris/clock package provides an interface based on the
currently proposed status of PSR20. Due to the inactivity of the PSR20 working
group this is a way to already provide interoperability while still
maintaining forward compatibility. When the current status of PSR20 will
be released at one point in time the stella-maris/clock package will
extend the PSR20 interface so that this package becomes immeadiately
PSR20 compatible without any further work necessary. In the long run the
stella-maris/clock package will then be marked deprecated so that people
can then use the PSR20 provided implementation.

Should the implementation of PSR20 change between now and a possible
release then this interface will still exist and a possible
implementation will need more code-changes anyhow so this interface will
still provide some way of interoperability.

The implementation of the PSR20 polyfill has been moved to the
stella-maris/clock interface which can be implemented independentyl from
PSR20 and might allow some interoperability before the working group of
the FIG manages to decide upon something.
This commit is contained in:
Andreas Heigl
2022-04-20 16:21:40 +02:00
committed by Jérôme Gamez
parent 10c02d2b49
commit 731f4c9651
8 changed files with 11 additions and 27 deletions
+6 -3
View File
@@ -11,7 +11,8 @@
}
],
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0"
"php": "~7.4.0 || ~8.0.0 || ~8.1.0",
"stella-maris/clock": "^0.1.4"
},
"require-dev": {
"phpstan/extension-installer": "^1.1",
@@ -27,7 +28,6 @@
"Beste\\Clock\\": "src/Clock"
},
"files": [
"src/psr-polyfill.php",
"src/Clock.php"
]
},
@@ -40,7 +40,10 @@
"psr/clock-implementation": "1.0"
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"scripts": {
"test": [