Skip to content

Commit 0e64dfc

Browse files
committed
Merge branch 'move-to-salient'
2 parents eaf1fa0 + 40d64d7 commit 0e64dfc

File tree

276 files changed

+1212
-1224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+1212
-1224
lines changed

.gitattributes

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
/src/Toolkit/Core/Facade/Err.php linguist-generated
1717
/src/Toolkit/Core/Facade/Event.php linguist-generated
1818
/src/Toolkit/Core/Facade/Profile.php linguist-generated
19-
/src/Util/Curler/CurlerBuilder.php linguist-generated
20-
/src/Util/Curler/Support/CurlerPageBuilder.php linguist-generated
21-
/src/Util/Facade/Sync.php linguist-generated
22-
/src/Util/Sync/Support/DbSyncDefinitionBuilder.php linguist-generated
23-
/src/Util/Sync/Support/HttpSyncDefinitionBuilder.php linguist-generated
24-
/src/Util/Sync/Support/SyncErrorBuilder.php linguist-generated
25-
/src/Util/Sync/Support/SyncSerializeRulesBuilder.php linguist-generated
19+
/src/Toolkit/Core/Facade/Sync.php linguist-generated
20+
/src/Toolkit/Curler/CurlerBuilder.php linguist-generated
21+
/src/Toolkit/Curler/Support/CurlerPageBuilder.php linguist-generated
22+
/src/Toolkit/Sync/Support/DbSyncDefinitionBuilder.php linguist-generated
23+
/src/Toolkit/Sync/Support/HttpSyncDefinitionBuilder.php linguist-generated
24+
/src/Toolkit/Sync/Support/SyncErrorBuilder.php linguist-generated
25+
/src/Toolkit/Sync/Support/SyncSerializeRulesBuilder.php linguist-generated
2626
/tests export-ignore
2727
/tests/data/entity/albums.json linguist-generated
2828
/tests/data/entity/comments.json linguist-generated
@@ -33,16 +33,16 @@
3333
/tests/fixtures/Toolkit/Core/AbstractFacade/MyBrokenFacade.php linguist-generated
3434
/tests/fixtures/Toolkit/Core/AbstractFacade/MyClassFacade.php linguist-generated
3535
/tests/fixtures/Toolkit/Core/AbstractFacade/MyInterfaceFacade.php linguist-generated
36-
/tests/fixtures/Util/Sync/Entity/Album.php linguist-generated
37-
/tests/fixtures/Util/Sync/Entity/Comment.php linguist-generated
38-
/tests/fixtures/Util/Sync/Entity/Photo.php linguist-generated
39-
/tests/fixtures/Util/Sync/Entity/Post.php linguist-generated
40-
/tests/fixtures/Util/Sync/Entity/Provider/AlbumProvider.php linguist-generated
41-
/tests/fixtures/Util/Sync/Entity/Provider/CommentProvider.php linguist-generated
42-
/tests/fixtures/Util/Sync/Entity/Provider/PhotoProvider.php linguist-generated
43-
/tests/fixtures/Util/Sync/Entity/Provider/PostProvider.php linguist-generated
44-
/tests/fixtures/Util/Sync/Entity/Provider/TaskProvider.php linguist-generated
45-
/tests/fixtures/Util/Sync/Entity/Provider/UserProvider.php linguist-generated
46-
/tests/fixtures/Util/Sync/Entity/Task.php linguist-generated
47-
/tests/fixtures/Util/Sync/Entity/User.php linguist-generated
36+
/tests/fixtures/Toolkit/Sync/Entity/Album.php linguist-generated
37+
/tests/fixtures/Toolkit/Sync/Entity/Comment.php linguist-generated
38+
/tests/fixtures/Toolkit/Sync/Entity/Photo.php linguist-generated
39+
/tests/fixtures/Toolkit/Sync/Entity/Post.php linguist-generated
40+
/tests/fixtures/Toolkit/Sync/Entity/Provider/AlbumProvider.php linguist-generated
41+
/tests/fixtures/Toolkit/Sync/Entity/Provider/CommentProvider.php linguist-generated
42+
/tests/fixtures/Toolkit/Sync/Entity/Provider/PhotoProvider.php linguist-generated
43+
/tests/fixtures/Toolkit/Sync/Entity/Provider/PostProvider.php linguist-generated
44+
/tests/fixtures/Toolkit/Sync/Entity/Provider/TaskProvider.php linguist-generated
45+
/tests/fixtures/Toolkit/Sync/Entity/Provider/UserProvider.php linguist-generated
46+
/tests/fixtures/Toolkit/Sync/Entity/Task.php linguist-generated
47+
/tests/fixtures/Toolkit/Sync/Entity/User.php linguist-generated
4848
/tools export-ignore

