Skip to content

Commit 3f6e3eb

Browse files
committed
Migrate to plaisio/kernel 3.0.
1 parent 12f0426 commit 3f6e3eb

21 files changed

+100
-103
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/bin/
44
/composer.lock
55
/doc/
6-
/test/C.php
76
/test/TestDataLayer.php
87
/test/coverage.xml
98
/test/etc/columns.txt

.scrutinizer.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
build:
2-
dependencies:
3-
before:
4-
- cp test/C.txt test/C.php
5-
62
environment:
73
mysql: 5.7
84

95
tests:
6+
before:
7+
- export PLAISIO_CONFIG_DIR=test
8+
- ./bin/phing kernel
109
override:
1110
- command: './bin/phing unit'
1211
coverage:
1312
file: 'test/coverage.xml'
1413
format: 'php-clover'
15-

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ before_install:
1515

1616
install:
1717
- composer self-update
18-
- cp test/C.txt test/C.php
1918
- composer update
2019

2120
script:

build.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,25 @@
44
<exec command="composer update" checkreturn="true" passthru="true"/>
55
</target>
66

7+
<target name="kernel">
8+
<exec executable="bin/plaisio" checkreturn="true" passthru="true">
9+
<arg value="--ansi"/>
10+
<arg value="plaisio:kernel-data-layer-type"/>
11+
</exec>
12+
<exec executable="bin/plaisio" checkreturn="true" passthru="true">
13+
<arg value="--ansi"/>
14+
<arg value="plaisio:kernel-properties"/>
15+
</exec>
16+
</target>
17+
718
<!-- Runs all unit tests -->
819
<target name="unit">
9-
<copy file="test/C.txt" tofile="test/C.php" haltonerror="false"/>
1020
<exec command="cat test/ddl/0010_create_database.sql | mysql -v -u root" passthru="true" checkreturn="true"/>
1121
<exec command="cat test/ddl/0020_create_user.sql | mysql -v -u root" passthru="true" checkreturn="true"/>
1222
<exec command="cat test/ddl/0300_abc_auth_company.sql | mysql -v -u root test" passthru="true" checkreturn="true"/>
1323
<exec command="cat lib/ddl/0100_create_tables.sql | mysql -v -u root test" passthru="true" checkreturn="true"/>
1424
<exec command="bin/stratum stratum test/etc/stratum.ini" passthru="true" checkreturn="true"/>
1525
<exec command="bin/phpunit" passthru="true" checkreturn="true"/>
16-
<copy file="test/C.php" tofile="test/C.txt" haltonerror="true"/>
1726
</target>
1827
<target name="build"/>
1928
</project>

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
"license": "MIT",
99
"require": {
1010
"php": ">=7.3",
11-
"plaisio/blob-store": "^1.1",
12-
"plaisio/kernel": "^2.0",
11+
"plaisio/blob-store": "^1.2",
12+
"plaisio/company-resolver": "^2.0",
13+
"plaisio/kernel": "^3.0",
1314
"setbased/helper-program-execution": "^1.1"
1415
},
1516
"require-dev": {
1617
"phing/phing": "^2.0",
1718
"phpunit/phpunit": "^9.0",
18-
"plaisio/company-resolver-uni": "^1.1",
19+
"plaisio/company-resolver-uni": "^2.0",
20+
"plaisio/console": "^2.0",
1921
"setbased/php-stratum": "^6.0",
2022
"setbased/php-stratum-mysql": "^5.0"
2123
},

lib/psql/abc_blob/abc_blob_del_blob.psql renamed to lib/psql/abc_blob_store_blob/abc_blob_store_blob_del_blob.psql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* @param p_cmp_id The ID of the company (safeguard).
55
* @param p_blb_id The ID of the BLOB.
66
*/
7-
create procedure abc_blob_del_blob( in p_cmp_id @abc_blob.cmp_id%type@,
8-
in p_blb_id @abc_blob.blb_id%type@ )
7+
create procedure abc_blob_store_blob_del_blob(in p_cmp_id @abc_blob.cmp_id%type@,
8+
in p_blb_id @abc_blob.blb_id%type@)
99
modifies sql data
1010
-- type: none
1111
begin

