Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
67dd002
feat: added a few analyzers
ymauray May 30, 2024
4c31c09
fix: type hints and other changes, from static analyzers
ymauray May 30, 2024
2943e8e
fix: removed shebang.
ymauray May 30, 2024
5f96016
feat: ignore vscode files
ymauray May 30, 2024
ab08725
chore: version
ymauray May 30, 2024
667c615
feat: added a few analyzers
ymauray May 30, 2024
bac7a83
fix: type hints and other changes, from static analyzers
ymauray May 30, 2024
f05d3d6
fix: removed shebang.
ymauray May 30, 2024
eaaee71
feat: ignore vscode files
ymauray May 30, 2024
4155ec2
chore: version
ymauray May 30, 2024
97bfd72
fix: typo
ymauray May 30, 2024
b9668b5
fix: misuse of Finder.
ymauray May 30, 2024
c9f5233
fix: wrong SplFileInfo used
ymauray May 30, 2024
65a37bf
fix: removed forgotten error log
ymauray May 30, 2024
db5fdd6
fix: wrong type hint
ymauray May 30, 2024
2ec4948
feat: upgraded dependecies
ymauray May 30, 2024
81d7305
feat: upgraded phpunit and all tests
ymauray May 30, 2024
5bbabd7
Merge branch 'php81'
ymauray May 30, 2024
db70b73
feat: github action to run unit tests on push
ymauray May 30, 2024
33a4d33
fix: github action
ymauray May 30, 2024
09dd15d
fix: un-ignore phpunit.xml
ymauray May 30, 2024
090d04a
feat: more checks in github action.
ymauray May 31, 2024
835109f
fix: version number in composer.json
ymauray May 31, 2024
79a8a85
feat: add a progress bar while building phar. do not include dev deps.
ymauray May 31, 2024
2c60a07
fix: do not include binaray in source, move it to github releases
ymauray May 31, 2024
7e9930e
fix: ignore dbup.phar
ymauray May 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on: [push]

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4.1.6
- name: Composer (php-actions)
uses: php-actions/composer@v6
- name: PHP Static Analysis
uses: php-actions/composer@v6
with:
command: phpstan
- name: PHP Check style
uses: php-actions/composer@v6
with:
command: phpcs
- name: PHP Mess detector
uses: php-actions/composer@v6
with:
command: phpmd
- name: PHP Unit tests
uses: php-actions/composer@v6
with:
command: phpunit
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
/sql/*
/.dbup/*
/.idea/*
/.vscode/*
/.DS_Store
/phpunit.phar
/composer.phar
/php-cs-fixer.phar
/phpunit.xml
/composer.lock

.phpunit.result.cache

.phpunit.cache/

dbup.phar
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
CHANGELOG
=========

* 0.6 (2024-05-30)

* 220e42d feat: added a few analyzers
* fe92f76 fix: type hints and other changes, from static analyzers

* 0.5 (2014-10-06)

* c44b0f8 Fix url of phpunit.phar
* 327bbf1 Option --ini is optional in CreateCommand.
* 4bdd259 Fixing timstamp pattern to day with leading zeros in CreateCommand.
Expand Down
36 changes: 26 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"name": "brtriver/dbup",
"version": "0.6",
"description": "simple migration tool with PDO",
"keywords": ["migration", "database"],
"homepage": "http://1ms.jp/",
"type": "library",
"require": {
"php": ">=5.4.0",
"php": ">=8.1.0",
"ext-pdo": "*",
"symfony/console": "~2.5.0",
"symfony/finder": "~2.5.0",
"symfony/event-dispatcher": "~2.5.0"
"symfony/console": "^3.2",
"symfony/finder": "^7.0",
"symfony/event-dispatcher": "^3.2"
},
"require-dev": {
"phpunit/phpunit": "4.2.*",
"phake/phake": "v1.0.3",
"hamcrest/hamcrest-php": "1.2.0"
"phpunit/phpunit": "^11.1",
"phake/phake": "^4.5",
"hamcrest/hamcrest-php": "^2.0",
"phpstan/phpstan": "^1.11",
"squizlabs/php_codesniffer": "^3.10",
"phpmd/phpmd": "^2.15"
},
"suggest": {
"ext-pdo-mysql": "In order to use ikou with MySQL databases.",
Expand All @@ -29,7 +33,19 @@
}
],
"autoload": {
"psr-0": { "Dbup": "src/" }
"psr-0": {
"Dbup": [
"src/",
"tests/"
]
}
},
"bin": ["dbup"]
}
"bin": ["dbup"],
"scripts": {
"phpstan" : "vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=-1",
"phpcs" : "vendor/bin/phpcs --standard=phpcs.xml --no-cache -s -n --file-list=phpcs.list",
"phpcbf" : "vendor/bin/phpcbf --standard=PSR12 --file-list=phpcs.list",
"phpmd" : "vendor/bin/phpmd --ignore-violations-on-exit src,dbup text phpmd.xml",
"phpunit" : "vendor/bin/phpunit"
}
}
1 change: 0 additions & 1 deletion dbup
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env php
<?php
// bin/dbup

Expand Down
Binary file removed dbup.phar
Binary file not shown.
2 changes: 2 additions & 0 deletions phpcs.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src
dbup
14 changes: 14 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<ruleset name="dbup">
<description>dbup coding standard based on PSR12.</description>

<!-- Include the whole Zend standard -->
<rule ref="PSR12" >
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
<exclude name="Squiz.Scope.MethodScope.Missing" />
<exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing" />
<exclude name="Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase" />
<exclude name="PSR12.Files.FileHeader.IncorrectOrder" />
<exclude name="PSR2.Classes.PropertyDeclaration.VarUsed" />
</rule>
</ruleset>
16 changes: 16 additions & 0 deletions phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<ruleset name="dbup rule set"
xmlns="https://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="https://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
dbup rules for PHP Mess Detector
</description>
<!-- Import the entire unused code rule set -->
<rule ref="rulesets/cleancode.xml">
<exclude name="StaticAccess" />
<exclude name="ElseExpression" />
<exclude name="BooleanArgumentFlag" />
</rule>
</ruleset>
6 changes: 6 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
phpVersion: 80100
level: 4
paths:
- src
- dbup
16 changes: 16 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.1/phpunit.xsd"
backupGlobals="false"
colors="false"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<testsuites>
<testsuite name="Dbup Test Suite">
<directory>./tests/Dbup/</directory>
</testsuite>
</testsuites>
</phpunit>
24 changes: 0 additions & 24 deletions phpunit.xml.dist

This file was deleted.

Loading