.vscode/php.code-snippets

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,19 @@
55
"body": [
66
"<?php declare(strict_types=1);",
77
"",
8-
"namespace ${TM_DIRECTORY/^.*\\\\/src\\\\/(?:(Toolkit)|(Util))|^.*\\\\/(tests\\\\/(?:unit|fixtures|3rdparty)\\\\/(?:(Toolkit)|(Util)))|\\\\/([a-zA-Z0-9]+)/${1:+Salient}${4:+Salient}${2:+Lkrms}${5:+Lkrms}${3:+\\\\Tests}${6:+\\\\}$6/g};",
8+
"namespace ${TM_DIRECTORY/^.*\\\\/src\\\\/(Toolkit|(Sli))|^.*\\\\/(tests\\\\/(?:unit|fixtures|3rdparty)\\\\/(Toolkit|(Sli)))|\\\\/([a-zA-Z0-9]+)/${1:+Salient}${2:+\\\\Sli}${4:+Salient}${3:+\\\\Tests}${5:+\\\\Sli}${6:+\\\\}$6/g};",
99
"",
10-
"class ${TM_FILENAME_BASE/[^a-zA-Z0-9]+//g} {",
10+
"${RELATIVE_FILEPATH/(?:.*(?:(\\\\/Contract\\\\/.*|Interface\\.php$)|(\\\\/Concern\\\\/.*|Trait\\.php$))|(^(?:.(?!\\\\/(?:Contract|Concern)\\\\/|(?:Interface|Trait)\\.php$))*$))/${1:+interface}${2:+trait}${3:+class}/} ${TM_FILENAME_BASE/[^a-zA-Z0-9]+//g} {",
1111
" $0",
1212
"}",
1313
""
1414
]
15+
},
16+
"Namespace": {
17+
"scope": "php",
18+
"prefix": "namespace",
19+
"body": [
20+
"namespace ${TM_DIRECTORY/^.*\\\\/src\\\\/(Toolkit|(Sli))|^.*\\\\/(tests\\\\/(?:unit|fixtures|3rdparty)\\\\/(Toolkit|(Sli)))|\\\\/([a-zA-Z0-9]+)/${1:+Salient}${2:+\\\\Sli}${4:+Salient}${3:+\\\\Tests}${5:+\\\\Sli}${6:+\\\\}$6/g};"
21+
]
1522
}
1623
}

