Skip to content

Commit

Permalink
Refactor several APIs to improve stability
Browse files Browse the repository at this point in the history
Allow Behat smoke test failures for now

Upstream is broken, and it's out of our control to fix
(Chrome bug) - see silverstripe/silverstripe-asset-admin#1163

ENHANCEMENT: Code gen stores entire config array

Context provider refactor

Refactor nested plugins as a service

Get rid of build state

Get builds working

Sorting and filtering working with new context providers

simplify dataobject resolve, get rid of default resolvers

Rebase, tests passing

New ResolverFailure, resolverComposition for better error handling

Fix schema context psr-4, queryhandlerinterface contract

Fix aliases in create/update, add massive integration test

Linting
  • Loading branch information
chillu authored and Aaron Carlino committed Jan 27, 2021
1 parent 1c6408a commit a5302fe
Show file tree
Hide file tree
Showing 75 changed files with 2,441 additions and 1,324 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ matrix:
env: DB=MYSQL PDO=1 PHPUNIT_COVERAGE_TEST=1
- php: 7.4
env: DB=MYSQL PHPUNIT_TEST=1
- php: 7.3
env: DB=MYSQL BEHAT_TEST=1
# TODO https://github.com/silverstripe/silverstripe-asset-admin/issues/1163
allow_failures: true
- php: 7.3
env: DB=MYSQL ASSETADMIN_TEST=1
# TODO https://github.com/silverstripe/silverstripe-asset-admin/issues/1163
Expand Down
4 changes: 0 additions & 4 deletions _config/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@ SilverStripe\Assets\File:
document:
- graphql

SilverStripe\Core\Injector\Injector:
SilverStripe\GraphQL\Controller:
properties:
assetHandler: '%$SilverStripe\Assets\Storage\GeneratedAssetHandler'
3 changes: 0 additions & 3 deletions _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ SilverStripe\Core\Injector\Injector:
properties:
rootDir: '`BASE_PATH`'

SilverStripe\GraphQL\Controller:
extensions:
- SilverStripe\GraphQL\Extensions\IntrospectionProvider
SilverStripe\GraphQL\Schema\Schema:
schemas: []
---
Expand Down
7 changes: 7 additions & 0 deletions _config/events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SilverStripe\Core\Injector\Injector:
SilverStripe\EventDispatcher\Dispatch\Dispatcher:
properties:
handlers:
graphqlTranscribe:
on: [ graphqlSchemaBuild ]
handler: '%$SilverStripe\GraphQL\Schema\Services\SchemaTranscribeHandler'
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"require": {
"silverstripe/framework": "^4",
"silverstripe/vendor-plugin": "^1.0",
"webonyx/graphql-php": "^14.0"
"webonyx/graphql-php": "^14.0",
"silverstripe/event-dispatcher": "^0.1.0"
},
"require-dev": {
"sminnee/phpunit": "^5.7",
Expand Down
10 changes: 9 additions & 1 deletion src/Config/AbstractConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function get($path, $default = null)
* @return $this
* @throws SchemaBuilderException
*/
public function set($path, $value)
public function set($path, $value): self
{
if (is_string($path)) {
$path = explode('.', $path);
Expand Down Expand Up @@ -92,4 +92,12 @@ public function apply(array $settings): self

return $this;
}

/**
* @return array
*/
public function toArray(): array
{
return $this->settings;
}
}
Loading

0 comments on commit a5302fe

Please sign in to comment.