Skip to content

New Major Release

Latest
Compare
Choose a tag to compare
@rotexdegba rotexdegba released this 14 Mar 22:00
  • PHP 8.1 is now the minimum version

  • More type hinting around the code-base

  • CollectionInterface signature changes also impacts CollectionInterfaceImplementationTrait & all classes that implement it

    • __get(string $key):mixed
    • __set(string $key, mixed $val): void
    • appendItem(mixed $item): CollectionInterface
    • column(int|string $column_key, int|string|null $index_key=null): GenericCollection
    • containsItem(mixed $item): bool
    • containsItemWithKey(int|string $key, mixed $item): bool
    • containsKey(int|string $key): bool
    • each(callable $callback, mixed $termination_value=false, bool $bind_callback_to_this=true): CollectionInterface
    • firstItem(): mixed
    • getAndRemoveFirstItem (): mixed
    • getAndRemoveLastItem(): mixed
    • getAsNewType(string|CollectionInterface $new_collection_class=GenericCollection::class): CollectionInterface
    • getIfExists(string|int $key, mixed $default_value=null): mixed
    • lastItem(): mixed
    • offsetExists(mixed $key): bool
    • offsetGet(mixed $key): mixed
    • offsetSet($key, mixed $val): void
    • prependItem(mixed $item, string|int|null $key=null): CollectionInterface
    • pull(int|string $key, mixed $default = null): mixed
    • push(mixed $item): CollectionInterface
    • put(int|string $key, mixed $value): CollectionInterface
    • randomItem(): mixed
    • randomKey(): int|string
    • reduce(callable $reducer, mixed $initial_value=NULL)
    • reduceWithKeyAccess(callable $reducer, mixed $initial_value=NULL)
    • searchAllByVal( mixed $value, bool $strict = false ): array|false
    • searchByVal(mixed $value, bool $strict = false ): mixed
    • setValForEachItem(string $field_name, mixed $field_val, bool $add_field_if_not_present=false): CollectionInterface
    • whenFalse($falsy_value, callable $callback, callable $default=null): mixed
    • whenTrue($truthy_value, callable $callback, callable $default=null): mixed
  • CollectionInterfaceImplementationTrait signature changes

    • __construct(mixed ...$items)
    • performMultiSort(array $array_to_be_sorted, MultiSortParameters ...$param): array
  • FloatsCollection signature changes

    • itemToString(float|int $item): string
  • IntsCollection signature changes

    • itemToString(float|int $item): string
  • NumericsCollection signature changes

    • itemFromString(string $str): float|int
    • itemToString(float|int $item): string
  • StrictlyTypedCollectionInterface & every class that implements it

    • checkType(mixed $item): bool
  • StrictlyTypedCollectionInterfaceImplementationTrait

    • __construct(mixed ...$arr_objs)
    • isRightTypeOrThrowInvalidTypeException(mixed $item, string $calling_functions_name): bool
  • Utils

    • gettype(mixed $var): string
  • src/helper-functions.php

    • get_object_property_value(object $obj, string|int $property, mixed $default_val=null, bool $access_private_or_protected=false): mixed
    • object_has_property(object $obj, string|int $property): bool
    • random_array_key(array $array): string|int|null
    • dump_var(mixed $var): void

Full Changelog: 5.3.0...6.0.0