diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15f6b93..a3d54e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: 'Tests: Playground Blade' +name: 'CI' on: push: @@ -99,7 +99,7 @@ jobs: env: XDEBUG_MODE: coverage with: - version: "10.5" + version: "11.5" php_version: "8.2" php_extensions: intl xdebug coverage_clover: clover.xml diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 48352cc..8133f29 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -45,7 +45,7 @@ 'class_definition' => [ 'multi_line_extends_each_single_line' => true, 'single_item_single_line' => true, - 'single_line' => true, + 'single_line' => false, ], 'clean_namespace' => true, 'compact_nullable_typehint' => true, @@ -59,6 +59,7 @@ 'encoding' => true, 'full_opening_tag' => true, 'fully_qualified_strict_types' => true, + 'declare_strict_types' => true, 'function_declaration' => true, 'general_phpdoc_tag_rename' => true, 'heredoc_to_nowdoc' => true, @@ -214,7 +215,9 @@ $finder = PhpCsFixer\Finder::create() ->in([ __DIR__.'/config', + __DIR__.'/resources', __DIR__.'/src', + __DIR__.'/tests/Feature', __DIR__.'/tests/Unit', ]) ->name('*.php') diff --git a/README.md b/README.md index 25e125a..1528dac 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ [![Test Coverage](https://raw.githubusercontent.com/gammamatrix/playground-blade/testing/develop/coverage.svg)](tests) [![PHPStan Level 9 src and tests](https://img.shields.io/badge/PHPStan-level%209-brightgreen)](.github/workflows/ci.yml#L115) -The Playground Blade package for [Laravel](https://laravel.com/docs/10.x) applications. +The Playground Blade package for [Laravel](https://laravel.com/docs/11.x) applications. This package provides Blade UI handling. -More information is available [on the Playground Blade wiki.](https://github.com/gammamatrix/playground-blade/wiki) +Read more on using Playground Blade [at the Read the Docs for Playground.](https://gammamatrix-playground.readthedocs.io/) ## Installation diff --git a/composer.json b/composer.json index ab83743..c881ee4 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "playground", "playground-blade" ], - "homepage": "https://github.com/gammamatrix/playground-blade/wiki", + "homepage": "https://gammamatrix-playground.readthedocs.io/", "license": "MIT", "authors": [ { @@ -18,13 +18,12 @@ } ], "require": { - "php": "^8.1", - "gammamatrix/playground": "dev-develop|dev-master|dev-feature/*|^73.0" + "php": "^8.2", + "gammamatrix/playground": "dev-develop|dev-master|dev-feature/*|^73.0@dev|^73.0" }, "require-dev": { - "gammamatrix/playground-auth": "dev-develop|dev-master|dev-feature/*|^73.0", - "gammamatrix/playground-test": "dev-develop|dev-master|dev-feature/*|^73.0", - "tomasvotruba/bladestan": "^0.4.1" + "gammamatrix/playground-auth": "dev-develop|dev-master|dev-feature/*|^73.0@dev|^73.0", + "gammamatrix/playground-test": "dev-develop|dev-master|dev-feature/*|^73.0@dev|^73.0" }, "minimum-stability": "dev", "prefer-stable": true, @@ -60,6 +59,6 @@ "scripts": { "test": "vendor/bin/phpunit", "format": "vendor/bin/php-cs-fixer fix", - "analyse": "vendor/bin/phpstan analyse --verbose --debug --level max --error-format=blade" + "analyse": "vendor/bin/phpstan analyse --verbose --debug --level max" } } diff --git a/config/playground-blade.php b/config/playground-blade.php index 8949b40..531b79f 100644 --- a/config/playground-blade.php +++ b/config/playground-blade.php @@ -1,5 +1,7 @@ env('PLAYGROUND_BLADE_LAYOUT', 'playground::layouts.site'), 'view' => env('PLAYGROUND_BLADE_VIEW', 'playground::'), diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c833e13..ef5f1da 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,8 +1,8 @@ includes: - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-phpunit/rules.neon - - vendor/tomasvotruba/bladestan/config/extension.neon - #- vendor/larastan/larastan/extension.neon + #- vendor/tomasvotruba/bladestan/config/extension.neon + - vendor/larastan/larastan/extension.neon parameters: level: 9 @@ -13,9 +13,9 @@ parameters: - tests - resources/views - bladestan: - template_paths: - - resources/views + #bladestan: + # template_paths: + # - resources/views excludePaths: - 'output/*' @@ -24,5 +24,5 @@ parameters: checkGenericClassInNonGenericObjectType: false - # editorUrl: 'vscode://file/%%file%%:%%line%%' + editorUrl: 'vscode://file/%%file%%:%%line%%' # editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%' diff --git a/phpunit.xml.dev b/phpunit.xml.dev index 91a9c54..80d5519 100644 --- a/phpunit.xml.dev +++ b/phpunit.xml.dev @@ -1,7 +1,7 @@ app->runningInConsole()) { // Publish configuration $this->publishes([ - sprintf('%1$s/config/%2$s.php', dirname(__DIR__), $this->package) => config_path(sprintf('%1$s.php', $this->package)), + sprintf('%1$s/config/playground-blade.php', dirname(__DIR__)) => config_path('playground-blade.php'), ], 'playground-config'); $this->publishesAssets(); @@ -91,17 +92,17 @@ public function publishesAssets(): void { // Publish JavaScript assets $this->publishes([ - sprintf('%1$s/resources/js/playground-blade.js', dirname(__DIR__)) => public_path('vendor/playground/blade.js'), - ], 'playground-js'); + sprintf('%1$s/resources/js/playground-blade.js', dirname(__DIR__)) => public_path('vendor/playground/blade.js'), ], 'playground-js' + ); // Publish Blade Views $this->publishes([ - dirname(__DIR__).'/resources/views' => resource_path(Str::of('vendor/'.$this->package)->beforeLast('-blade')), - ], 'playground-blade'); + sprintf('%1$s/resources/views', dirname(__DIR__)) => resource_path('vendor/playground'), ], 'playground-blade' + ); // Publish CSS assets $this->publishes([ - sprintf('%1$s/resources/css', dirname(__DIR__)) => public_path('vendor/playground'), - ], 'playground-css'); + sprintf('%1$s/resources/css', dirname(__DIR__)) => public_path('vendor/playground'), ], 'playground-css' + ); } } diff --git a/src/Themes/Bootstrap.php b/src/Themes/Bootstrap.php index ba01395..e43a3de 100644 --- a/src/Themes/Bootstrap.php +++ b/src/Themes/Bootstrap.php @@ -1,4 +1,6 @@