Skip to content

Commit

Permalink
Merge pull request #53 from wol-soft/useInNestedReferences
Browse files Browse the repository at this point in the history
Transfer namespace decorators for nested references
  • Loading branch information
wol-soft committed Nov 30, 2021
2 parents fa8e278 + 103373a commit 913fd3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: composer install

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

- name: Upload the reports to coveralls.io
if: ${{ matrix.php == '8.0' }}
if: ${{ matrix.php == '7.4' }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload the reports to codeclimate
if: ${{ matrix.php == '8.0' }}
if: ${{ matrix.php == '7.4' }}
run: sudo ./cc-test-reporter after-build -r $CC_TEST_REPORTER_ID
env:
CC_TEST_REPORTER_ID: 5e32818628fac9eb11d34e2b35289f88169610cc4a98c6f170c74923342284f1
6 changes: 5 additions & 1 deletion src/PropertyProcessor/Property/ReferenceProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ public function process(string $propertyName, JsonSchema $propertySchema): Prope

if ($definition) {
if ($this->schema->getClassPath() !== $definition->getSchema()->getClassPath() ||
$this->schema->getClassName() !== $definition->getSchema()->getClassName()
$this->schema->getClassName() !== $definition->getSchema()->getClassName() ||
(
$this->schema->getClassPath() === 'ExternalSchema' &&
$definition->getSchema()->getClassPath() === 'ExternalSchema'
)
) {
$this->schema->addNamespaceTransferDecorator(
new SchemaNamespaceTransferDecorator($definition->getSchema())
Expand Down

0 comments on commit 913fd3b

Please sign in to comment.