From cb05f74da306dc272a43519a1d15722164a8558e Mon Sep 17 00:00:00 2001 From: Ferdinand Kuhl Date: Fri, 24 Jun 2016 20:57:06 +0200 Subject: [PATCH] TASK: Preparing first public release --- License.txt | 19 +++++++++++++++++++ Readme.md | 22 ++++++++++++++++++++++ composer.json | 12 +++++++++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 License.txt create mode 100644 Readme.md diff --git a/License.txt b/License.txt new file mode 100644 index 0000000..2ffa411 --- /dev/null +++ b/License.txt @@ -0,0 +1,19 @@ +Copyright (c) 2016 Ferdinand Kuhl + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..af0d524 --- /dev/null +++ b/Readme.md @@ -0,0 +1,22 @@ +DigiComp.Sequence +------------------------- + + +This is a very simple and stupid tool, helping in generation of gapless sequences. For this task it relies on key +integrity of the database of your choice. + +Usage is quite simple also: + + /** + * @param \DigiComp\Sequence\Service\SequenceNumberGenerator $sequenceNumberGenerator + */ + public function __construct(SequenceNumberGenerator $sequenceNumberGenerator) + { + $this->orderId = $sequenceNumberGenerator->getNextNumberFor($this); + } + +``getNextNumberFor`` allows you to give an object which will be resolved to its FQCN or a custom sequence name. + +The CommandController helps you to advance the current sequence number, in case of migrations or similar. + +See ``./flow help sequence:advance`` if interested. diff --git a/composer.json b/composer.json index 7db1e17..2133f3b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,17 @@ { "name": "digicomp/sequence", "type": "typo3-flow-package", - "description": "", + "description": "Sequence is a very simple database agnostic but database based sequence generator", + "authors": [ + { + "name": "Ferdinand Kuhl", + "email": "f.kuhl@digital-competence.de", + "homepage": "http://www.digital-competence.de", + "role": "Developer" + } + ], + "license": "MIT", + "homepage": "https://github.com/digicomp/DigiComp.Sequence", "require": { "typo3/flow": "~2.0|~3.0" },