composer.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
},
4141
"autoload": {
4242
"psr-4": {
43-
"Lkrms\\": "src/Util/",
4443
"Salient\\": "src/Toolkit/"
4544
},
4645
"classmap": [
@@ -53,11 +52,6 @@
5352
"autoload-dev": {
5453
"psr-4": {
5554
"Lkrms\\LkUtil\\": "lk-util/",
56-
"Lkrms\\Tests\\": [
57-
"tests/unit/Util/",
58-
"tests/fixtures/Util/",
59-
"tests/3rdparty/Util/"
60-
],
6155
"Salient\\Tests\\": [
6256
"tests/unit/Toolkit/",
6357
"tests/fixtures/Toolkit/",

lk-util/Command/Generate/Concept/GenerateCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
namespace Lkrms\LkUtil\Command\Generate\Concept;
44

55
use Lkrms\LkUtil\Command\Concept\Command;
6-
use Lkrms\Support\PhpDoc\PhpDoc;
7-
use Lkrms\Support\PhpDoc\PhpDocTag;
8-
use Lkrms\Support\PhpDoc\PhpDocTemplateTag;
9-
use Lkrms\Support\TokenExtractor;
6+
use Lkrms\LkUtil\Support\TokenExtractor;
107
use Salient\Cli\Catalog\CliOptionType;
118
use Salient\Cli\Exception\CliInvalidArgumentsException;
129
use Salient\Cli\CliOption;
@@ -26,6 +23,9 @@
2623
use Salient\Core\AbstractProvider;
2724
use Salient\Core\Introspector;
2825
use Salient\Core\ProviderContext;
26+
use Salient\PhpDoc\PhpDoc;
27+
use Salient\PhpDoc\PhpDocTag;
28+
use Salient\PhpDoc\PhpDocTemplateTag;
2929
use SebastianBergmann\Diff\Output\StrictUnifiedDiffOutputBuilder;
3030
use SebastianBergmann\Diff\Differ;
3131
use ReflectionClass;

lk-util/Command/Generate/GenerateBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
use Lkrms\LkUtil\Catalog\EnvVar;
66
use Lkrms\LkUtil\Command\Generate\Concept\GenerateCommand;
7-
use Lkrms\Support\PhpDoc\PhpDoc;
8-
use Lkrms\Support\PhpDoc\PhpDocTemplateTag;
97
use Salient\Cli\Catalog\CliOptionType;
108
use Salient\Cli\CliOption;
119
use Salient\Core\Utility\Pcre;
@@ -14,6 +12,8 @@
1412
use Salient\Core\Utility\Test;
1513
use Salient\Core\AbstractBuilder;
1614
use Salient\Core\Introspector;
15+
use Salient\PhpDoc\PhpDoc;
16+
use Salient\PhpDoc\PhpDocTemplateTag;
1717
use Closure;
1818
use ReflectionMethod;
1919
use ReflectionParameter;

lk-util/Command/Generate/GenerateFacade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
use Lkrms\LkUtil\Catalog\EnvVar;
66
use Lkrms\LkUtil\Command\Generate\Concept\GenerateCommand;
7-
use Lkrms\Support\PhpDoc\PhpDoc;
87
use Salient\Cli\Catalog\CliOptionType;
98
use Salient\Cli\CliOption;
109
use Salient\Core\Utility\Arr;
1110
use Salient\Core\Utility\Reflect;
1211
use Salient\Core\AbstractFacade;
12+
use Salient\PhpDoc\PhpDoc;
1313
use ReflectionMethod;
1414
use ReflectionParameter;
1515

lk-util/Command/Generate/GenerateSyncEntity.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22

33
namespace Lkrms\LkUtil\Command\Generate;
44

5-
use Lkrms\Concern\HasParent;
6-
use Lkrms\Http\Catalog\HttpRequestMethod;
75
use Lkrms\LkUtil\Command\Generate\Concept\GenerateCommand;
8-
use Lkrms\Sync\Concept\HttpSyncProvider;
9-
use Lkrms\Sync\Concept\SyncEntity;
10-
use Lkrms\Sync\Support\DeferredEntity;
11-
use Lkrms\Sync\Support\DeferredRelationship;
126
use Salient\Cli\Catalog\CliOptionType;
137
use Salient\Cli\Catalog\CliOptionValueType;
148
use Salient\Cli\Exception\CliInvalidArgumentsException;
159
use Salient\Cli\CliOption;
1610
use Salient\Core\Catalog\Cardinality;
11+
use Salient\Core\Concern\TreeableTrait;
1712
use Salient\Core\Contract\Treeable;
1813
use Salient\Core\Utility\Arr;
1914
use Salient\Core\Utility\Get;
2015
use Salient\Core\Utility\Inflect;
2116
use Salient\Core\Utility\Pcre;
2217
use Salient\Core\Utility\Str;
18+
use Salient\Http\Catalog\HttpRequestMethod;
19+
use Salient\Sync\Concept\HttpSyncProvider;
20+
use Salient\Sync\Concept\SyncEntity;
21+
use Salient\Sync\Support\DeferredEntity;
22+
use Salient\Sync\Support\DeferredRelationship;
2323
use Closure;
2424
use DateTimeImmutable;
2525

@@ -221,7 +221,7 @@ protected function run(string ...$args)
221221
$this->Extends[] = $this->getFqcnAlias(SyncEntity::class);
222222
if ($this->ParentProperty !== null) {
223223
$this->Implements[] = $this->getFqcnAlias(Treeable::class);
224-
$this->Uses[] = $this->getFqcnAlias(HasParent::class);
224+
$this->Uses[] = $this->getFqcnAlias(TreeableTrait::class);
225225
}
226226

227227
if ($this->Description === null) {

lk-util/Command/Generate/GenerateSyncProvider.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
namespace Lkrms\LkUtil\Command\Generate;
44

5-
use Lkrms\Facade\Sync;
65
use Lkrms\LkUtil\Command\Generate\Concept\GenerateCommand;
7-
use Lkrms\Sync\Catalog\SyncOperation;
8-
use Lkrms\Sync\Contract\ISyncContext;
9-
use Lkrms\Sync\Contract\ISyncEntity;
10-
use Lkrms\Sync\Contract\ISyncProvider;
11-
use Lkrms\Sync\Support\SyncIntrospector;
126
use Salient\Cli\Catalog\CliOptionType;
137
use Salient\Cli\Exception\CliInvalidArgumentsException;
148
use Salient\Cli\CliOption;
9+
use Salient\Core\Facade\Sync;
1510
use Salient\Core\Utility\Arr;
1611
use Salient\Core\Utility\Str;
12+
use Salient\Sync\Catalog\SyncOperation;
13+
use Salient\Sync\Contract\ISyncContext;
14+
use Salient\Sync\Contract\ISyncEntity;
15+
use Salient\Sync\Contract\ISyncProvider;
16+
use Salient\Sync\Support\SyncIntrospector;
1717

1818
/**
1919
* Generates provider interfaces for sync entities

lk-util/Command/Generate/GenerateTests.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,26 @@ protected function run(string ...$args)
9696
$classPrefix = $this->getClassPrefix();
9797

9898
// Search for the most appropriate `TestCase` to extend, e.g. for
99-
// `Lkrms\Tests\Sync\Command\GetSyncEntitiesTest`, try:
99+
// `Salient\Tests\Sync\Command\GetSyncEntitiesTest`, try:
100100
//
101-
// - `Lkrms\Tests\Sync\Command\CommandTestCase` (generality: 0)
102-
// - `Lkrms\Tests\Sync\Command\TestCase` (generality: 1)
103-
// - `Lkrms\Tests\Sync\CommandTestCase` (generality: 0)
104-
// - `Lkrms\Tests\Sync\SyncTestCase` (generality: 1)
105-
// - `Lkrms\Tests\Sync\TestCase` (generality: 2)
106-
// - `Lkrms\Tests\CommandTestCase` (generality: 0)
107-
// - `Lkrms\Tests\SyncTestCase` (generality: 1)
108-
// - `Lkrms\Tests\TestsTestCase` (generality: 2)
109-
// - `Lkrms\Tests\TestCase` (generality: 3)
110-
// - `Lkrms\CommandTestCase `(generality: 0) <==
111-
// - `Lkrms\SyncTestCase` (generality: 1)
112-
// - `Lkrms\TestsTestCase` (generality: 2)
113-
// - `Lkrms\LkrmsTestCase` (generality: 3)
114-
// - `Lkrms\TestCase` (generality: 4)
101+
// - `Salient\Tests\Sync\Command\CommandTestCase` (generality: 0)
102+
// - `Salient\Tests\Sync\Command\TestCase` (generality: 1)
103+
// - `Salient\Tests\Sync\CommandTestCase` (generality: 0)
104+
// - `Salient\Tests\Sync\SyncTestCase` (generality: 1)
105+
// - `Salient\Tests\Sync\TestCase` (generality: 2)
106+
// - `Salient\Tests\CommandTestCase` (generality: 0)
107+
// - `Salient\Tests\SyncTestCase` (generality: 1)
108+
// - `Salient\Tests\TestsTestCase` (generality: 2)
109+
// - `Salient\Tests\TestCase` (generality: 3)
110+
// - `Salient\CommandTestCase `(generality: 0) <==
111+
// - `Salient\SyncTestCase` (generality: 1)
112+
// - `Salient\TestsTestCase` (generality: 2)
113+
// - `Salient\SalientTestCase` (generality: 3)
114+
// - `Salient\TestCase` (generality: 4)
115115
//
116116
// Preference is given to the `TestCase` with the lowest generality, so
117-
// in this example, `Lkrms\CommandTestCase` is extended instead of
118-
// `Lkrms\Tests\Sync\SyncTestCase`. If multiple classes have the same
117+
// in this example, `Salient\CommandTestCase` is extended instead of
118+
// `Salient\Tests\Sync\SyncTestCase`. If multiple classes have the same
119119
// generality, preference is given to the first encountered.
120120

121121
$extends = null;

lk-util/Command/Http/SendHttpRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
namespace Lkrms\LkUtil\Command\Http;
44

5-
use Lkrms\Http\Catalog\HttpRequestMethod;
65
use Lkrms\LkUtil\Command\Concept\Command;
7-
use Lkrms\Sync\Concept\HttpSyncProvider;
86
use Salient\Cli\Catalog\CliOptionType;
97
use Salient\Cli\Catalog\CliOptionValueType;
108
use Salient\Cli\CliOption;
@@ -13,6 +11,8 @@
1311
use Salient\Core\Utility\Get;
1412
use Salient\Core\Utility\Json;
1513
use Salient\Core\Utility\Str;
14+
use Salient\Http\Catalog\HttpRequestMethod;
15+
use Salient\Sync\Concept\HttpSyncProvider;
1616

1717
/**
1818
* Sends HTTP requests to HTTP sync providers

0 commit comments

Comments
 (0)