This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
796 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.min.css -text -filter | ||
*.min.js -text -filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
categories: | ||
- title: "Major features" | ||
labels: | ||
- "MAJOR" | ||
- title: "Breaking changes" | ||
labels: | ||
- "BC-break" | ||
- title: "Other changes" | ||
template: $CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Build changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
update: | ||
name: Update | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Run | ||
uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'release/*' | ||
|
||
jobs: | ||
autocommit: | ||
name: Build Release | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/mvorisek/image-php:latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Install PHP dependencies | ||
run: composer update --ansi --prefer-dist --no-interaction --no-progress --optimize-autoloader | ||
|
||
- name: Update composer.json | ||
run: >- | ||
composer config --unset version && php -r ' | ||
$f = __DIR__ . "/composer.json"; | ||
$data = json_decode(file_get_contents($f), true); | ||
foreach ($data as $k => $v) { | ||
if (preg_match("~^(.+)-release$~", $k, $matches)) { | ||
$data[$matches[1]] = $data[$k]; unset($data[$k]); | ||
} | ||
} | ||
$str = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; | ||
echo $str; | ||
file_put_contents($f, $str); | ||
' | ||
- name: Commit | ||
run: | | ||
git config --global user.name "$(git show -s --format='%an')" | ||
git config --global user.email "$(git show -s --format='%ae')" | ||
git add . -N && (git diff --exit-code || git commit -a -m "Branch for stable release") | ||
- name: Push | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: ${{ github.ref }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/coverage | ||
/vendor | ||
/composer.lock | ||
.idea | ||
nbproject | ||
.vscode | ||
.DS_Store | ||
|
||
local | ||
*.local | ||
*.local.* | ||
cache | ||
*.cache | ||
*.cache.* | ||
|
||
/phpunit.xml | ||
/behat.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PhpCsFixer\Config; | ||
use PhpCsFixer\Finder; | ||
|
||
$finder = Finder::create() | ||
->in([__DIR__]) | ||
->exclude(['vendor']); | ||
|
||
return (new Config()) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PhpCsFixer' => true, | ||
'@PhpCsFixer:risky' => true, | ||
'@PHP74Migration' => true, | ||
'@PHP74Migration:risky' => true, | ||
|
||
// required by PSR-12 | ||
'concat_space' => [ | ||
'spacing' => 'one', | ||
], | ||
|
||
// disable some too strict rules | ||
'phpdoc_types_order' => [ | ||
'null_adjustment' => 'always_last', | ||
'sort_algorithm' => 'none', | ||
], | ||
'single_line_throw' => false, | ||
'yoda_style' => [ | ||
'equal' => false, | ||
'identical' => false, | ||
], | ||
'native_constant_invocation' => true, | ||
'native_function_invocation' => false, | ||
'void_return' => false, | ||
'blank_line_before_statement' => [ | ||
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'exit'], | ||
], | ||
'final_internal_class' => false, | ||
'combine_consecutive_issets' => false, | ||
'combine_consecutive_unsets' => false, | ||
'multiline_whitespace_before_semicolons' => false, | ||
'no_superfluous_elseif' => false, | ||
'ordered_class_elements' => false, | ||
'php_unit_internal_class' => false, | ||
'php_unit_test_class_requires_covers' => false, | ||
'phpdoc_add_missing_param_annotation' => false, | ||
'return_assignment' => false, | ||
'comment_to_phpdoc' => false, | ||
'general_phpdoc_annotation_remove' => [ | ||
'annotations' => ['author', 'copyright', 'throws'], | ||
], | ||
|
||
// fn => without curly brackets is less readable, | ||
// also prevent bounding of unwanted variables for GC | ||
'use_arrow_functions' => false, | ||
]) | ||
->setFinder($finder) | ||
->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer.' . md5(__DIR__) . '.cache'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Agile Toolkit Limited (UK) | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,37 @@ | ||
# atk4/community | ||
|
||
Community maintained repository of [atk4/data](https://github.com/atk4/data) and [atk4/ui](https://github.com/atk4/ui) extensions. | ||
|
||
[![Build](https://github.com/atk4/community/actions/workflows/test-unit.yml/badge.svg?branch=develop)](https://github.com/atk4/community/actions?query=branch:develop) | ||
[![CodeCov](https://codecov.io/gh/atk4/community/branch/develop/graph/badge.svg)](https://codecov.io/gh/atk4/community) | ||
[![GitHub release](https://img.shields.io/github/release/atk4/community.svg)](https://github.com/atk4/community/releases) | ||
|
||
## Installation | ||
|
||
Run `composer require atk4/community` to require this and official `atk4/data` and `atk4/ui` packages. | ||
|
||
## Documentation | ||
|
||
Source code itself and demos are the documentation. If you miss some usecase and once you figured out the solution, feel free to contribute a demo. | ||
|
||
## Support | ||
|
||
This repository is created from atk4 developers for atk4 developers. Please respect everyone interests and always use constructive tone of language. Before you ask for something, make sure tried to figure out the answer by yourself. | ||
|
||
For discussion use [Discord](https://discord.gg/QVKSk2B). | ||
|
||
For reporting issues use [GitHub issues](https://github.com/atk4/community/issues). If you seek a commercial support, mention this in your issue explicitly. | ||
|
||
Feature requests are welcomed but noone is going to serve you. The best way to express an interest in some feature is to contribute a code. | ||
|
||
## Contributions | ||
|
||
For contributions use [GitHub pull requests](https://github.com/atk4/community/pulls). | ||
|
||
A pull request must either fix some bug or implement a new feature. Either way a test is required. | ||
|
||
New data feature must be placed under `Atk4\Community\Data\Xxx` namespace and fully covered with an unit test(s). | ||
|
||
New UI feature must be placed under `Atk4\Community\Ui\Xxx` namespace and fully covered with a Behat test(s). | ||
|
||
Please keep LoC and comments to a minimum to make review and maintaining easier. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
default: | ||
suites: | ||
main: | ||
paths: | ||
features: '%paths.base%/tests-behat' | ||
contexts: | ||
- Behat\MinkExtension\Context\MinkContext | ||
- Atk4\Ui\Behat\Context | ||
extensions: | ||
Behat\MinkExtension: | ||
base_url: 'http://127.0.0.1:8888/demos' | ||
sessions: | ||
default: | ||
selenium2: | ||
browser: chrome | ||
wd_host: 'http://127.0.0.1:4444/wd/hub' | ||
capabilities: | ||
extra_capabilities: | ||
chrome: | ||
args: | ||
- '--no-sandbox' | ||
- '--headless' | ||
- '--disable-dev-shm-usage' | ||
- '--disable-gpu' | ||
- '--window-size=1280,720' | ||
proxy: | ||
proxyType: manual | ||
httpProxy: 203.0.113.0:2 | ||
sslProxy: 203.0.113.0:2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
comment: false | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 0.015 | ||
patch: false | ||
changes: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"name": "atk4/community", | ||
"description": "Community maintained repository of atk4/data and atk4/ui extensions.", | ||
"license": "MIT", | ||
"type": "library", | ||
"keywords": [ | ||
"atk4", | ||
"data", | ||
"ui", | ||
"community" | ||
], | ||
"version": "dev-develop", | ||
"authors": [ | ||
{ | ||
"name": "GitHub community", | ||
"homepage": "https://github.com/atk4/ui/graphs/contributors" | ||
} | ||
], | ||
"homepage": "https://github.com/atk4/community", | ||
"require": { | ||
"php": ">=7.4 <8.4", | ||
"atk4/data": "dev-ui" | ||
}, | ||
"require-release": { | ||
"php": ">=7.4 <8.4", | ||
"atk4/ui": "~5.1.0" | ||
}, | ||
"require-dev": { | ||
"ergebnis/composer-normalize": "^2.13", | ||
"ergebnis/phpunit-slow-test-detector": "^2.9", | ||
"friendsofphp/php-cs-fixer": "^3.0", | ||
"phpstan/extension-installer": "^1.1", | ||
"phpstan/phpstan": "^1.0", | ||
"phpstan/phpstan-deprecation-rules": "^1.0", | ||
"phpstan/phpstan-strict-rules": "^1.3", | ||
"phpunit/phpunit": "^9.5.5 || ^10.0" | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"autoload": { | ||
"psr-4": { | ||
"Atk4\\Community\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Atk4\\Community\\Tests\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"ergebnis/composer-normalize": true, | ||
"phpstan/extension-installer": true | ||
}, | ||
"sort-packages": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
includes: | ||
- phar://phpstan.phar/conf/bleedingEdge.neon | ||
|
||
parameters: | ||
level: 6 | ||
checkMissingOverrideMethodAttribute: true | ||
paths: | ||
- . | ||
excludePaths: | ||
- vendor | ||
- js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<phpunit bootstrap="vendor/autoload.php" colors="true"> | ||
<testsuites> | ||
<testsuite name="tests"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<extensions> | ||
<bootstrap class="Ergebnis\PHPUnit\SlowTestDetector\Extension" /> | ||
</extensions> | ||
<source> | ||
<include> | ||
<directory>src</directory> | ||
<directory>tests</directory> | ||
</include> | ||
</source> | ||
<coverage> | ||
<report> | ||
<php outputFile="coverage/phpunit.cov" /> | ||
</report> | ||
</coverage> | ||
</phpunit> |