Skip to content

Commit

Permalink
Feature: upgraded to PHP8 and rearranged packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrankruijter committed Apr 1, 2021
1 parent 832a6d8 commit 1549c28
Show file tree
Hide file tree
Showing 31 changed files with 2,270 additions and 169 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vendor/
composer.lock
var/
var/
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
language: php
php:
- '7.3'
- '7.4'
- '8.0'

before_script:
- yes '' | pecl install yaml
- composer install

script:
Expand Down
17 changes: 12 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.0.0 - 2021-04-01
### Added
- Support for `grizz-it/command` and `grizz-it/cli`.
- Absorbed remainder of `ulrack/command` package.
- Support for PHP8

## 1.2.1 - 2020-08-30
### Fixed
- Accidental move of dev packages.
Expand All @@ -29,8 +35,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The initial implementation of the package.

# Versions
- [1.2.1 > Unreleased](https://github.com/ulrack/kernel/compare/1.2.1...HEAD)
- [1.2.0 > 1.2.1](https://github.com/ulrack/kernel/compare/1.2.0...1.2.1)
- [1.1.0 > 1.2.0](https://github.com/ulrack/kernel/compare/1.1.0...1.2.0)
- [1.0.1 > 1.1.0](https://github.com/ulrack/kernel/compare/1.0.1...1.1.0)
- [1.0.0 > 1.0.1](https://github.com/ulrack/kernel/compare/1.0.0...1.0.1)
- [2.0.0 > Unreleased](https://github.com/ulrack/cli-application/compare/2.0.0...HEAD)
- [1.2.1 > 2.0.0](https://github.com/ulrack/cli-application/compare/1.2.1...2.0.0)
- [1.2.0 > 1.2.1](https://github.com/ulrack/cli-application/compare/1.2.0...1.2.1)
- [1.1.0 > 1.2.0](https://github.com/ulrack/cli-application/compare/1.1.0...1.2.0)
- [1.0.1 > 1.1.0](https://github.com/ulrack/cli-application/compare/1.0.1...1.1.0)
- [1.0.0 > 1.0.1](https://github.com/ulrack/cli-application/compare/1.0.0...1.0.1)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This package contains an application for the
[Ulrack Kernel](https://github.com/ulrack/kernel) which implements the
[Ulrack Command](https://github.com/ulrack/command) package.
[Grizz-IT Command](https://github.com/grizz-it/command) package.

## Installation

Expand Down
13 changes: 8 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
"prefer-stable": true,
"minimum-stability": "stable",
"require": {
"php": "^7.3",
"grizz-it/configuration": "^1.1",
"ulrack/command": "^2.0",
"ulrack/kernel": "^1.3"
"php": "^8.0",
"grizz-it/cli": "^1.0",
"grizz-it/command": "^1.0",
"grizz-it/configuration": "^1.3",
"grizz-it/services": "^1.0",
"grizz-it/validator": "^1.1",
"ulrack/kernel": "^2.0"
},
"authors": [
{
Expand Down Expand Up @@ -52,7 +55,7 @@
]
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.5"
}
}
3 changes: 0 additions & 3 deletions configuration/parameters/cli-parameters.json

This file was deleted.

85 changes: 85 additions & 0 deletions configuration/schema/command.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "command.schema.json",
"type": "object",
"properties": {
"command": {
"type": "array",
"items": {
"type": "string"
}
},
"service": {
"type": "string"
},
"description": {
"type": "string"
},
"flags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"long": {
"type": "string"
},
"short": {
"type": "string"
},
"description": {
"type": "string"
}
},
"anyOf": [
{
"required": ["long"]
},
{
"required": ["short"]
}
]
}
},
"parameters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"long": {
"type": "string"
},
"short": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"enum": ["string", "number", "array"]
},
"hidden": {
"type": "boolean",
"default": false
},
"options": {
"type": "array"
},
"required": {
"type": "boolean",
"default": false
}
},
"anyOf": [
{
"required": ["long", "type"]
},
{
"required": ["short", "type"]
}
]
}
}
},
"required": ["command", "service"]
}
194 changes: 125 additions & 69 deletions configuration/services/command-core.services.json
Original file line number Diff line number Diff line change
@@ -1,78 +1,134 @@
{
"cli.input-factory": {
"class": "\\Ulrack\\Command\\Factory\\InputFactory"
},
"cli.io-factory": {
"class": "\\Ulrack\\Cli\\Factory\\IoFactory"
},
"cli.default-theme": {
"class": "\\Ulrack\\Cli\\Component\\Theme\\DefaultTheme",
"parameters": {
"themeGenerator": "@{services.cli.theme-generator}"
}
},
"cli.theme-generator": {
"class": "\\Ulrack\\Cli\\Generator\\ThemeGenerator",
"parameters": {
"themeFactory": "@{services.cli.theme-factory}"
}
},
"cli.theme-factory": {
"class": "\\Ulrack\\Cli\\Factory\\ThemeFactory",
"parameters": {
"ioFactory": "@{services.cli.io-factory}"
}
},
"cli.element-factory": {
"class": "\\Ulrack\\Cli\\Factory\\ElementFactory",
"parameters": {
"theme": "@{services.cli.theme}",
"ioFactory": "@{services.cli.io-factory}"
}
},
"cli.error-element-factory": {
"class": "\\Ulrack\\Cli\\Factory\\ElementFactory",
"parameters": {
"theme": "@{services.cli.theme}",
"ioFactory": "@{services.cli.io-factory}",
"useStderr": true
}
},
"cli.form-factory": {
"class": "\\Ulrack\\Cli\\Factory\\FormFactory",
"parameters": {
"theme": "@{services.cli.theme}",
"ioFactory": "@{services.cli.io-factory}"
}
},
"cli.form-generator": {
"class": "\\Ulrack\\Cli\\Generator\\FormGenerator",
"parameters": {
"formFactory": "@{services.cli.form-factory}",
"elementFactory": "@{services.cli.element-factory}"
"parameters": {
"cli-theme": "services.cli.default-theme",
"service.configuration.validation.services": {
"key": "services",
"schema": "services.schema.json"
},
"service.configuration.validation.invocations": {
"key": "invocations",
"schema": "invocations.schema.json"
},
"service.configuration.validation.tags": {
"key": "tags",
"schema": "tags.schema.json"
},
"service.configuration.validation.triggers": {
"key": "triggers",
"schema": "triggers.schema.json"
}
},
"cli.command-configuration": {
"class": "\\Ulrack\\Command\\Dao\\CommandConfiguration"
"triggers": {
"service.configuration.validation": {}
},
"cli.output": {
"class": "\\Ulrack\\Command\\Component\\Command\\Output",
"parameters": {
"formGenerator": "@{services.cli.form-generator}",
"ioFactory": "@{services.cli.io-factory}",
"theme": "@{services.cli.theme}",
"elementFactory": "@{services.cli.element-factory}"
"tags": {
"add.service.validation.services": {
"service": "parameters.service.configuration.validation.services",
"trigger": "triggers.service.configuration.validation"
},
"add.service.validation.invocations": {
"service": "parameters.service.configuration.validation.invocations",
"trigger": "triggers.service.configuration.validation"
},
"add.service.validation.tags": {
"service": "parameters.service.configuration.validation.tags",
"trigger": "triggers.service.configuration.validation"
},
"add.service.validation.triggers": {
"service": "parameters.service.configuration.validation.triggers",
"trigger": "triggers.service.configuration.validation"
}
},
"cli.command-router": {
"class": "\\Ulrack\\Command\\Component\\Router\\CommandRouter",
"parameters": {
"commandConfiguration": "@{services.cli.command-configuration}",
"serviceFactory": "@{services.cli.service-factory}",
"errorElementFactory": "@{services.cli.error-element-factory}",
"ioFactory": "@{services.cli.io-factory}",
"output": "@{services.cli.output}",
"formGenerator": "@{services.cli.form-generator}"
"services": {
"cli.input-factory": {
"class": "\\GrizzIt\\Command\\Factory\\InputFactory"
},
"cli.io-factory": {
"class": "\\GrizzIt\\Cli\\Factory\\IoFactory"
},
"cli.default-theme": {
"class": "\\GrizzIt\\Cli\\Component\\Theme\\DefaultTheme",
"parameters": {
"themeGenerator": "@{services.cli.theme-generator}"
}
},
"cli.theme-generator": {
"class": "\\GrizzIt\\Cli\\Generator\\ThemeGenerator",
"parameters": {
"themeFactory": "@{services.cli.theme-factory}"
}
},
"cli.theme-factory": {
"class": "\\GrizzIt\\Cli\\Factory\\ThemeFactory",
"parameters": {
"ioFactory": "@{services.cli.io-factory}"
}
},
"cli.element-factory": {
"class": "\\GrizzIt\\Cli\\Factory\\ElementFactory",
"parameters": {
"theme": "@{internal.cli.theme}",
"ioFactory": "@{services.cli.io-factory}"
}
},
"cli.error-element-factory": {
"class": "\\GrizzIt\\Cli\\Factory\\ElementFactory",
"parameters": {
"theme": "@{internal.cli.theme}",
"ioFactory": "@{services.cli.io-factory}",
"useStderr": true
}
},
"cli.form-factory": {
"class": "\\GrizzIt\\Cli\\Factory\\FormFactory",
"parameters": {
"theme": "@{internal.cli.theme}",
"ioFactory": "@{services.cli.io-factory}"
}
},
"cli.form-generator": {
"class": "\\GrizzIt\\Cli\\Generator\\FormGenerator",
"parameters": {
"formFactory": "@{services.cli.form-factory}",
"elementFactory": "@{services.cli.element-factory}"
}
},
"cli.command-configuration": {
"class": "\\Ulrack\\CliApplication\\Dao\\CommandConfiguration"
},
"cli.output": {
"class": "\\GrizzIt\\Command\\Component\\Command\\Output",
"parameters": {
"formGenerator": "@{services.cli.form-generator}",
"ioFactory": "@{services.cli.io-factory}",
"theme": "@{internal.cli.theme}",
"elementFactory": "@{services.cli.element-factory}"
}
},
"cli.command-router": {
"class": "\\Ulrack\\CliApplication\\Component\\Router\\CommandRouter",
"parameters": {
"commandConfiguration": "@{services.cli.command-configuration}",
"serviceFactory": "@{internal.core.service.factory}",
"errorElementFactory": "@{services.cli.error-element-factory}",
"ioFactory": "@{services.cli.io-factory}",
"output": "@{services.cli.output}",
"formGenerator": "@{services.cli.form-generator}"
}
},
"command.cache.clear": {
"class": "\\Ulrack\\CliApplication\\Command\\CacheClearCommand",
"parameters": {
"cacheManager": "@{internal.core.cache.manager}"
}
},
"command.validate.configuration": {
"class": "\\Ulrack\\CliApplication\\Command\\ValidateConfigurationCommand",
"parameters": {
"configurationManager": "@{internal.core.configuration.manager}",
"validationManager": "@{internal.core.validation.manager}",
"additionalValidation": "@{triggers.service.configuration.validation}"
}
}
}
}
8 changes: 0 additions & 8 deletions configuration/services/command.cache.clear.json

This file was deleted.

9 changes: 0 additions & 9 deletions configuration/services/command.validate.configuration.json

This file was deleted.

Loading

0 comments on commit 1549c28

Please sign in to comment.