Skip to content

Commit

Permalink
Prepare for first release.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Mar 5, 2024
1 parent bfdb276 commit 32b95cd
Show file tree
Hide file tree
Showing 24 changed files with 474 additions and 215 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/build.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/mutation.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ phpunit.xlm

# windows thumbnail cache
Thumbs.db

# vscode
.vscode
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Change Log

## 0.1.0 Under development
## 0.1.1 Under development

## 0.1.0 March 5, 2024

- Initial release
61 changes: 36 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
<p align="center">
<a href="/yii-tools/template" target="_blank">
<a href="/ui-awesome/html-interop" target="_blank">
<img src="https://avatars.githubusercontent.com/u/121752654?s=200&v=4" height="100px">
</a>
<h1 align="center">Template.</h1>
<h1 align="center">UI Awesome HTML Interop Common Interfaces for PHP.</h1>
<br>
</p>

<p align="center">
<a href="https://github.com/yii-tools/template/actions/workflows/build.yml" target="_blank">
<img src="https://github.com/yii-tools/template/actions/workflows/build.yml/badge.svg" alt="PHPUnit">
</a>
<a href="https://codecov.io/gh/yii-tools/template" target="_blank">
<img src="https://codecov.io/gh/yii-tools/template/branch/main/graph/badge.svg?token=MF0XUGVLYC" alt="Codecov">
<a href="https://github.com/ui-awesome/html-interop/actions/workflows/static.yml" target="_blank">
<img src="https://github.com/ui-awesome/html-interop/actions/workflows/static.yml/badge.svg" alt="Psalm">
</a>
<a href="https://dashboard.stryker-mutator.io/reports/github.com/yii-tools/template/main" target="_blank">
<img src="https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyii2-extensions%2Fasset-bootstrap5%2Fmain" alt="Infection">
</a>
<a href="https://github.com/yii-tools/template/actions/workflows/static.yml" target="_blank">
<img src="https://github.com/yii-tools/template/actions/workflows/static.yml/badge.svg" alt="Psalm">
</a>
<a href="https://shepherd.dev/github/yii-tools/template" target="_blank">
<img src="https://shepherd.dev/github/yii-tools/template/coverage.svg" alt="Psalm Coverage">
</a>
<a href="https://github.styleci.io/repos/494495136?branch=main" target="_blank">
<img src="https://github.styleci.io/repos/494495136/shield?branch=main" alt="Style ci">
</a>
<a href="https://github.styleci.io/repos/767397797?branch=main">
<img src="https://github.styleci.io/repos/767397797/shield?branch=main" alt="Style ci">
</a>
</p>

## Installation
Expand All @@ -34,24 +23,46 @@ The preferred way to install this extension is through [composer](https://getcom
Either run

```shell
composer require --prefer-dist package
composer require --prefer-dist ui-awesome/html-interop:"^0.1"
```

or add

```json
"package": "version"
"ui-awesome/html-interop": "^0.1"
```

to the require-dev section of your `composer.json` file.
to the require section of your `composer.json` file.

## Usage
## Testing

[Check the documentation docs](docs/README.md) to learn about usage.
### Checking dependencies

## Testing
This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all
dependencies are correctly defined in `composer.json`.

To run the checker, execute the following command:

```shell
composer run check-dependencies
```

[Check the documentation testing](docs/testing.md) to learn about testing.
### Easy coding standard

The code is checked with [Easy Coding Standard](https://github.com/easy-coding-standard/easy-coding-standard) and
[PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer). To run it:

```shell
composer run ecs
```

### Static analysis

The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:

```shell
composer run psalm
```

## Support versions

Expand Down
37 changes: 12 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,39 @@
{
"name": "yii-tools/template",
"name": "ui-awesome/html-interop",
"type": "library",
"description": "template",
"description": "UI Awesome HTML Interop Common Interfaces for PHP.",
"keywords": [
"template"
"ui-awesome",
"html-interop",
"common",
"interfaces",
"php"
],
"license": "mit",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.1"
},
"require-dev": {
"maglnet/composer-require-checker": "^4.7",
"phpunit/phpunit": "^10.5",
"roave/infection-static-analysis-plugin": "^1.34",
"symplify/easy-coding-standard": "^12.1",
"vimeo/psalm": "^5.19"
"vimeo/psalm": "^5.20"
},
"autoload": {
"psr-4": {
"Template\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Template\\Tests\\": "tests"
"UIAwesome\\Html\\Interop\\": "src"
}
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
"dev-main": "0.1-dev"
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"infection/extension-installer": true
}
"sort-packages": true
},
"scripts": {
"check-dependencies": "composer-require-checker",
"easy-coding-standard": "ecs check",
"mutation": [
"Composer\\Config::disableProcessTimeout",
"roave-infection-static-analysis-plugin"
],
"psalm": "psalm",
"test": "phpunit"
"psalm": "psalm"
}
}
44 changes: 0 additions & 44 deletions docs/testing.md

This file was deleted.

1 change: 0 additions & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
->withPaths(
[
__DIR__ . '/src',
__DIR__ . '/tests',
],
)
->withPhpCsFixerSets(perCS20: true)
Expand Down
24 changes: 0 additions & 24 deletions phpunit.xml.dist

This file was deleted.

26 changes: 26 additions & 0 deletions src/AriaDescribedByInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

namespace UIAwesome\Html\Interop;

/**
* Provide methods for handling HTML input aria-describedby attribute.
*/
interface AriaDescribedByInterface
{
/**
* Set the aria-describedby attribute, which identifies the element(s) that describes the current element.
*
* The aria-describedby attribute is used in WAI-ARIA to provide a relationship between an element and its
* descriptive elements. This helps screen readers and other assistive technologies provide additional context
* about the element.
*
* @param bool|string $value IDs of the descriptive element(s) separated by spaces.
*
* @return static A new instance or clone of the current object with the aria-describedby attribute set.
*
* @link https://www.w3.org/TR/wai-aria-1.1/#aria-describedby
*/
public function ariaDescribedBy(string|bool $value = true): static;
}
28 changes: 28 additions & 0 deletions src/CheckedInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

namespace UIAwesome\Html\Interop;

/**
* Provide methods for handling HTML checked value-related attributes and properties.
*/
interface CheckedInterface
{
/**
* Set the checked attribute valid for both radio and checkbox types, checked is a Boolean attribute.
*
* If present on a radio type, it indicates that the radio button is the currently selected one in the group of
* same-named radio buttons. If present on a checkbox type, it indicates that the checkbox is checked by default
* (when the page loads). It does not indicate whether this checkbox is currently checked: if the checkbox state
* is changed, this content attribute does not reflect the change.
*
* @param array|bool|float|int|string $value The value of the checked attribute, for matching the value of the
* checkbox or radio input element.
*
* @link https://html.spec.whatwg.org/multipage/input.html#attr-input-checked
*
* @return static A new instance of the current class with the specified checked value.
*/
public function checked(array|bool|int|float|null|string $value): static;
}
20 changes: 20 additions & 0 deletions src/ContentInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

namespace UIAwesome\Html\Interop;

/**
* Provide methods for handling HTML content attributes.
*/
interface ContentInterface
{
/**
* Set the `HTML` content value.
*
* @param RenderInterface|string ...$values The `HTML` content value.
*
* @return static A new instance of the current class with the specified content value.
*/
public function content(string|RenderInterface ...$values): static;
}
Loading

0 comments on commit 32b95cd

Please sign in to comment.