Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Releasing refs/heads/release/2.0.0 into master (#18)
Browse files Browse the repository at this point in the history
* add migrator console

* Add but more documentation

* fix up readme

* schema should not depend on development packages

* develop to require develop versions

* fix alter field

* add drop field

* add comment

* add changelog

* fix version requirement

* Update composer.json

* Update composer.json

* Update composer.json

* Update BasicTest.php

* Update SchemaTestcaseTest.php

* Update phpunit.xml

* Update .travis.yml

* Update phpunit.xml

* Update SchemaTestcaseTest.php

* Update phpunit.xml

* Update SchemaTestcaseTest.php

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update SchemaTestcaseTest.php

* move abstract testcase to tests

* Apply fixes from StyleCI

* enable debug

* Apply fixes from StyleCI

* move

* fix dsn

* proper dsn

* Update README.md

* globals

* Apply fixes from StyleCI

* work on dsn

* Apply fixes from StyleCI

* ouch

* include both tests - sqlite and mysql

* fix

* fix types

* disable unsupported test

* add comment

* remove debug

* fix codeclimate config

* fix escape_char

* debug

* Apply fixes from StyleCI

* crap

* PostGre suppport

* set max_connections

* support PostGreSQL starting from v.10 only

* get rid of connection

* Update .codeclimate.yml

* add support for changing field name

* Apply fixes from StyleCI

* Update Migration.php

* add rename table support

* Extend to all DataType options with PHPUnit Tests

* add transcode table for field type => datatype database
* tested on SQLite and MySQL

* Change default Type from VARCHAR256 to TEXT

more space is better than less, this class is very useful during development,
after that will be disabled and database must be optimized with other tools.

i changed because i had a problem storing serialized EXIF in array datatype

* drop php 5.6 support

* Add transcoding for Field Reference_One
climate error correction

* Reformatting and change variables name

switch to codeformatting PSR-1,PSR-2
add hasOne in Test

* add creation of file models class via console to "reverse engineering" DB

fixed mysql float was mistyped uppercase

* Add Doc for function createModelFromTable

* Adjust naming for transcodes on SQLite

* add hasOne detect field type

* Remove some editor autoadd - f... phpstorm

* format code in ->getTranscodeTypeKeyFromField

* compatibility with new data namespace

* Apply fixes from StyleCI

* better handling of text, array and object fields. also fix few others.

* Apply fixes from StyleCI

* add type options

* added changelog

* working on version dependencies

* for development branch we need development dependencies

* make types easier to extend and improve PgSQL types support

* Apply fixes from StyleCI

* more dependencies and easier to extend migrator console

* oops

* no need for this anymore

* implements factory method getMigration, uses connection->driver, few changes in phpunit test suite, more tests

* Apply fixes from StyleCI

* change docs

* Better PostgreSQL support

* fix datetime mess

* typo

* use getFields() in Model rather than hack through elements

* Composer - Drop PHP < 7.2

* Big refactor

* Merge remote-tracking branch 'remotes/atk4/develop' into add-type-transcoding

* StyleCi

* StyleCi 1

* remove php < 7.2 from travis

* Removed function for creation of Model File

* Refactor variable names and removed extra line

* Refactor 1 comment to be consistent with the others below

* Add support for GitHub actions (#17)

* Add GitHub Action support

* disable travis

* tweak bundler

* wip

* wip

* wip

* Setting current dependencies
  • Loading branch information
github-actions[bot] authored and romaninsh committed Dec 2, 2019
1 parent 5d0065a commit 2d39d8f
Show file tree
Hide file tree
Showing 27 changed files with 1,063 additions and 340 deletions.
93 changes: 49 additions & 44 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,53 @@
engines:
duplication:
enabled: true
config:
languages:
- php
fixme:
enabled: true
version: "2"
plugins:
# Disabling plugins until there is a reasonable way to sanitize their output
phpcodesniffer:
enabled: false
config:
standard: "PSR1,PSR2"
ignore_warnings: true
encoding: utf-8
phpmd:
enabled: true
exclude_fingerprints:
checks:
CyclomaticComplexity:
enabled: false
Design/TooManyPublicMethods:
enabled: false
Design/TooManyMethods:
enabled: false
Design/NpathComplexity:
enabled: false
Design/WeightedMethodCount:
enabled: false
Design/LongClass:
enabled: false
Controversial/CamelCaseMethodName:
enabled: false
Controversial/CamelCaseParameterName:
enabled: false
Controversial/CamelCasePropertyName:
enabled: false
Controversial/CamelCaseVariableName:
enabled: false
Controversial/CamelCaseClassName:
enabled: false
Naming/ShortVariable:
enabled: false
CleanCode/ElseExpression:
enabled: false
enabled: false
sonar-php:
enabled: false

checks:
argument-count:
config:
threshold: 4
complex-logic:
config:
threshold: 4
file-lines:
config:
threshold: 1000
method-complexity:
config:
threshold: 40
method-count:
config:
threshold: 40
method-lines:
config:
threshold: 100
nested-control-flow:
config:
threshold: 4
return-statements:
config:
threshold: 4
similar-code:
config:
threshold: 100
identical-code:
config:
threshold: 150

radon:
enabled: true
ratings:
paths:
- src/**
exclude_paths:
- docs/**/*
- tests/**/*
- vendor/**/*
- src/**/*
exclude_patterns:
- docs/**/*
- tests/**/*
- vendor/**/*
9 changes: 9 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See https://github.com/release-drafter/release-drafter#configuration
categories:
- title: 'Enhancements'
labels:
- enhancement
template: |
## What’s Changed
$CHANGES
45 changes: 45 additions & 0 deletions .github/workflows/bundler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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: |
jq 'del(.require["atk4/dsql"]) | del(.["require-dev"]["atk4/ui"]) | del(.["require-dev"]["atk4/data"])' < composer.json > tmp && mv tmp composer.json
composer require --no-progress --no-suggest --prefer-dist --optimize-autoloader atk4/dsql
#composer require --dev atk4/data # atk4/ui - removed temporarily until atk4/ui is released
composer update --no-suggest --prefer-dist --optimize-autoloader
- uses: teaminkling/autocommit@master
with:
commit-message: Setting current dependencies
- uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: pull-request
uses: repo-sync/pull-request@v2
with:
source_branch: "" # If blank, default: triggered branch
destination_branch: "master" # If blank, default: master
pr_title: "Releasing ${{ github.ref }} 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 }}

16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- develop

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: toolmantim/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 59 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Unit Testing

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

jobs:
unit-test:
name: Unit Testing
runs-on: ubuntu-latest
container:
image: atk4/image:${{ matrix.php }} # https://github.com/atk4/image
strategy:
matrix:
php: ['7.2', '7.3', 'latest']
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
DB_DATABASE: dsql_test
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v1
- run: php --version
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader

- name: Run Tests
run: |
mkdir -p build/logs
mysql -uroot -ppassword -h mysql -e 'CREATE DATABASE dsql_test;'
- name: SQLite Testing
run: vendor/bin/phpunit --configuration phpunit.xml --coverage-text --exclude-group dns

- name: MySQL Testing
run: vendor/bin/phpunit --configuration phpunit-mysql.xml --exclude-group dns

- name: Merge coverage logs
run: vendor/bin/phpcov merge build/logs/ --clover build/logs/cc.xml;

- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: build/logs/cc.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ docs/build
/build
/vendor
.DS_Store
/.idea/
51 changes: 51 additions & 0 deletions .old.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
language: php

php:
- '7.2'
- '7.3'

cache:
directories:
- $HOME/.composer/cache

services:
- mysql

before_script:
- composer self-update
- composer install --no-ansi
- mysql -e 'create database dsql_test;'
- mysql -e 'SET GLOBAL max_connections = 1000;'
- mkdir -p build/logs

script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then CM=""; NC=""; else CM=""; NC="--no-coverage"; fi
- $CM ./vendor/bin/phpunit --configuration phpunit.xml $NC
- $CM ./vendor/bin/phpunit --configuration phpunit-mysql.xml $NC

after_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then
echo "Merging coverage reports:";
vendor/bin/phpcov merge build/logs/ --clover build/logs/cc.xml;
echo "We now have these coverage files:";
ls -l build/logs;
echo "Sending codeclimate report:";
vendor/bin/test-reporter --coverage-report build/logs/cc.xml;
echo "Sending codecov report:";
TRAVIS_CMD="" bash <(curl -s https://codecov.io/bash) -f build/logs/cc.xml;
fi

notifications:
slack:
rooms:
- agiletoolkit:bjrKuPBf1h4cYiNxPBQ1kF6c#dsql
on_success: change

urls:
- https://webhooks.gitter.im/e/b33a2db0c636f34bafa9

on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always

email: false
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

69 changes: 60 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
# 1.1
# Change Log

## [1.1.6](https://github.com/atk4/schema/tree/1.1.6)

[Full Changelog](https://github.com/atk4/schema/compare/1.1.5...1.1.6)

**Fixed bugs:**

- Feature/support array and object types [\#12](https://github.com/atk4/schema/pull/12) ([DarkSide666](https://github.com/DarkSide666))

**Merged pull requests:**

- compatibility with new data namespace [\#11](https://github.com/atk4/schema/pull/11) ([DarkSide666](https://github.com/DarkSide666))

## [1.1.5](https://github.com/atk4/schema/tree/1.1.5) (2018-08-16)

[Full Changelog](https://github.com/atk4/schema/compare/1.1.4...1.1.5)

**Merged pull requests:**

- fix alter and drop field [\#7](https://github.com/atk4/schema/pull/7) ([DarkSide666](https://github.com/DarkSide666))

## [1.1.4](https://github.com/atk4/schema/tree/1.1.4) (2018-04-19)

[Full Changelog](https://github.com/atk4/schema/compare/1.1.3...1.1.4)

**Merged pull requests:**

- Feature/add migrator [\#6](https://github.com/atk4/schema/pull/6) ([romaninsh](https://github.com/romaninsh))

## [1.1.3](https://github.com/atk4/schema/tree/1.1.3) (2018-04-10)

[Full Changelog](https://github.com/atk4/schema/compare/1.1.2...1.1.3)

## [1.1.2](https://github.com/atk4/schema/tree/1.1.2) (2018-04-06)

[Full Changelog](https://github.com/atk4/schema/compare/1.1.1...1.1.2)

## [1.1.1](https://github.com/atk4/schema/tree/1.1.1) (2018-04-06)

[Full Changelog](https://github.com/atk4/schema/compare/1.1.0...1.1.1)

## [1.1.0](https://github.com/atk4/schema/tree/1.1.0) (2018-04-03)

[Full Changelog](https://github.com/atk4/schema/compare/1.0.2...1.1.0)

**Closed issues:**

Expand All @@ -10,19 +54,26 @@
- Feature/model integration [\#4](https://github.com/atk4/schema/pull/4) ([romaninsh](https://github.com/romaninsh))
- drop php 5.5, update phpunit [\#3](https://github.com/atk4/schema/pull/3) ([DarkSide666](https://github.com/DarkSide666))

## 1.0.2
## [1.0.2](https://github.com/atk4/schema/tree/1.0.2) (2017-04-12)

[Full Changelog](https://github.com/atk4/schema/compare/1.0.1...1.0.2)

## [1.0.1](https://github.com/atk4/schema/tree/1.0.1) (2017-04-12)

Cleanup dependencies
[Full Changelog](https://github.com/atk4/schema/compare/1.0...1.0.1)

## 1.0.1
## [1.0](https://github.com/atk4/schema/tree/1.0) (2016-09-30)

Added release script
[Full Changelog](https://github.com/atk4/schema/compare/0.1...1.0)

## 1.0.0
## [0.1](https://github.com/atk4/schema/tree/0.1) (2016-09-30)

[Full Changelog](https://github.com/atk4/schema/compare/046cc18d3f924ec52cc4959a2d8195572ddb22c8...0.1)

**Merged pull requests:**

Initial release with working Migrator and PHPUnit schema
- Applied fixes from StyleCI [\#1](https://github.com/atk4/schema/pull/1) ([romaninsh](https://github.com/romaninsh))


## 0.1.0

* Initial Release
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
Loading

0 comments on commit 2d39d8f

Please sign in to comment.