lib/psql/abc_blob/abc_blob_get_blob.psql renamed to lib/psql/abc_blob_store_blob/abc_blob_store_blob_get_blob.psql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* @param p_cmp_id The ID of the company (safeguard).
55
* @param p_blb_id The ID of the BLOB.
66
*/
7-
create procedure abc_blob_get_blob( in p_cmp_id @abc_blob.cmp_id%type@,
8-
in p_blb_id @abc_blob.blb_id%type@ )
7+
create procedure abc_blob_store_blob_get_blob(in p_cmp_id @abc_blob.cmp_id%type@,
8+
in p_blb_id @abc_blob.blb_id%type@)
99
reads sql data
1010
-- type: row1
1111
begin

lib/psql/abc_blob/abc_blob_get_metadata.psql renamed to lib/psql/abc_blob_store_blob/abc_blob_store_blob_get_metadata.psql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* @param p_cmp_id The ID of the company (safeguard).
55
* @param p_blb_id The ID of the BLOB.
66
*/
7-
create procedure abc_blob_get_metadata( in p_cmp_id @abc_blob.cmp_id%type@,
8-
in p_blb_id @abc_blob.blb_id%type@ )
7+
create procedure abc_blob_store_blob_get_metadata(in p_cmp_id @abc_blob.cmp_id%type@,
8+
in p_blb_id @abc_blob.blb_id%type@)
99
reads sql data
1010
-- type: row1
1111
begin

lib/psql/abc_blob/abc_blob_get_metadata_by_md5.psql renamed to lib/psql/abc_blob_store_blob/abc_blob_store_blob_get_metadata_by_md5.psql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* @param p_cmp_id The ID of the company (safeguard).
55
* @param p_blb_md5 The MD5 hash.
66
*/
7-
create procedure abc_blob_get_metadata_by_md5(in p_cmp_id @abc_blob.cmp_id%type@,
8-
in p_blb_md5 varchar(32))
7+
create procedure abc_blob_store_blob_get_metadata_by_md5(in p_cmp_id @abc_blob.cmp_id%type@,
8+
in p_blb_md5 varchar(32))
99
reads sql data
1010
-- type: rows
1111
begin

lib/psql/abc_blob/abc_blob_insert_blob.psql renamed to lib/psql/abc_blob_store_blob/abc_blob_store_blob_insert_blob.psql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
* @param p_blb_timestamp The lats modification time of the BLOB. Defaults to now().
99
* @param p_bdt_data The actual BLOB.
1010
*/
11-
create procedure abc_blob_insert_blob( in p_cmp_id @abc_blob.cmp_id%type@,
12-
in p_blb_filename @abc_blob.blb_filename%type@,
13-
in p_blb_mime_type @abc_blob.blb_mime_type%type@,
14-
in p_blb_timestamp @abc_blob.blb_timestamp%type@,
15-
in p_bdt_data @abc_blob_data.bdt_data%type@ )
11+
create procedure abc_blob_store_blob_insert_blob(in p_cmp_id @abc_blob.cmp_id%type@,
12+
in p_blb_filename @abc_blob.blb_filename%type@,
13+
in p_blb_mime_type @abc_blob.blb_mime_type%type@,
14+
in p_blb_timestamp @abc_blob.blb_timestamp%type@,
15+
in p_bdt_data @abc_blob_data.bdt_data%type@)
1616
modifies sql data
1717
-- type: none
1818
begin
@@ -90,6 +90,6 @@ begin
9090
;
9191

9292
-- select last_insert_id() blb_id;
93-
-- Retrieve blb_id using abc_blob_workaround.
93+
-- Retrieve blb_id using abc_blob_store_blob_workaround.
9494
set @blb_id = last_insert_id();
9595
end

0 commit comments

Comments
 (0)