Skip to content

Releases: LastDragon-ru/php-packages

SchemaPrinter improvements/fixes

13 Mar 09:51
0.13.0
44cae2a

Choose a tag to compare

Breaking changes

Features

  • graphql/SchemaPrinter: DirectiveResolver::getDefinitions() will also return standard directives (to be consistent with types). (633571b) ☣
  • graphql/SchemaPrinter: GraphQLExpectedSchema can define own Settings. (d6bae80)
  • graphql/SchemaPrinter: IntrospectionPrinter will return only introspection types as unused. (0601bb8)
  • graphql/SchemaPrinter: PrintedSchema::getUnusedTypes() will also return standard types. (3402e22)
  • graphql/SchemaPrinter: SchemaPrinter will use DirectiveFilter for standard directives too. (e33f957) ☣
  • graphql/SchemaPrinter: Added PrintedSchema contract. (2604f35)
  • graphql/SchemaPrinter: Added PrintedSchema::getUnusedDirectives() that will return all unused directives. (d1a8130)
  • graphql/SchemaPrinter: Added Settings::getDirectiveDefinitionFilter() that allow exclude Directive Definitions. (6583742) ☣
  • graphql/SchemaPrinter: Added Settings::getTypeDefinitionFilter() that allows filter out type definitions. (504a252) ☣
  • graphql: GraphQLAssertions::assertGraphQLSchemaEquals() update to allow PrintedSchema and Schema as $expected. (bbff36b) ☣

Bug Fixes

  • graphql/@sortBy: _ will work with @paginate. (ca43d21), closes #12
  • graphql/SchemaPrinter: GraphQLAssertions::assertGraphQLSchemaEquals() will not interpret empty used/unused types/directives lists as "skip assert" (assertion will be skipped only if null). (b722c1c) ☣
  • graphql/SchemaPrinter: GraphQLAssertions::assertGraphQLSchemaEquals() will not print expected schema when not necessary. (1cffe6a)
  • testing: registration of StrictAssertEquals. (d6e7b50)

Performance Improvements

  • graphql/SchemaPrinter: DirectiveResolver will not load all lighthouse's directives (because they are not needed + it is very slow) and will cache definitions/instances. (b61a248) ☣

Code Refactoring

  • graphql: Minimal version of "nuwave/lighthouse" set to ^5.8.0. (25816cc) ☣

Laravel 9 Support 🤗

27 Feb 07:01
0.12.0
2806e93

Choose a tag to compare

Breaking changes

