Remove deprecated traits, classes, methods, directives, various options and cruft #435
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a large cleanup PR that removes behaviour that was kept in Lighthouse for compatibility reasons.
Now that we are nearing a v3, we can clean up our code and lay a more solid foundation for the continued development of Lighthouse. The changes made have a number of benefits:
I will outline the changes in the description below. Some of the changes do only affect internals, others are cosmetic in nature - only a few will actually affect users.
Remove the user mutations from the default schema
They were not working properly and thus are more likely to cause confusion then to help.
Non-breaking, as the default schema is just a starting point.
Remove introspection queries from assets
They were not used in any way and are very easy to get outdated. Having them in this repo is not the right place.
Non-breaking as they are just random text-files that were not actively used for anything.
Remove deprecated methods
Removed methods that were either renamed, moved somewhere else or made obsolete by utilizing proper Laravel DI.
All of those have been marked as deprecated for quite a few releases. Alternatives have been suggested in the
@deprecated
PHPDoc. Mostly internals are affected.Limit the
@field
directive to using the resolver argumentThe old style of using seperate
class
andmethod
arguments is now no longer supported.The docs are using the
resolver
argument exclusively, so few users should be affected.It is simple to migrate:
turns into this:
You just have to search-and-replace in most cases:
@field(class:
->@field(resolver:
" method: "
->@
Remove the
@security
directiveWas removed from the docs a while ago in favour of defining docs via the config.
Remove the
resolver
argument from@interface
and@union
It has been renamed to
resolveType
which makes it more clear at what the function is supposed to do and leaves less room for confusion. Again, a simple search-and-replace should suffice for any users that still have the old syntax:@interface(resolver:
->@interface(resolveType:
@union(resolver:
->@union(resolveType:
Remove the majority of Traits
They have all been marked deprecated for a while and a lot of them have even been in a non-functional state. Their usage has been for internal purposes, alternatives were mentioned in the
@deprecated
PHPDoc.