Skip to content

Commit 913fd3b

Browse files
authored
Merge pull request #53 from wol-soft/useInNestedReferences
Transfer namespace decorators for nested references
2 parents fa8e278 + 103373a commit 913fd3b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: composer install
2626

2727
- name: Prepare codeclimate test reporter
28-
if: ${{ matrix.php == '8.0' }}
28+
if: ${{ matrix.php == '7.4' }}
2929
run: |
3030
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
3131
chmod +x ./cc-test-reporter
@@ -35,15 +35,15 @@ jobs:
3535
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --testdox
3636

3737
- name: Upload the reports to coveralls.io
38-
if: ${{ matrix.php == '8.0' }}
38+
if: ${{ matrix.php == '7.4' }}
3939
run: |
4040
composer global require php-coveralls/php-coveralls
4141
php-coveralls -v
4242
env:
4343
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444

4545
- name: Upload the reports to codeclimate
46-
if: ${{ matrix.php == '8.0' }}
46+
if: ${{ matrix.php == '7.4' }}
4747
run: sudo ./cc-test-reporter after-build -r $CC_TEST_REPORTER_ID
4848
env:
4949
CC_TEST_REPORTER_ID: 5e32818628fac9eb11d34e2b35289f88169610cc4a98c6f170c74923342284f1

src/PropertyProcessor/Property/ReferenceProcessor.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ public function process(string $propertyName, JsonSchema $propertySchema): Prope
3333

3434
if ($definition) {
3535
if ($this->schema->getClassPath() !== $definition->getSchema()->getClassPath() ||
36-
$this->schema->getClassName() !== $definition->getSchema()->getClassName()
36+
$this->schema->getClassName() !== $definition->getSchema()->getClassName() ||
37+
(
38+
$this->schema->getClassPath() === 'ExternalSchema' &&
39+
$definition->getSchema()->getClassPath() === 'ExternalSchema'
40+
)
3741
) {
3842
$this->schema->addNamespaceTransferDecorator(
3943
new SchemaNamespaceTransferDecorator($definition->getSchema())

0 commit comments

Comments
 (0)