Skip to content

Commit

Permalink
Initial release (#1)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter authored Jan 2, 2023
2 parents 6fd69fb + 6981ab8 commit a927b79
Show file tree
Hide file tree
Showing 25 changed files with 1,017 additions and 517 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.1.0 - 2023-01-01
First version
52 changes: 38 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,54 @@
# wip
# Config

[![Compliance](https://github.com/ghostwriter/wip/actions/workflows/compliance.yml/badge.svg)](https://github.com/ghostwriter/wip/actions/workflows/compliance.yml)
[![Supported PHP Version](https://badgen.net/packagist/php/ghostwriter/wip?color=8892bf)](https://www.php.net/supported-versions)
[![Type Coverage](https://shepherd.dev/github/ghostwriter/wip/coverage.svg)](https://shepherd.dev/github/ghostwriter/wip)
[![Latest Version on Packagist](https://badgen.net/packagist/v/ghostwriter/wip)](https://packagist.org/packages/ghostwriter/wip)
[![Downloads](https://badgen.net/packagist/dt/ghostwriter/wip?color=blue)](https://packagist.org/packages/ghostwriter/wip)
[![Compliance](https://github.com/ghostwriter/config/actions/workflows/compliance.yml/badge.svg)](https://github.com/ghostwriter/config/actions/workflows/compliance.yml)
[![Supported PHP Version](https://badgen.net/packagist/php/ghostwriter/config?color=8892bf)](https://www.php.net/supported-versions)
[![Type Coverage](https://shepherd.dev/github/ghostwriter/config/coverage.svg)](https://shepherd.dev/github/ghostwriter/config)
[![Latest Version on Packagist](https://badgen.net/packagist/v/ghostwriter/config)](https://packagist.org/packages/ghostwriter/config)
[![Downloads](https://badgen.net/packagist/dt/ghostwriter/config?color=blue)](https://packagist.org/packages/ghostwriter/config)

work in progress

> **Warning**
>
> This project is not finished yet, work in progress.
Provides an object that maps configuration keys to values.


## Installation

You can install the package via composer:

``` bash
composer require ghostwriter/wip
composer require ghostwriter/config
```

## Usage

```php
// work in progress
// API
interface ConfigInterface extends ArrayAccess, Countable, IteratorAggregate
{
public function toArray(): array;

public function get(string $key, mixed $default = null): mixed;

public function has(string $key): bool;

public function merge(array $options): void;

public function mergeFromPath(string $path, string $key): void;

public function set(string $key, mixed $value): void;

public function push(string $key, mixed $value): void;

public function remove(string $key): void;

public function count(): int;

public function getIterator(): Traversable;

public function append(string $key, mixed $value): void;

public function prepend(string $key, mixed $value): void;

public function split(string $key): self;
}
```

## Testing
Expand All @@ -48,7 +72,7 @@ If you discover any security related issues, please email `nathanael.esayeas@pro
## Credits

- [Nathanael Esayeas](https://github.com/ghostwriter)
- [All Contributors](https://github.com/ghostwriter/wip/contributors)
- [All Contributors](https://github.com/ghostwriter/config/contributors)

## License

Expand Down
Empty file removed bin/.gitkeep
Empty file.
43 changes: 14 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "ghostwriter/wip",
"description": "Here be dragons",
"name": "ghostwriter/config",
"description": "Provides an object that maps configuration keys to values.",
"license": "BSD-3-Clause",
"type": "library",
"keywords": [
"ghostwriter",
"wip"
"config"
],
"authors": [
{
Expand All @@ -15,13 +15,13 @@
"role": "Developer"
}
],
"homepage": "https://github.com/ghostwriter/wip",
"homepage": "https://github.com/ghostwriter/config",
"support": {
"issues": "https://github.com/ghostwriter/wip/issues",
"forum": "https://github.com/ghostwriter/wip/discussions",
"source": "https://github.com/ghostwriter/wip",
"docs": "https://github.com/ghostwriter/wip",
"rss": "https://github.com/ghostwriter/wip/releases.atom"
"issues": "https://github.com/ghostwriter/config/issues",
"forum": "https://github.com/ghostwriter/config/discussions",
"source": "https://github.com/ghostwriter/config",
"docs": "https://github.com/ghostwriter/config",
"rss": "https://github.com/ghostwriter/config/releases.atom"
},
"funding": [
{
Expand All @@ -30,20 +30,13 @@
}
],
"require": {
"php": ">=8.1,<8.3",
"ghostwriter/collection": "^1.1",
"ghostwriter/container": "^1.2",
"ghostwriter/event-dispatcher": "^1.3",
"ghostwriter/json": "^1.0.1",
"ghostwriter/option": "^1.2",
"ghostwriter/result": "^1.0.1"
"php": ">=8.1,<8.3"
},
"require-dev": {
"infection/infection": "^0.26",
"nikic/php-parser": "^4.15",
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.18",
"rector/rector": "^0.14",
"rector/rector": "^0.15",
"symplify/easy-coding-standard": "^11.1",
"vimeo/psalm": "^5.4"
},
Expand All @@ -52,22 +45,14 @@
"prefer-stable": true,
"autoload": {
"psr-4": {
"Ghostwriter\\wip\\": "src/"
},
"files": [
"src/constants.php",
"src/functions.php"
]
"Ghostwriter\\Config\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Ghostwriter\\wip\\Tests\\": "tests/"
"Ghostwriter\\Config\\Tests\\": "tests/"
}
},
"bin": [
"bin/my-other-script",
"bin/my-script"
],
"config": {
"allow-plugins": {
"infection/extension-installer": true
Expand Down
Loading

0 comments on commit a927b79

Please sign in to comment.