diff --git a/composer.json b/composer.json index 6a2b15e6..03054b99 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,19 @@ "meta-box/mbb-parser": "dev-master", "elightup/twig": "dev-master" }, + "scripts": { + "post-update-cmd": [ + "echo Deleting .git dirs...", + "rm -rf vendor/**/**/.git" + ], + "post-install-cmd": [ + "echo Deleting .git dirs...", + "rm -rf vendor/**/**/.git" + ], + "phpcs": [ + "phpcs > phpcs.txt" + ] + }, "extra": { "dev-files": { "/": [ @@ -38,72 +51,43 @@ ".github/", ".gitattributes", ".gitignore", - - ".editoconfig", - - "LICENSE", - "*.md", - - "test/", - "tests/", - - "phpcs.xml" - ], - "meta-box/*": [ - ".git", - ".distignore", - ".babelrc", - "webpack.config.js", - - "*.lock", - "*.json", + "*.yaml", "*.yml", - "*.txt", "*.less", "*.scss", "*.po", - "*.pot", - - "demo.php", - "demo/", - "sass/", - "vendor/" - ], - "wpmetabox/*": [ - ".git", - - ".distignore", + "composer.json", + "composer.lock", + "package.json", + "package-lock.json", + "phpcs.xml", + "pnpm-lock.yaml", + "phpstan.neon", + "phpunit.xml", ".babelrc", "webpack.config.js", - - "*.lock", - "*.json", - "*.yml", - - "*.txt", - "*.less", - "*.scss", - "*.po", - "*.pot", - + ".editoconfig", + ".vscode", + "esbuild.js", + "LICENSE", + "*.md", + "test/", + "tests/", "demo.php", "demo/", "sass/", "vendor/" ], "riimu/kit-phpencoder": [ - "examples", - "*.md", - "*.json", - "LICENSE" + "examples/", + "*.json" ], "elightup/twig": [ - ".git", "*.json", "twig.php" ] } } -} +} \ No newline at end of file diff --git a/src/Extensions/Blocks.php b/src/Extensions/Blocks.php index 68eed3b2..d55a8234 100644 --- a/src/Extensions/Blocks.php +++ b/src/Extensions/Blocks.php @@ -46,7 +46,7 @@ public static function get_block_metadata( $request ) { $parser = new Settings(); $path = $parser->replace_variables( $path ); - $block_id = $request->post( 'post_name' ); + $block_id = $request->post( 'post_name' ); // phpcs:ignore PluginCheck.CodeAnalysis.EnqueuedResourceOffloading.OffloadedContent $path_to_block_json = $path . '/' . $block_id . '/block.json'; diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index b41248b6..f02dbbaa 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'meta-box/meta-box-builder', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '01bf26a11921d25c8dfb1c478e12c11120ef9c4e', + 'reference' => '8df59c242cf17cf3239b428510820e72ccbffb28', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -35,7 +35,7 @@ 'meta-box/meta-box-builder' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '01bf26a11921d25c8dfb1c478e12c11120ef9c4e', + 'reference' => '8df59c242cf17cf3239b428510820e72ccbffb28', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/riimu/kit-phpencoder/examples/class_resolution.php b/vendor/riimu/kit-phpencoder/examples/class_resolution.php deleted file mode 100644 index 3cf09670..00000000 --- a/vendor/riimu/kit-phpencoder/examples/class_resolution.php +++ /dev/null @@ -1,37 +0,0 @@ - [ - 'Riimu\\', - 'PHPUnit\\Framework\\TestCase', - 'DateTime', - ], - 'string.imports' => [ - 'Riimu\\Kit\\PHPEncoder\\' => '', - 'PHPUnit\\Framework\\TestCase' => 'TestCase', - ], -]); - - -echo "encode([ - \PHPUnit\Framework\TestCase::class, - \Riimu\Kit\PHPEncoder\PHPEncoder::class, - \Riimu\Kit\PHPEncoder\Encoder\Encoder::class, - \DateTime::class, - \DateTimeInterface::class, // Will be encoded as plain string, since it's not allowed by string.classes -]); - -echo ");\n"; diff --git a/vendor/riimu/kit-phpencoder/examples/config.php b/vendor/riimu/kit-phpencoder/examples/config.php deleted file mode 100644 index 3ab9a868..00000000 --- a/vendor/riimu/kit-phpencoder/examples/config.php +++ /dev/null @@ -1,65 +0,0 @@ - '', - 'database' => '', - 'username' => '', - 'password' => '', -]; - -if (isset($_POST['config'])) { - $store = array_intersect_key($_POST['config'], $config); - $encoder = new \Riimu\Kit\PHPEncoder\PHPEncoder(); - - file_put_contents($configFile, sprintf( - 'encode(array_map('strval', $store)) - )); -} - -if (file_exists($configFile)) { - $config = (require $configFile) + $config; -} - -?> - - - - - Database configuration - - -

Database configuration

-Configuration saved!

' . PHP_EOL; -} - -?> -
- - $value) { - printf( - ' ' . PHP_EOL, - ucfirst($name), - $name, - htmlspecialchars($value, ENT_QUOTES | ENT_HTML5, 'UTF-8') - ); -} - -?> -
%s
-
-
- - diff --git a/vendor/riimu/kit-phpencoder/examples/export_difference.php b/vendor/riimu/kit-phpencoder/examples/export_difference.php deleted file mode 100644 index e0710002..00000000 --- a/vendor/riimu/kit-phpencoder/examples/export_difference.php +++ /dev/null @@ -1,35 +0,0 @@ - $precision]); -$exportEncoder = new \Riimu\Kit\PHPEncoder\PHPEncoder(['float.export' => true]); - -ini_set('serialize_precision', $precision); - -$count = 0; -$mindiff = 1; -$maxdiff = 0; -$total = 0; - -for ($i = 0; $i <= 2 ** 53; $i++) { - $normal = $normalEncoder->encode($i / 2 ** 53); // $i / 2 ** 53 - $export = $exportEncoder->encode($i / 2 ** 53); // $i / 2 ** 53 - - $normalResult = eval("return $normal;"); - $exportResult = eval("return $export;"); - - if ($normalResult !== $exportResult) { - $diff = abs($normalResult - $exportResult); - - $count++; - $mindiff = min($diff, $mindiff); - $maxdiff = max($diff, $maxdiff); - $total += $diff; - $avgdiff = $total / $count; - $pct = round($count / $i * 100, 2); - - echo "Different ($count / $i, $pct%): $normal, $export, Diff: $mindiff / $avgdiff / $maxdiff\n"; - } -} diff --git a/vendor/riimu/kit-phpencoder/examples/writing.php b/vendor/riimu/kit-phpencoder/examples/writing.php deleted file mode 100644 index d71206cc..00000000 --- a/vendor/riimu/kit-phpencoder/examples/writing.php +++ /dev/null @@ -1,15 +0,0 @@ -encode(['foo' => 'bar', [1, true, false, null, 1.0]]); - -echo PHP_EOL; - -echo $encoder->encode(['foo' => 'bar', [1, true, false, null, 1.0]], [ - 'whitespace' => false, -]);