Commit 8078bc2
Bring input setters on par with type getters (#466)
* Fixed incorrect mapping causing input types to be undiscovered during recursive type mapping
* Treat "Input" as a "type" for AnnotationReader
* Use TypeInterface for return typing
* Further interface implementation
* Default to true, regardless of name attribute - following @type implementation
* Ensure the mapping has the type name as well
* CS fixes
* Fixed tests
* Handle Input type processing in RecursiveTypeMapper
* Default value is null
* Resolve PHPStan error
* Resolved PHPStan errors
* Revert default logic to avoid default attribute requirements
* CS fixes
* Added additional clarity to docs on @input annotation
* Removed superfluous annotation name
* Remove temporary phpunit group annotation
* Add experimental setter equivalent to getter functionality for fields
setters are not yet called if Field Attribute is only on class property
* add .idea
* add missing naming strategy for input type
* added simple inputType unit test with field annotation on setter instead of property
* Add TrickyProduct Model for e2e test
* exclude fields from type if the method begins with set*
* Add Constructor and Getter
* Add Query and Mutations for TrickyProduct
* remove redundant field annotation from model
* call setter even if property is already set via constructor
* add autowired service to setter
* add UseInputType annotation
* add test for model with autowire on setter
* Bump codecov/codecov-action from 2.1.0 to 3.0.0 (#459)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](codecov/codecov-action@v2.1.0...v3.0.0)
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Default to true, regardless of name attribute - following @type implementation
* Resolved PHPStan errors
* Revert default logic to avoid default attribute requirements
* cloned fild middleware for inputs
cloned QueryFieldDescriptor for input fields
changed InputType to handle InputFields
* reused InputTypeProperty for property based argument resolution
added Input Resolver for Property and MagicProperty
fixed up default and isUpdate behaviour
cleaned up description having ugly new lines on all field properties if its pulled from the dockblock
* added clones of authorization and security middlewares for inputs
* fix authorization input middleware to not throw an error on inspection but only on field resolution
* add test for model with autowire on setter and security
* phpstan cleanup
* fix typings arround input field middleware
* fix default values in InputFieldDescriptor so the middleware tests can run using it
* fix strange intersection type issue on InputFieldDescriptor
* fix strange intersection type issue on InputFieldDescriptor (1)
* fix strange intersection type issue on InputFieldDescriptor (2)
* satisfy phpstan with typing that phpstorm doesn't like..
* satisfy phpstan with typing that phpstorm doesn't like..
* satisfy phpstan with typing that phpstorm doesn't like..
* make sure input type is using callable
* allow "inputType" property on "Field" Attribute to overwrite nullability of "update" property on "Input" Attribut
* making sure "set" prefixed methods are only skipped for fields, previously query and mutations would have been skipped too.
* minor cleanup and additional codecoverage
* changed field resolution for input types to be properly lazy.
should prevent crash on circular
* removing unused code
* reverted duplicate field exception to not throw and just overwrite previously definded fields.
this makes multiple field definitions behave the same as before
* add test for model with array field
* fixed return of resolve to actually return the value so it can be asserted to be the correct type
* Added test for Input construction and property hydration
* fixed inputFields property should be initialized as empty array
* freeze and getFields has to be called on InputType in the test
* made test not fail
* handle constructor set properties with more care.
instanciation happens with properly resolved parameters now
* detect constructor hydrated fields early and prevent middleware functionallity on those.
* minor cleanup
* fixed all coding style issues pointed out in review
* Added comments and resolved remaining requested changes
* CS fixes
* CS fixes
* Test removing Symfony v4 for PHP 8 support
* Require ecodev/graphql-upload 6.1.3 for PHP 8.1 support
* Do not ignore platform-reqs with Composer on CI
* Allow 6.1 of ecodev/graphql-upload for PHP 7.4 and 8.0 support
Co-authored-by: Jacob Thomason <jacob@thomason.xxx>
Co-authored-by: Rico Good <rgo@exigo.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: eldr0n <38736006+eldr0n@users.noreply.github.com>1 parent 4fcbb74 commit 8078bc2
File tree
39 files changed
+2398
-146
lines changed- .github/workflows
- src
- Annotations/Exceptions
- Mappers
- Middlewares
- Types
- tests
- Fixtures
- CircularInputReference
- Controllers
- Types
- Inputs
- Integration
- Controllers
- Models
- Integration
- Middlewares
- Types
39 files changed
+2398
-146
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 59 | | |
66 | 60 | | |
67 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
0 commit comments