Skip to content

Commit

Permalink
Releasing 2.0.1 into master (#122)
Browse files Browse the repository at this point in the history
* Clean up badges in README file (#116)

* improve badges

* cleanup

* wip

* wip

* wip

* Configuration Elements cannot be replaced (#117)

* Apply fixes from StyleCI

* Update composer.json

* Update release-drafter.yml

* Update release-drafter.yml

* Create bundler.yml

* Setting release dependencies

Co-authored-by: Romans Malinovskis <[email protected]>
Co-authored-by: Georg Marx <[email protected]>
Co-authored-by: Imants Horsts <[email protected]>
Co-authored-by: GitHub Web Flow <[email protected]>
  • Loading branch information
5 people authored Feb 11, 2020
1 parent 2c2655f commit 6313f84
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 51 deletions.
1 change: 1 addition & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# See https://github.com/release-drafter/release-drafter#configuration
template: |
## What’s Changed
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/bundler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Bundler

on: create

jobs:
autocommit:
name: Update to stable dependencies
if: startsWith(github.ref, 'refs/heads/release/')
runs-on: ubuntu-latest
container:
image: atk4/image:latest # https://github.com/atk4/image
steps:
- uses: actions/checkout@master
- run: echo ${{ github.ref }}
- name: Update to stable dependencies
run: |
# replaces X keys with X-release keys
jq '. as $in | reduce (keys_unsorted[] | select(endswith("-release")|not)) as $k ({}; . + {($k) : (($k + "-release") as $kr | $in | if has($kr) then .[$kr] else .[$k] end) } )' < composer.json > tmp && mv tmp composer.json
v=$(echo ${{ github.ref }} | cut -d / -f 4)
echo "::set-env name=version::$v"
- uses: teaminkling/autocommit@master
with:
commit-message: Setting release dependencies
- uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: pull-request
uses: romaninsh/pull-request@master
with:
source_branch: "release/${{ env.version }}"
destination_branch: "master" # If blank, default: master
pr_title: "Releasing ${{ env.version }} into master"
pr_body: |
- [ ] Review changes (must include stable dependencies)
- [ ] Merge this PR into master (will delete ${{ github.ref }})
- [ ] Go to Releases and create TAG from master
Do not merge master into develop
pr_reviewer: "romaninsh"
pr_assignee: "romaninsh"
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: toolmantim/release-drafter@v5.2.0
- uses: toolmantim/release-drafter@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Unit Testing

on:
pull_request
pull_request:
branches: '*'
push:
branches:
- master
- develop

jobs:
unit-test:
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

**Collection of PHP Traits for designing object-oriented frameworks.**

[![Build Status](https://travis-ci.org/atk4/core.png?branch=develop)](https://travis-ci.org/atk4/core)
![Build](https://github.com/atk4/core/workflows/Unit%20Testing/badge.svg)
[![Code Climate](https://codeclimate.com/github/atk4/core/badges/gpa.svg)](https://codeclimate.com/github/atk4/core)
[![StyleCI](https://styleci.io/repos/57242416/shield)](https://styleci.io/repos/57242416)
[![CodeCov](https://codecov.io/gh/atk4/core/branch/develop/graph/badge.svg)](https://codecov.io/gh/atk4/core)
[![Test Coverage](https://codeclimate.com/github/atk4/core/badges/coverage.svg)](https://codeclimate.com/github/atk4/core/coverage)
[![Issue Count](https://codeclimate.com/github/atk4/core/badges/issue_count.svg)](https://codeclimate.com/github/atk4/core)

[![License](https://poser.pugx.org/atk4/core/license)](https://packagist.org/packages/atk4/core)
[![GitHub release](https://img.shields.io/github/release/atk4/core.svg?maxAge=2592000)](CHANGELOG.md)


Expand Down
87 changes: 48 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,51 @@
{
"name": "atk4/core",
"type": "library",
"description": "Agile Core - collection of PHP Traits for designing object-oriented frameworks",
"keywords": ["php", "framework", "trains", "agile toolkit"],
"homepage": "https://github.com/atk4/core",
"license": "MIT",
"minimum-stability": "dev",
"prefer-stable": true,
"authors": [
{
"name": "Romans Malinovskis",
"email": "[email protected]",
"homepage": "https://nearly.guru/"
}
],
"require": {
"php": ">=7.2.0",
"psr/log": "~1.0",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "*",
"symfony/yaml": "~2.1|~3.0|~4.0",
"satooshi/php-coveralls": "^1.0",
"codeclimate/php-test-reporter": "*",
"symfony/contracts": "^1.1",
"atk4/data": "dev-develop"
},
"replace": {
"atk4/core": "self.version"
},
"suggest": {
"symfony/yaml": "~2.1|~3.0|~4.0"
},
"autoload": {
"psr-4": {"atk4\\core\\":"src/"}
},
"autoload-dev": {
"psr-4": {"atk4\\core\\tests\\":"tests/"}
"name": "atk4/core",
"type": "library",
"description": "Agile Core - collection of PHP Traits for designing object-oriented frameworks",
"keywords": [
"php",
"framework",
"traits",
"agile toolkit"
],
"homepage": "https://github.com/atk4/core",
"license": "MIT",
"minimum-stability": "dev",
"prefer-stable": true,
"authors": [
{
"name": "Romans Malinovskis",
"email": "[email protected]",
"homepage": "https://nearly.guru/"
}
],
"require": {
"php": ">=7.2.0",
"psr/log": "~1.0",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "*",
"symfony/yaml": "~2.1|~3.0|~4.0",
"satooshi/php-coveralls": "^1.0",
"codeclimate/php-test-reporter": "*",
"symfony/contracts": "^1.1",
"atk4/data": "^2.0"
},
"replace": {
"atk4/core": "self.version"
},
"suggest": {
"symfony/yaml": "~2.1|~3.0|~4.0"
},
"autoload": {
"psr-4": {
"atk4\\core\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"atk4\\core\\tests\\": "tests/"
}
}
}
2 changes: 1 addition & 1 deletion src/CollectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function _addIntoCollection(string $name, object $object, string $collect
'Object with requested name already exist in collection',
'name' => $name,
'collection'=> $collection,
]);
]);
}
$this->{$collection}[$name] = $object;

Expand Down
2 changes: 1 addition & 1 deletion src/ConfigTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function readConfig($files = ['config.php'], $format = 'php')
$configs[] = $tempConfig;
}

$this->config = array_merge_recursive($this->config, ...$configs);
$this->config = array_replace_recursive($this->config, ...$configs);

return $this;
}
Expand Down
8 changes: 4 additions & 4 deletions src/DynamicMethodTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public function __call(string $method, $arguments)

throw new Exception([
'Method '.$method.' is not defined for this object',
'class' => get_class($this),
'method' => $method,
'arguments' => $arguments,
]);
'class' => get_class($this),
'method' => $method,
'arguments' => $arguments,
]);
}

/**
Expand Down

0 comments on commit 6313f84

Please sign in to comment.