From d7da94ef108dc6f3f92032a5fd76dde5f62e41cb Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Tue, 27 Sep 2022 16:10:47 +0000 Subject: [PATCH 1/2] Updated Veneer stub Signed-off-by: Tom Wright --- composer.json | 12 +++++++++--- stubs/DecodeLabs/Lucid.php | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index efce4e5..f099bc3 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "decodelabs/dictum": "^0.4", "decodelabs/exceptional": "^0.4", "decodelabs/lucid-support": "^0.2.1", - "decodelabs/veneer": "^0.10", + "decodelabs/veneer": "^0.10.7", "nesbot/carbon": "^2.25" }, @@ -29,7 +29,9 @@ "decodelabs/phpstan-decodelabs": "^0.6", "decodelabs/compass": "^0.1.1", - "decodelabs/spectrum": "^0.2.1" + "decodelabs/spectrum": "^0.2.1", + "decodelabs/atlas": "^0.10.4", + "decodelabs/terminus": "^0.8.4" }, "suggest": { "decodelabs/compass": "IP address validation support", @@ -56,16 +58,20 @@ }, "scripts": { "analyze": "phpstan analyze --no-progress", + "clear-phpstan": "phpstan clear-result-cache", "ecs": "ecs check --no-progress-bar", "ecs-fix": "ecs check --no-progress-bar --fix", "lint": "parallel-lint src/ stubs/ ecs.php", "eclint": "eclint check src/ stubs/ ecs.php", "eclint-fix": "eclint fix src/ stubs/ ecs.php", "non-ascii": "! LC_ALL=C.UTF-8 find src/ stubs/ -type f -name \"*.php\" -print0 | xargs -0 -- grep -PHn \"[^ -~]\" | grep -v '// @ignore-non-ascii$'", + "veneer-stub": "vendor/bin/veneer-stub", "check": [ "@composer update", + "@veneer-stub", + "@clear-phpstan", "@analyze", - "@ecs", + "@ecs-fix", "@lint", "@eclint", "@non-ascii" diff --git a/stubs/DecodeLabs/Lucid.php b/stubs/DecodeLabs/Lucid.php index 3ad7bdc..701b291 100644 --- a/stubs/DecodeLabs/Lucid.php +++ b/stubs/DecodeLabs/Lucid.php @@ -4,9 +4,36 @@ * It should not be included in your projects. */ namespace DecodeLabs; + use DecodeLabs\Veneer\Proxy; use DecodeLabs\Veneer\ProxyTrait; use DecodeLabs\Lucid\Context as Inst; -class Lucid implements Proxy { use ProxyTrait; -const VENEER = 'DecodeLabs\Lucid'; -const VENEER_TARGET = Inst::class;}; +use DecodeLabs\Lucid\Sanitizer as Ref0; +use Closure as Ref1; +use DecodeLabs\Lucid\Validate\Result as Ref2; + +class Lucid implements Proxy +{ + use ProxyTrait; + + const VENEER = 'DecodeLabs\Lucid'; + const VENEER_TARGET = Inst::class; + + public static Inst $instance; + + public static function newSanitizer(mixed $value): Ref0 { + return static::$instance->newSanitizer(...func_get_args()); + } + public static function make(mixed $value, string $type, Ref1|array|null $setup = NULL): mixed { + return static::$instance->make(...func_get_args()); + } + public static function validate(mixed $value, string $type, Ref1|array|null $setup = NULL): Ref2 { + return static::$instance->validate(...func_get_args()); + } + public static function is(mixed $value, string $type, Ref1|array|null $setup = NULL): bool { + return static::$instance->is(...func_get_args()); + } + public static function sanitize(mixed $value): Ref0 { + return static::$instance->sanitize(...func_get_args()); + } +}; From f1a74425d0284e7156590ee6ab85514d3db63b45 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Tue, 27 Sep 2022 16:11:36 +0000 Subject: [PATCH 2/2] Updated changelog Signed-off-by: Tom Wright --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 907c61e..a3efdb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.3.5 (2022-09-27) +* Updated Veneer stub +* Updated composer check script + ## v0.3.4 (2022-09-27) * Updated Veneer dependency