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

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
romaninsh committed Apr 6, 2018
2 parents e7797ac + 9bf9490 commit 5d0065a
Show file tree
Hide file tree
Showing 15 changed files with 874 additions and 121 deletions.
20 changes: 2 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- '5.5'
- '5.6'
- '7.0'
- '7.1'
Expand All @@ -11,30 +10,15 @@ php:

before_script:
- composer install
# - mysql -e 'create database dsql_test;'
- mysql -e 'create database test3;'

after_script:
- echo $TRAVIS_PHP_VERSION
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then echo "Sending coverage report"; vendor/bin/test-reporter; fi

script:
- phpunit
- ./vendor/phpunit/phpunit/phpunit

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

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
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# 1.1

**Closed issues:**

- refactor by splitting Snapshot out of PHPUnit [\#2](https://github.com/atk4/schema/issues/2)

**Merged pull requests:**

- a lot of fixes, comments etc. [\#5](https://github.com/atk4/schema/pull/5) ([DarkSide666](https://github.com/DarkSide666))
- 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

Cleanup dependencies

## 1.0.1

Added release script

## 1.0.0

Initial release with working Migrator and PHPUnit schema
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Resources and Community:

Stats:

[![Version](https://badge.fury.io/gh/atk4%2Fschema.svg)](https://packagist.org/packages/atk4/schema)
[![GitHub release](https://img.shields.io/github/release/atk4/schema.svg)](CHANGELOG.md)


## Example
Expand Down Expand Up @@ -105,5 +105,5 @@ composer require atk4/schema

## Current Status

Early development
Stable functionality

14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
}
],
"require": {
"php": ">=5.5.0",
"atk4/dsql": "^1.0",
"atk4/core": "^1.1",
"atk4/data": "^1.1"
"php": ">=5.6.0",
"atk4/dsql": "dev-develop",
"atk4/core": "dev-develop"
},
"suggest": {
"atk4/data": "*",
"jdorn/sql-formatter": "*"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"phpunit/phpunit": "<6",
"atk4/data": "dev-develop",
"codeclimate/php-test-reporter": "*"
},
"autoload": {
Expand Down
5 changes: 5 additions & 0 deletions demos/init.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
include '../vendor/autoload.php';
$db = \atk4\data\Persistence::connect('mysql://root:root@localhost/test');

$db->connection = new \atk4\dsql\Connection_Dumper(['connection'=>$db->connection]);
27 changes: 27 additions & 0 deletions demos/modelmigrator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
include 'init.php';

class User extends \atk4\data\Model {
function init() {
parent::init();

$this->addField('name');
}
}

$m = new User($db, 'user');

try {
// apply migrator
(new \atk4\schema\Migration\MySQL($m))->migrate();


// ok, now we surely have DB!


$m->save([
'name'=>'John'.rand(1,100)
]);
} catch (\atk4\core\Exception $e) {
echo $e->getColorfulText();
}
5 changes: 1 addition & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<phpunit colors="true" bootstrap="vendor/autoload.php" printerClass="atk4\core\PHPUnit_AgileResultPrinter">
<php>
<var name="DB_DSN" value="sqlite::memory:" />
<var name="DB_USER" value="travis" />
<var name="DB_PASSWD" value="" />
<var name="DB_DBNAME" value="dsql_test" />
<env name="DSN" value="mysql://root:root@localhost/test3" />
</php>
<filter>
<blacklist>
Expand Down
Loading

0 comments on commit 5d0065a

Please sign in to comment.