Features

  • Laravel 9 support. (#10; c12b021)
  • migrator: Removed DirectorySeeder and RootSeeder. (1be3a4e) ☣
  • queue, testing: CronableRegistrator will add disabled Cronable into Schedule it is needed to be able to test registration. (cf050e2) ☣
  • spa: Request::validated() updated to be compatible with Laravel 9 and support $key and $default. (3eb876f)

Bug Fixes

  • graphql: "LogicException : Override for Nuwave\Lighthouse\Schema\Source\SchemaSourceProvider already defined." while testing schemas. (0623c36)
  • graphql/SchemaPrinter: Fixed missing LF in directive locations when the definition is multiline. (e4d69bf)
  • graphql/SchemaPrinter: Printer will parse all definitions from Directive:definition() to avoid "DefinitionException : Lighthouse failed while trying to load a type XXX" error. (5c20332)
  • queue: ConsoleKernelWithSchedule will not use booted() because there are no reasons to use it here (also, in some cases the previous approach may lead to Cronable was registered twice). (64482a6)
  • queue: ProviderWithSchedule will use afterResolving() callback to register Cronable. (bf84e0d) ☣

Brand new/Awesome `SchemaPrinter` 😋

05 Feb 11:18
0.11.0
43b5740

Choose a tag to compare

Breaking changes
🔥 Something cool

Features

  • core: Added Subject::getObservers(). (eb59a63)
  • eloquent: Added ModelHelper::isSoftDeletable() helper. (b254288)
  • eloquent: Result of ModelHelper::isRelation() will be cached (cache can be reset by ModelHelper::resetCache()) (a63f272)
  • graphql: Added GraphQLExpectedSchema that can be used with assertGraphQLSchemaEquals() to check used/unused types and directives. (72fd9a9)
  • graphql: 🔥 Awesome SchemaPrinter with directives, filtering, advanced formatting, and more. The assertGraphQLSchemaEquals() also updated to use it. (f9e0b35) ☣
  • graphql: Minimal version of "nuwave/lighthouse" set to "^5.6.1" (required to print repeatable directives). (e694b7d) ☣

Bug Fixes

  • formatter: Formatter::forLocale()/Formatter::forTimezone() will not lose timezone/locale. (940ed7b)
  • testing: Override will check usages in assertPostConditions() instead of beforeApplicationDestroyed() ("Lock wait timeout exceeded" fix). (95649d9)

Code Refactoring

  • core: Subject methods will return self instead of void. (7d80539) ☣
  • core: Class Subject converted into interface, all methods moved into new class Dispatcher. (e7bef00) ☣

0.10.0

25 Dec 17:37
0.10.0
f89756d

Choose a tag to compare

Breaking changes

Features

  • core: Observer implementation. (9bf13f9)
  • eloquent: Added Iterator::$index that required to count items to continue iteration. (cd3be87)
  • eloquent: Added ModelHelper::isRelation(). (b621e97)
  • eloquent: Iterators will use Subject (so onBeforeChunk() and onAfterChunk() will not redefine existing callback). (60858d3) ☣
  • eloquent: Removed ChunkedIterator::safe(). (846de72) ☣
  • formatter: Formatter::app() renamed to Formatter::getApplication(). (6f50747) ☣
  • formatter: Added Formatter::forTimezone() to create formatter for specific timezone, also, default timezone set to null instead of UTC. (41bc6af) ☣
  • formatter: Better logic for settings locale: by default locale will be null and getDefaultLocale() will be used. (dd94a28)
  • graphql: New testing helper GraphQLAssertions::useGraphQLSchema(). (376425c)
  • testing: SetUpTraits deprecated, @before/afterApplicationCreated()/beforeApplicationDestroyed() can be used instead. (fee2f29) ☣
  • testing: New constraint MimeType that checks that response has a Content-Type header by given file extension. (9462814)

Bug Fixes

  • graphql: @sortBy will check FieldResolver only for _ (type). (3b4acc2)
  • graphql: Enums serialization. (2dd62a7) ☣
  • queue: "Cron\CronExpression::__construct(): Argument #1 ($expression) must be of type string, null given". (d936445)
  • testing: CronableAssertions::assertCronableRegistered() will work even if no cron defined for the job. (08a47dc)

Types auto-generation for `@sortBy` 🤩

24 Oct 12:23
0.9.0
453126e

Choose a tag to compare

Breaking changes

Features

  • guzzlehttp/psr7:^2.0 support. (c33899d)
  • eloquent,graphql: ModelHelper moved into eloquent package. (34d99ed) ☣
  • eloquent: EloquentBuilder::orderByKey() mixin will use qualified key name. (155dacb)
  • eloquent: ModelHelper::getRelation() will throw PropertyIsNotRelation instead of LogicException. (7f350a9)
  • graphql: @searchBy will support types from TypeRegistry. (1a92006) ☣
  • graphql: @searchBy: new operators for String: contains, startsWith, endsWith. (f2f44b7)
  • graphql: @sortBy support input type auto-generation by existing type. (06da4a7)
  • graphql: @sortBy will use dependent subqueries instead of joins. (a1e4608) ☣
  • graphql: New directive sortByUnsortable that allow exclude fields from sort. (10a39ab)
  • queue: CronableRegistrator will use PendingDispatch (so ShouldBeUnique should work now). (6c4cbd0)
  • queue: Dispatchable::run() will use dispatchSync() instead of dispatchNow(). (50ecb56) ☣
  • queue: Injection of QueueableConfigurator into __construct() not needed anymore, Container::afterResolving() will be used instead. (aebffad)
  • testing: New assertion: assertDatabaseQueryEquals(). (64fa090)

Bug Fixes

  • eloquent: Fixed "Integrity constraint violation: 1052 Column 'id' in order clause is ambiguous" for ChunkedChangeSafeIterator (it will use qualified column name for default). (5695af5)

Code Refactoring

  • graphql: LastDragon_ru\LaraASP\GraphQL\SortBy\Contracts\ScoutColumnResolver renamed to \LastDragon_ru\LaraASP\GraphQL\SortBy\Builders\Scout\ColumnResolver (339cf58) ☣

0.8.1

11 Sep 06:33
0.8.1
7190e48

Choose a tag to compare

Bug Fixes

  • testing: CronableAssertions::assertCronableRegistered() will correctly check registration of Cronable. (a2437db)

0.8.0

05 Sep 08:40
0.8.0
15e1984

Choose a tag to compare

Breaking changes

Features

  • core: Package Translator allows to specify default translation (will be used if the translation string doesn't exist). (c9e1e5d)
  • eloquent: New trait WithDateSerialization that will serialize dates that implements JsonSerializable by JsonSerializable::jsonSerialize() instead of hardcoded Carbon::toJSON(). (085fc47) ☣
  • graphql: Enum properties will be converted into studly case (to be compatible with PHP Enums). (3a9e15a) ☣
  • graphql: ModelHelper::__construct() accept class-string<\Illuminate\Database\Eloquent\Model>. (e3d92be)
  • queue: CronableRegistrator will use job name as description (= description will not contain settings anymore) and will not add context to log messages. (04fc1ea) ☣
  • queue: Added timezone setting for Cronable. (8810c7f)
  • queue: Removed QueueableConfig::Debug. (ae9653a) ☣
  • testing: Added WithTranslations helper that allows replacing translation while tests. (5e0d4e4)

Bug Fixes

  • formatter: Filesize units (MB => MiB, etc). (5fc4ba7)
  • queue: TypeError : LastDragon_ru\LaraASP\Queue\Queueables\Job::LastDragon_ru\LaraASP\Queue\Concerns\{closure}: Return value must be of type Illuminate\Foundation\Bus\PendingDispatch, null returned. (58e2f20)
  • queue: CronableRegistrator removed incorrect realization to check the locked status of the job. (033de61)
  • testing: JsonSchemaValue will not evaluate schema in constructor (regression). (3c51269)

`@sortBy` + Laravel Scout = 💖

15 Aug 09:27
0.7.0
e96d3bd

Choose a tag to compare

Breaking changes

Features

  • eloquent: iterator() and changeSafeIterator() builder's macros renamed to getChunkedIterator() and getChangeSafeIterator() accordingly. (c1140a4) ☣
  • eloquent: Iterators will support offset, each() replaced by onAfterChunk(), also added onBeforeChunk(). (4276a2c) ☣
  • graphql: @searchBy: short-named operators (lt, lte, etc) renamed into full form (lessThan, etc). (be2d5f8) ☣
  • graphql: @searchBy: Relation will use notExists instead of not + added exists. (63072fa) ☣
  • grapqhl: @sortBy exceptions rework: each error will have its own exception. Unfortunately, the commit also remove translations support. (4f99e92) ☣
  • graphql: @sortBy will support types from TypeRegistry. (20f3be5)
  • graphql: @sortBy: Laravel Scout support. (4c1bb9c)
  • queue: CronableRegistrator will not dispatch jobs marked as ShouldBeUnique if they already dispatched. (40624e4)
  • queue: Removed DI support for getQueueConfig(). (da57176) ☣
  • testing: CronableAssertions::setQueueableConfig() will accept instance of ConfigurableQueueable. (cd6430e)
  • testing: WithQueryLog::getQueryLog() will accept \Illuminate\Database\ConnectionResolverInterface. (9243d47)
  • testing: Added Override::override() helper. (7598390)
  • testing: Added a new WithQueryLog trait that can work with any connection (the old one marked as deprecated). (1f7a8c3)
  • testing: Removed TestResponse::getContentType() macro (not needed for testing). (ebf2f6d) ☣
  • testing: Removed TestResponse::toPsrResponse() macro, LastDragon_ru\\LaraASP\\Testing\\Constraints\\Response\\Factory::make() should be used instead. (7e000da) ☣

Bug Fixes

  • eloquent: Iterator::onBeforeChunk()/Iterator::onAfterChunk() will be called only for non-empty chunks. (140825c)
  • graphql: Enums registration moved to afterResolving callback. (2a6288b)
  • migrator: Added missed semicolon to migration-anonymous.stub. (64118fa)

0.6.1

26 Jun 11:21
0.6.1
8212efc

Choose a tag to compare

Bug Fixes

  • testing: JsonSchemaWrapper::__construct() will correctly handle JsonSchemaWrapper $schema. (85ea05f)
  • testing: TypeError : Symfony\Component\HttpFoundation\HeaderUtils::parseQuery(): Argument #1 ($query) must be of type string, null given (9646143)

GraphQL/Testing improvements.

12 Jun 17:57
0.6.0
a0bd1aa

Choose a tag to compare

Features

  • graphql: @sortBy: HasOneThrough support 😜 (558198b)
  • testing: Added WithTempFile helper. (93a24be)
  • testing: Signature of DataProvider::getData() changed to DataProvider::getData(bool $raw = false) to allow nesting DataProviders. (34f1ff7)

Bug Fixes

  • dev: Added removing special characters from hostname in Vagrantfile. (1eed300)
  • graphql: @searchBy will not advise "contact to developer" for unknown types. (d9ff32b)
  • graphql: @sortBy will not skip "unknown" types and will not convert them into Scalars. (b5aaccb)
  • testing: arguments types for TestResponseMixin::assertJsonMatchesSchema(). (46674f0)