Skip to content

Commit 7e9480b

Browse files
committed
remove objective-php dependency by cloning interfaces, clean tests
1 parent 681e4ba commit 7e9480b

24 files changed

+86
-732
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
vendor/
44
tests/_output
55
composer.lock
6-
tests/_support/*
6+
tests/_support/_generated/*

codeception.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1+
namespace: Tests\Fei\Entities
2+
13
actor: Tester
4+
25
paths:
36
tests: tests
47
log: tests/_output
58
data: tests/_data
69
support: tests/_support
710
envs: tests/_envs
11+
812
settings:
913
colors: true
1014
memory_limit: 1024M
15+
1116
extensions:
1217
enabled:
1318
- Codeception\Extension\RunFailed
14-
modules:
15-
config:
16-
Db:
17-
dsn: ''
18-
user: ''
19-
password: ''
20-
dump: tests/_data/dump.sql
19+
20+
bootstrap: bootstrap.php
21+
2122
coverage:
2223
enabled: true
2324
remote: false

composer.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,28 @@
1212
],
1313
"require": {
1414
"php" : "^7.0",
15-
"zendframework/zend-filter": "^2.7",
16-
"objective-php/gateway": "^1.0.0"
15+
"zendframework/zend-filter": "^2.7"
1716
},
1817
"require-dev": {
1918
"zendframework/zend-eventmanager": "^3.2",
2019
"zendframework/zend-servicemanager": "^3.3",
2120
"zendframework/zend-hydrator": "^2.2",
2221
"league/fractal": "^0.13.0",
2322
"squizlabs/php_codesniffer": "3.*",
24-
"codeception/codeception": "^2.4"
23+
"codeception/codeception": "^4.1"
2524
},
2625
"autoload": {
26+
"files": [
27+
"objective-php-polyfill.php"
28+
],
2729
"psr-4": {
2830
"Fei\\Entities\\": "src/"
2931
}
32+
},
33+
"autoload-dev": {
34+
"psr-4": {
35+
"Tests\\Fei\\Entities\\": "tests/_support",
36+
"Tests\\Fei\\Entities\\Hydrator\\": "tests/unit/Hydrator"
37+
}
3038
}
3139
}

objective-php-polyfill.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
if (!interface_exists('ObjectivePHP\Gateway\Entity\EntityInterface')) {
4+
class_alias('Fei\Entities\ObjectivePHP\Gateway\Entity\EntityInterface', 'ObjectivePHP\Gateway\Entity\EntityInterface');
5+
}
6+
7+
if (!interface_exists('ObjectivePHP\Gateway\Hydrator\DenormalizedDataExtractorInterface')) {
8+
class_alias('Fei\Entities\ObjectivePHP\Gateway\Hydrator\DenormalizedDataExtractorInterface', 'ObjectivePHP\Gateway\Hydrator\DenormalizedDataExtractorInterface');
9+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Fei\Entities\ObjectivePHP\Gateway\Entity;
4+
5+
interface EntityInterface extends \ArrayAccess
6+
{
7+
const DEFAULT_ENTITY_COLLECTION = 'NONE';
8+
9+
public function getEntityCollection() : string;
10+
11+
public function getEntityIdentifier() : string;
12+
13+
public function isNew() : bool;
14+
15+
public function getEntityFields() : array;
16+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Fei\Entities\ObjectivePHP\Gateway\Hydrator;
4+
5+
interface DenormalizedDataExtractorInterface
6+
{
7+
public function extractDenormalized($entity);
8+
9+
public function denormalizeData(array $data): array;
10+
}

tests/_bootstrap.php

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/_data/dump.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/_support/AcceptanceTester.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/_support/FunctionalTester.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)