From d2f019fb625f5d4072cba3fb0b5944ff49fcda4a Mon Sep 17 00:00:00 2001 From: Younes ENNAJI Date: Sun, 5 May 2024 17:52:48 +0100 Subject: [PATCH] chore: update the doc and improve phpstan annotations --- .ackrc | 8 +- .github/workflows/tests.yaml | 169 ---- composer.json | 18 +- composer.lock | 211 ++--- demo/laravel/app/Entity/Book.php | 15 + demo/laravel/composer.json | 2 + demo/laravel/composer.lock | 356 +++++++- demo/laravel/phpstan.neon.dist | 7 + .../laravel/resources/views/welcome.blade.php | 14 +- demo/laravel/routes/web.php | 43 +- demo/symfony/composer.json | 1 + demo/symfony/composer.lock | 761 +++++++++++++++++- demo/symfony/config/bundles.php | 1 + .../config/packages/nelmio_security.yaml | 33 + demo/symfony/phpstan.dist.neon | 2 - .../symfony/src/Controller/HomeController.php | 22 +- demo/symfony/src/Entity/Book.php | 15 + demo/symfony/symfony.lock | 12 + demo/symfony/templates/home/index.html.twig | 15 +- docs/Gemfile | 4 +- docs/Gemfile.lock | 13 +- docs/_data/manifest.json | 20 +- docs/_data/menu.yml | 1 - docs/_includes/_usage.md | 43 +- docs/_includes/playground.html | 42 + docs/_layouts/default.html | 10 +- .../js/controllers/anchor_controller.js | 165 ++-- docs/assets/js/controllers/playground.pcss | 0 .../js/controllers/playground_controller.js | 159 ++++ docs/assets/js/main.pcss | 7 + .../dist/{371.324a7072.js => 107.090fb6e1.js} | 2 +- .../dist/{107.12087179.js => 160.22e7905c.js} | 2 +- .../dist/{160.264e6e64.js => 265.52505228.js} | 2 +- .../dist/{265.396597b6.js => 371.f9d2cf4e.js} | 2 +- docs/dist/411.277b21bc.js | 1 + docs/dist/411.42e6794f.js | 1 - docs/dist/455.095e6545.js | 1 + docs/dist/455.17bc016b.js | 1 - docs/dist/641.a938263c.js | 1 + docs/dist/641.f8750364.js | 1 - docs/dist/735.3cd4e509.js | 1 - docs/dist/735.5b8d44b1.js | 1 + docs/dist/entrypoints.json | 4 +- docs/dist/main.09f63ce9.js | 2 + ...CENSE.txt => main.09f63ce9.js.LICENSE.txt} | 9 + docs/dist/main.4d227167.js | 2 - .../{main.89ac14de.css => main.73b25228.css} | 2 +- docs/package-lock.json | 17 +- docs/package.json | 3 +- docs/pages/index.md | 26 +- docs/pages/inertia.md | 4 +- docs/pages/installation.md | 393 +++++++++ docs/pages/javascript.md | 10 +- docs/pages/laravel.md | 50 +- docs/pages/library/noty.md | 312 ++++--- docs/pages/library/notyf.md | 144 +++- docs/pages/library/sweetalert.md | 146 +++- docs/pages/library/toastr.md | 148 +++- docs/pages/livewire.md | 12 +- docs/pages/phpstan.md | 22 - docs/pages/symfony.md | 35 +- extension.neon | 1 - package-lock.json | 456 ++++++----- package.json | 14 +- pnpm-workspace.yaml | 8 - src/Laravel/Facade/Flasher.php | 11 +- src/Laravel/Translation/Translator.php | 18 + src/Noty/Prime/.phpstorm.meta.php | 3 +- src/Noty/Prime/NotyBuilder.php | 15 +- src/Noty/Prime/Resources/assets/noty.ts | 2 +- .../Prime/Resources/dist/flasher-noty.esm.js | 2 +- src/Noty/Prime/Resources/dist/flasher-noty.js | 2 +- .../Prime/Resources/dist/flasher-noty.min.js | 2 +- .../Resources/public/flasher-noty.min.js | 2 +- src/Noty/Prime/functions.php | 2 + src/Noty/Prime/helpers.php | 2 + src/Notyf/Prime/.phpstorm.meta.php | 1 + src/Notyf/Prime/NotyfBuilder.php | 17 +- src/Notyf/Prime/Resources/assets/notyf.ts | 4 +- .../Prime/Resources/dist/flasher-notyf.esm.js | 4 +- .../Prime/Resources/dist/flasher-notyf.js | 4 +- .../Prime/Resources/dist/flasher-notyf.min.js | 2 +- .../Resources/public/flasher-notyf.min.js | 2 +- src/Notyf/Prime/functions.php | 2 + src/Notyf/Prime/helpers.php | 2 + src/Prime/.phpstorm.meta.php | 17 +- src/Prime/Container/FlasherContainer.php | 7 +- .../EventListener/TranslationListener.php | 11 +- src/Prime/Factory/FlasherFactory.php | 19 + src/Prime/Factory/FlasherFactoryInterface.php | 12 + src/Prime/Factory/NotificationFactory.php | 9 +- .../NotificationFactoryLocatorInterface.php | 8 + src/Prime/Flasher.php | 4 +- src/Prime/FlasherInterface.php | 31 +- src/Prime/Notification/FlasherBuilder.php | 29 + .../Notification/NotificationBuilder.php | 2 +- .../NotificationBuilderInterface.php | 11 +- .../NotificationBuilderMethods.php | 4 +- .../NotificationStorageMethods.php | 29 +- .../ReturnTypes/FlashHelperExtension.php | 56 -- ...DynamicStaticMethodReturnTypeExtension.php | 53 -- src/Prime/Resources/assets/flasher-plugin.ts | 2 +- src/Prime/Resources/dist/flasher.esm.js | 2 +- src/Prime/Resources/dist/flasher.js | 2 +- src/Prime/Resources/dist/flasher.min.js | 2 +- src/Prime/Resources/public/flasher.min.js | 2 +- .../Response/Presenter/ArrayPresenter.php | 29 +- .../Response/ResponseManagerInterface.php | 9 + .../Support/Traits/MethodAliasResolver.php | 68 -- src/Prime/Translation/ResourceInterface.php | 12 - src/Prime/extension.neon | 10 - src/Prime/functions.php | 9 +- src/Prime/helpers.php | 8 +- src/SweetAlert/Prime/.phpstorm.meta.php | 1 + src/SweetAlert/Prime/SweetAlertBuilder.php | 18 +- src/SweetAlert/Prime/functions.php | 2 + src/SweetAlert/Prime/helpers.php | 2 + src/Symfony/Resources/config/services.php | 5 +- src/Symfony/Support/PluginExtension.php | 52 -- src/Toastr/Prime/.phpstorm.meta.php | 2 + src/Toastr/Prime/Resources/assets/toastr.ts | 2 +- .../Resources/dist/flasher-toastr.esm.js | 2 +- .../Prime/Resources/dist/flasher-toastr.js | 2 +- .../Resources/dist/flasher-toastr.min.js | 2 +- .../Resources/public/flasher-toastr.min.js | 2 +- src/Toastr/Prime/ToastrBuilder.php | 19 +- src/Toastr/Prime/functions.php | 2 + src/Toastr/Prime/helpers.php | 2 + taskfile.dist.yml | 22 +- tests/Noty/Prime/NotyBuilderTest.php | 4 +- .../EventDispatcher/EventDispatcherTest.php | 1 + .../EventListener/TranslationListenerTest.php | 17 + ...FactoryTest.php => FlasherFactoryTest.php} | 7 +- tests/Prime/FlasherTest.php | 2 +- ...BuilderTest.php => FlasherBuilderTest.php} | 23 +- 135 files changed, 3329 insertions(+), 1423 deletions(-) delete mode 100644 .github/workflows/tests.yaml create mode 100644 demo/laravel/app/Entity/Book.php create mode 100644 demo/laravel/phpstan.neon.dist create mode 100644 demo/symfony/config/packages/nelmio_security.yaml create mode 100644 demo/symfony/src/Entity/Book.php create mode 100644 docs/_includes/playground.html create mode 100644 docs/assets/js/controllers/playground.pcss create mode 100644 docs/assets/js/controllers/playground_controller.js rename docs/dist/{371.324a7072.js => 107.090fb6e1.js} (50%) rename docs/dist/{107.12087179.js => 160.22e7905c.js} (50%) rename docs/dist/{160.264e6e64.js => 265.52505228.js} (50%) rename docs/dist/{265.396597b6.js => 371.f9d2cf4e.js} (50%) create mode 100644 docs/dist/411.277b21bc.js delete mode 100644 docs/dist/411.42e6794f.js create mode 100644 docs/dist/455.095e6545.js delete mode 100644 docs/dist/455.17bc016b.js create mode 100644 docs/dist/641.a938263c.js delete mode 100644 docs/dist/641.f8750364.js delete mode 100644 docs/dist/735.3cd4e509.js create mode 100644 docs/dist/735.5b8d44b1.js create mode 100644 docs/dist/main.09f63ce9.js rename docs/dist/{main.4d227167.js.LICENSE.txt => main.09f63ce9.js.LICENSE.txt} (82%) delete mode 100644 docs/dist/main.4d227167.js rename docs/dist/{main.89ac14de.css => main.73b25228.css} (82%) create mode 100644 docs/pages/installation.md delete mode 100644 docs/pages/phpstan.md delete mode 100644 pnpm-workspace.yaml create mode 100644 src/Prime/Factory/FlasherFactory.php create mode 100644 src/Prime/Factory/FlasherFactoryInterface.php create mode 100644 src/Prime/Notification/FlasherBuilder.php delete mode 100644 src/Prime/Phpstan/ReturnTypes/FlashHelperExtension.php delete mode 100644 src/Prime/Phpstan/ReturnTypes/FlasherContainerDynamicStaticMethodReturnTypeExtension.php delete mode 100644 src/Prime/Support/Traits/MethodAliasResolver.php delete mode 100644 src/Prime/Translation/ResourceInterface.php delete mode 100644 src/Prime/extension.neon delete mode 100644 src/Symfony/Support/PluginExtension.php rename tests/Prime/Factory/{NotificationFactoryTest.php => FlasherFactoryTest.php} (89%) rename tests/Prime/Notification/{NotificationBuilderTest.php => FlasherBuilderTest.php} (94%) diff --git a/.ackrc b/.ackrc index f9e9717e..2a6df5c7 100644 --- a/.ackrc +++ b/.ackrc @@ -1,4 +1,10 @@ --ignore-dir=vendor --ignore-dir=yoeunes --ignore-dir=node_modules - +--ignore-dir=demo/laravel/vendor +--ignore-dir=demo/symfony/vendor +--ignore-dir=.cache +--ignore-dir=docs/.jekyll-cache +--ignore-dir=docs/_site +--ignore-dir=docs/node_modules +--ignore-dir=docs/dist diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index f383baa2..00000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,169 +0,0 @@ -name: ๐Ÿงช Run Tests & ๐Ÿ› ๏ธ Static Analysis - -on: - push: - branches: - - main - - 2.x - pull_request: - schedule: - - cron: '0 0 * * *' # Daily at midnight - -jobs: - static-analysis: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [ 8.2 ] - - name: ๐Ÿ˜ PHP ${{ matrix.php }} Static Analysis - - steps: - - name: ๐Ÿ“ฅ Checkout Code - uses: actions/checkout@v4 - - - name: ๐Ÿ”ง Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: ๐Ÿšš Cache Composer Dependencies - uses: actions/cache@v4 - with: - path: ~/.composer/cache - key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.json') }} - restore-keys: ${{ runner.os }}-composer-${{ matrix.php }}- - - - name: ๐Ÿ“ฆ Install Dependencies - run: | - composer config --global allow-plugins true - composer install - - - name: ๐Ÿงน Run PHP CS Fixer (Code Style) - run: vendor/bin/php-cs-fixer fix --dry-run - - - name: ๐Ÿ” Run PHPStan (Static Analysis) - run: vendor/bin/phpstan analyse - - - name: ๐Ÿš€ Run PHPLint (Syntax Check) - run: vendor/bin/phplint - - prime-test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - { php: 8.4, phpunit: 10.5.* } - - { php: 8.3, phpunit: 10.5.* } - - { php: 8.2, phpunit: 10.5.* } - - name: ๐Ÿ˜ PHP ${{ matrix.php }} - - steps: - - name: ๐Ÿ“ฅ Checkout code - uses: actions/checkout@v4 - - - name: ๐Ÿ”ง Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: ๐Ÿšš Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.composer/cache - key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.json') }} - restore-keys: ${{ runner.os }}-composer-${{ matrix.php }}- - - - name: ๐Ÿ“ฆ Install dependencies - run: | - sed -i '/"require": {/,/},/d; /"require-dev": {/,/},/d' composer.json - composer config --global allow-plugins true - composer require "phpunit/phpunit:${{ matrix.phpunit }}" "mockery/mockery" "psr/container" --no-interaction --no-update - composer update --prefer-lowest -W - - - name: โœ… Execute tests - run: vendor/bin/phpunit --testsuite prime - - symfony-test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - { symfony: 7.1.*, php: 8.4, phpunit: 10.5.* } - - { symfony: 7.1.*, php: 8.3, phpunit: 10.5.* } - - { symfony: 7.0.*, php: 8.2, phpunit: 10.5.* } - - name: ๐ŸŒ‰ Symfony ${{ matrix.symfony }} PHP ${{ matrix.php }} - - steps: - - name: ๐Ÿ“ฅ Checkout code - uses: actions/checkout@v4 - - - name: ๐Ÿ”ง Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: ๐Ÿšš Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.composer/cache - key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.json') }} - restore-keys: ${{ runner.os }}-composer-${{ matrix.php }}- - - - name: ๐Ÿ“ฆ Install dependencies - run: | - sed -i '/"require": {/,/},/d; /"require-dev": {/,/},/d' composer.json - composer config --global allow-plugins true - composer config extra.symfony.require "${{ matrix.symfony }}" - composer require "symfony/config:${{ matrix.symfony }}" "symfony/console:${{ matrix.symfony }}" "symfony/dependency-injection:${{ matrix.symfony }}" "symfony/framework-bundle:${{ matrix.symfony }}" "symfony/http-kernel:${{ matrix.symfony }}" "symfony/translation:${{ matrix.symfony }}" "symfony/twig-bundle:${{ matrix.symfony }}" "phpunit/phpunit:${{ matrix.phpunit }}" "mockery/mockery" "psr/container" "monolog/monolog" --no-interaction --no-update - composer update --prefer-lowest -W - - - name: โœ… Execute tests - run: vendor/bin/phpunit --testsuite symfony - - laravel-test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - { laravel: 11.*, testbench: 9.*, php: 8.3, phpunit: 10.5.* } - - { laravel: 11.*, testbench: 9.*, php: 8.2, phpunit: 10.5.* } - - name: ๐Ÿ— Laravel ${{ matrix.laravel }} PHP ${{ matrix.php }} - - steps: - - name: ๐Ÿ“ฅ Checkout code - uses: actions/checkout@v4 - - - name: ๐Ÿ”ง Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: fileinfo - coverage: none - - - name: ๐Ÿšš Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.composer/cache - key: ${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - restore-keys: ${{ matrix.php }}-composer - - - name: ๐Ÿ“ฆ Install dependencies - run: | - sed -i '/\"require\": {/,/},/d; /\"require-dev\": {/,/},/d' composer.json - composer config --global allow-plugins true - composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --prefer-lowest -W - - - name: โœ… Execute tests - run: vendor/bin/phpunit --testsuite laravel diff --git a/composer.json b/composer.json index e6aa70a5..b20c0372 100644 --- a/composer.json +++ b/composer.json @@ -26,19 +26,19 @@ "require-dev": { "illuminate/routing": "^11.0", "illuminate/support": "^11.0", - "larastan/larastan": "^2.9.2", + "larastan/larastan": "^2.9.5", "laravel/octane": "^2.3", "livewire/livewire": "^3.3", - "mockery/mockery": "^1.6.10", - "orchestra/testbench": "^9.0.1", - "overtrue/phplint": "^9.1.2", - "php-cs-fixer/shim": "^3.52.1", - "phpstan/phpstan": "^1.10.63", + "mockery/mockery": "^1.6.11", + "orchestra/testbench": "^9.0.4", + "overtrue/phplint": "^9.2.0", + "php-cs-fixer/shim": "^3.54.0", + "phpstan/phpstan": "^1.10.67", "phpstan/phpstan-mockery": "^1.1.2", - "phpstan/phpstan-symfony": "^1.3.9", + "phpstan/phpstan-symfony": "^1.3.12", "phpunit/phpunit": "^10.5.13", "psr/container": "^1.1|^2.0", - "rector/rector": "^1.0.3", + "rector/rector": "^1.0.4", "rector/swiss-knife": "^0.2.2", "symfony/config": "^7.0", "symfony/console": "^7.0", @@ -48,7 +48,7 @@ "symfony/translation": "^7.0", "symfony/twig-bundle": "^7.0", "symfony/ux-twig-component": "^2.14", - "symplify/monorepo-builder": "^11.2" + "symplify/monorepo-builder": "^11.2.20" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 089a81d5..f021656f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ca255ba6b69a66b542d306bca711b866", + "content-hash": "fd34ba826b8c68895ffbd2154f10c3a7", "packages": [], "packages-dev": [ { @@ -1307,16 +1307,16 @@ }, { "name": "larastan/larastan", - "version": "v2.9.2", + "version": "v2.9.5", "source": { "type": "git", "url": "https://github.com/larastan/larastan.git", - "reference": "a79b46b96060504b400890674b83f66aa7f5db6d" + "reference": "101f1a4470f87326f4d3995411d28679d8800abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/larastan/larastan/zipball/a79b46b96060504b400890674b83f66aa7f5db6d", - "reference": "a79b46b96060504b400890674b83f66aa7f5db6d", + "url": "https://api.github.com/repos/larastan/larastan/zipball/101f1a4470f87326f4d3995411d28679d8800abe", + "reference": "101f1a4470f87326f4d3995411d28679d8800abe", "shasum": "" }, "require": { @@ -1329,15 +1329,15 @@ "illuminate/pipeline": "^9.52.16 || ^10.28.0 || ^11.0", "illuminate/support": "^9.52.16 || ^10.28.0 || ^11.0", "php": "^8.0.2", - "phpmyadmin/sql-parser": "^5.8.2", - "phpstan/phpstan": "^1.10.50" + "phpmyadmin/sql-parser": "^5.9.0", + "phpstan/phpstan": "^1.10.66" }, "require-dev": { "doctrine/coding-standard": "^12.0", - "nikic/php-parser": "^4.17.1", - "orchestra/canvas": "^7.11.1 || ^8.11.0 || ^9.0.0", - "orchestra/testbench": "^7.33.0 || ^8.13.0 || ^9.0.0", - "phpunit/phpunit": "^9.6.13 || ^10.5" + "nikic/php-parser": "^4.19.1", + "orchestra/canvas": "^7.11.1 || ^8.11.0 || ^9.0.2", + "orchestra/testbench": "^7.33.0 || ^8.13.0 || ^9.0.3", + "phpunit/phpunit": "^9.6.13 || ^10.5.16" }, "suggest": { "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" @@ -1385,7 +1385,7 @@ ], "support": { "issues": "https://github.com/larastan/larastan/issues", - "source": "https://github.com/larastan/larastan/tree/v2.9.2" + "source": "https://github.com/larastan/larastan/tree/v2.9.5" }, "funding": [ { @@ -1405,20 +1405,20 @@ "type": "patreon" } ], - "time": "2024-02-27T03:16:03+00:00" + "time": "2024-04-16T19:13:34+00:00" }, { "name": "laravel/framework", - "version": "v11.0.3", + "version": "v11.1.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "efead50a4470068abe47f56e3488a08158039dc3" + "reference": "4a9195f68b529b20fe01e24864f99991459c48d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/efead50a4470068abe47f56e3488a08158039dc3", - "reference": "efead50a4470068abe47f56e3488a08158039dc3", + "url": "https://api.github.com/repos/laravel/framework/zipball/4a9195f68b529b20fe01e24864f99991459c48d4", + "reference": "4a9195f68b529b20fe01e24864f99991459c48d4", "shasum": "" }, "require": { @@ -1521,7 +1521,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.0", + "orchestra/testbench-core": "^9.0.6", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", @@ -1610,7 +1610,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-03-12T19:22:44+00:00" + "time": "2024-03-26T15:17:39+00:00" }, { "name": "laravel/octane", @@ -2292,16 +2292,16 @@ }, { "name": "mockery/mockery", - "version": "1.6.10", + "version": "1.6.11", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "47065d1be1fa05def58dc14c03cf831d3884ef0b" + "reference": "81a161d0b135df89951abd52296adf97deb0723d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/47065d1be1fa05def58dc14c03cf831d3884ef0b", - "reference": "47065d1be1fa05def58dc14c03cf831d3884ef0b", + "url": "https://api.github.com/repos/mockery/mockery/zipball/81a161d0b135df89951abd52296adf97deb0723d", + "reference": "81a161d0b135df89951abd52296adf97deb0723d", "shasum": "" }, "require": { @@ -2371,7 +2371,7 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2024-03-19T16:15:45+00:00" + "time": "2024-03-21T18:34:15+00:00" }, { "name": "monolog/monolog", @@ -3074,24 +3074,24 @@ }, { "name": "orchestra/testbench", - "version": "v9.0.1", + "version": "v9.0.4", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "30640d88b173f9ab44341a282260993f454ed187" + "reference": "1fe2e613fa4b01f4bb4dafdceb4aae766363937e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/30640d88b173f9ab44341a282260993f454ed187", - "reference": "30640d88b173f9ab44341a282260993f454ed187", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/1fe2e613fa4b01f4bb4dafdceb4aae766363937e", + "reference": "1fe2e613fa4b01f4bb4dafdceb4aae766363937e", "shasum": "" }, "require": { "composer-runtime-api": "^2.2", "fakerphp/faker": "^1.23", - "laravel/framework": "^11.0", + "laravel/framework": "^11.1", "mockery/mockery": "^1.6", - "orchestra/testbench-core": "^9.0.6", + "orchestra/testbench-core": "^9.0.13", "orchestra/workbench": "^9.0", "php": "^8.2", "phpunit/phpunit": "^10.5 || ^11.0.1", @@ -3123,22 +3123,22 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v9.0.1" + "source": "https://github.com/orchestral/testbench/tree/v9.0.4" }, - "time": "2024-03-19T13:04:45+00:00" + "time": "2024-04-16T09:56:54+00:00" }, { "name": "orchestra/testbench-core", - "version": "v9.0.6", + "version": "v9.0.13", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "ea532af82da288d363b7dc7c96edae6bbb329efe" + "reference": "1e4d35372c6ae8158572b4476e19c394e6b640e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/ea532af82da288d363b7dc7c96edae6bbb329efe", - "reference": "ea532af82da288d363b7dc7c96edae6bbb329efe", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/1e4d35372c6ae8158572b4476e19c394e6b640e4", + "reference": "1e4d35372c6ae8158572b4476e19c394e6b640e4", "shasum": "" }, "require": { @@ -3148,13 +3148,13 @@ }, "conflict": { "brianium/paratest": "<7.3.0 || >=8.0.0", - "laravel/framework": "<11.0.3 || >=12.0.0", + "laravel/framework": "<11.1.0 || >=12.0.0", "nunomaduro/collision": "<8.0.0 || >=9.0.0", "phpunit/phpunit": "<10.5.0 || 11.0.0 || >=11.1.0" }, "require-dev": { "fakerphp/faker": "^1.23", - "laravel/framework": "^11.0.3", + "laravel/framework": "^11.1", "laravel/pint": "^1.6", "mockery/mockery": "^1.6", "phpstan/phpstan": "^1.10.50", @@ -3168,11 +3168,11 @@ "brianium/paratest": "Allow using parallel tresting (^7.3).", "ext-pcntl": "Required to use all features of the console signal trapping.", "fakerphp/faker": "Allow using Faker for testing (^1.23).", - "laravel/framework": "Required for testing (^11.0.3).", + "laravel/framework": "Required for testing (^11.1).", "mockery/mockery": "Allow using Mockery for testing (^1.6).", "nunomaduro/collision": "Allow using Laravel style tests output and parallel testing (^8.0).", "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^9.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^10.5).", + "phpunit/phpunit": "Allow using PHPUnit for testing (^10.5 || ^11.0).", "symfony/process": "Required to use Orchestra\\Testbench\\remote function (^7.0).", "symfony/yaml": "Required for Testbench CLI (^7.0).", "vlucas/phpdotenv": "Required for Testbench CLI (^5.4.1)." @@ -3214,7 +3214,7 @@ "issues": "https://github.com/orchestral/testbench/issues", "source": "https://github.com/orchestral/testbench-core" }, - "time": "2024-03-19T11:20:27+00:00" + "time": "2024-04-16T07:38:37+00:00" }, { "name": "orchestra/workbench", @@ -3283,16 +3283,16 @@ }, { "name": "overtrue/phplint", - "version": "9.1.2", + "version": "9.2.0", "source": { "type": "git", "url": "https://github.com/overtrue/phplint.git", - "reference": "7a9822c863d19fa8ec42f862c0e135da58b5cb4b" + "reference": "b211fe17b8b9e8f2b3db10243f6adcb6397715c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/overtrue/phplint/zipball/7a9822c863d19fa8ec42f862c0e135da58b5cb4b", - "reference": "7a9822c863d19fa8ec42f862c0e135da58b5cb4b", + "url": "https://api.github.com/repos/overtrue/phplint/zipball/b211fe17b8b9e8f2b3db10243f6adcb6397715c3", + "reference": "b211fe17b8b9e8f2b3db10243f6adcb6397715c3", "shasum": "" }, "require": { @@ -3310,8 +3310,9 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4", + "bartlett/sarif-php-sdk": "^1.2", "brainmaestro/composer-git-hooks": "^2.8.5 || 3.0.0-alpha.1", - "jetbrains/phpstorm-stubs": "^2021.3 || ^2022.3 || ^2023.3", + "jetbrains/phpstorm-stubs": "^2021.3 || ^2022.3 || ^2023.3 || ^2024.1", "php-parallel-lint/php-console-highlighter": "^1.0" }, "bin": [ @@ -3319,6 +3320,11 @@ ], "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "target-directory": "vendor-bin", + "forward-command": true + }, "hooks": { "pre-commit": [ "composer style:fix", @@ -3329,7 +3335,7 @@ ] }, "branch-alias": { - "dev-main": "9.1.x-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -3361,7 +3367,7 @@ ], "support": { "issues": "https://github.com/overtrue/phplint/issues", - "source": "https://github.com/overtrue/phplint/tree/9.1.2" + "source": "https://github.com/overtrue/phplint/tree/9.2.0" }, "funding": [ { @@ -3369,7 +3375,7 @@ "type": "github" } ], - "time": "2024-02-06T10:43:30+00:00" + "time": "2024-05-03T07:14:21+00:00" }, { "name": "paragonie/random_compat", @@ -3531,16 +3537,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.52.1", + "version": "v3.54.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "baec5a6d4b24bad4c930d39fde34b2b0c1c8cd94" + "reference": "887c350fccbadb2b84278fdb963c25a0c304ac9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/baec5a6d4b24bad4c930d39fde34b2b0c1c8cd94", - "reference": "baec5a6d4b24bad4c930d39fde34b2b0c1c8cd94", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/887c350fccbadb2b84278fdb963c25a0c304ac9c", + "reference": "887c350fccbadb2b84278fdb963c25a0c304ac9c", "shasum": "" }, "require": { @@ -3577,22 +3583,22 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.52.1" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.54.0" }, - "time": "2024-03-19T21:03:12+00:00" + "time": "2024-04-17T08:23:10+00:00" }, { "name": "phpmyadmin/sql-parser", - "version": "5.8.2", + "version": "5.9.0", "source": { "type": "git", "url": "https://github.com/phpmyadmin/sql-parser.git", - "reference": "f1720ae19abe6294cb5599594a8a57bc3c8cc287" + "reference": "011fa18a4e55591fac6545a821921dd1d61c6984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/f1720ae19abe6294cb5599594a8a57bc3c8cc287", - "reference": "f1720ae19abe6294cb5599594a8a57bc3c8cc287", + "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/011fa18a4e55591fac6545a821921dd1d61c6984", + "reference": "011fa18a4e55591fac6545a821921dd1d61c6984", "shasum": "" }, "require": { @@ -3623,6 +3629,7 @@ "bin": [ "bin/highlight-query", "bin/lint-query", + "bin/sql-parser", "bin/tokenize-query" ], "type": "library", @@ -3666,7 +3673,7 @@ "type": "other" } ], - "time": "2023-09-19T12:34:29+00:00" + "time": "2024-01-20T20:34:02+00:00" }, { "name": "phpoption/phpoption", @@ -3739,16 +3746,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.63", + "version": "1.10.67", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "ad12836d9ca227301f5fb9960979574ed8628339" + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ad12836d9ca227301f5fb9960979574ed8628339", - "reference": "ad12836d9ca227301f5fb9960979574ed8628339", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", "shasum": "" }, "require": { @@ -3791,13 +3798,9 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2024-03-18T16:53:53+00:00" + "time": "2024-04-16T07:22:02+00:00" }, { "name": "phpstan/phpstan-mockery", @@ -3851,16 +3854,16 @@ }, { "name": "phpstan/phpstan-symfony", - "version": "1.3.9", + "version": "1.3.12", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "a32bc86da24495025d7aafd1ba62444d4a364a98" + "reference": "f4b9407fa3203aebafd422ae8f0eb1ef94659a80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/a32bc86da24495025d7aafd1ba62444d4a364a98", - "reference": "a32bc86da24495025d7aafd1ba62444d4a364a98", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/f4b9407fa3203aebafd422ae8f0eb1ef94659a80", + "reference": "f4b9407fa3203aebafd422ae8f0eb1ef94659a80", "shasum": "" }, "require": { @@ -3917,9 +3920,9 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.9" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.12" }, - "time": "2024-03-16T16:50:20+00:00" + "time": "2024-04-14T13:30:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4440,22 +4443,27 @@ }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "2ae37329ee82f91efadc282cc2d527fd6065a5ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/2ae37329ee82f91efadc282cc2d527fd6065a5ef", + "reference": "2ae37329ee82f91efadc282cc2d527fd6065a5ef", "shasum": "" }, "require": { "php": ">=7.2.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -4482,9 +4490,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.1" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-03-24T13:40:57+00:00" }, { "name": "psr/event-dispatcher", @@ -5093,16 +5101,16 @@ }, { "name": "rector/rector", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "c59507a9090b465d65e1aceed91e5b81986e375b" + "reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/c59507a9090b465d65e1aceed91e5b81986e375b", - "reference": "c59507a9090b465d65e1aceed91e5b81986e375b", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/6e04d0eb087aef707fa0c5686d33d6ff61f4a555", + "reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555", "shasum": "" }, "require": { @@ -5115,6 +5123,9 @@ "rector/rector-phpunit": "*", "rector/rector-symfony": "*" }, + "suggest": { + "ext-dom": "To manipulate phpunit.xml via the custom-rule command" + }, "bin": [ "bin/rector" ], @@ -5137,7 +5148,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/1.0.3" + "source": "https://github.com/rectorphp/rector/tree/1.0.4" }, "funding": [ { @@ -5145,7 +5156,7 @@ "type": "github" } ], - "time": "2024-03-14T15:04:18+00:00" + "time": "2024-04-05T09:01:07+00:00" }, { "name": "rector/swiss-knife", @@ -9110,21 +9121,21 @@ }, { "name": "symfony/service-contracts", - "version": "v3.4.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", - "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^1.1|^2.0" + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -9172,7 +9183,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" }, "funding": [ { @@ -9188,7 +9199,7 @@ "type": "tidelift" } ], - "time": "2023-12-26T14:02:43+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/stopwatch", @@ -10092,16 +10103,16 @@ }, { "name": "symplify/monorepo-builder", - "version": "11.2.0.72", + "version": "11.2.20", "source": { "type": "git", "url": "https://github.com/symplify/monorepo-builder.git", - "reference": "e252321339322af996177e360565cfcddb35c218" + "reference": "444efe08701776cb1a03b9f3600e715697519aa6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symplify/monorepo-builder/zipball/e252321339322af996177e360565cfcddb35c218", - "reference": "e252321339322af996177e360565cfcddb35c218", + "url": "https://api.github.com/repos/symplify/monorepo-builder/zipball/444efe08701776cb1a03b9f3600e715697519aa6", + "reference": "444efe08701776cb1a03b9f3600e715697519aa6", "shasum": "" }, "require": { @@ -10128,7 +10139,7 @@ "description": "Prefixed version of Not only Composer tools to build a Monorepo.", "support": { "issues": "https://github.com/symplify/monorepo-builder/issues", - "source": "https://github.com/symplify/monorepo-builder/tree/11.2.0.72" + "source": "https://github.com/symplify/monorepo-builder/tree/11.2.20" }, "funding": [ { @@ -10140,7 +10151,7 @@ "type": "github" } ], - "time": "2023-01-28T10:26:54+00:00" + "time": "2023-11-17T08:30:16+00:00" }, { "name": "theseer/tokenizer", diff --git a/demo/laravel/app/Entity/Book.php b/demo/laravel/app/Entity/Book.php new file mode 100644 index 00000000..81937314 --- /dev/null +++ b/demo/laravel/app/Entity/Book.php @@ -0,0 +1,15 @@ +title); + } +} diff --git a/demo/laravel/composer.json b/demo/laravel/composer.json index 49db13a0..39e771bf 100644 --- a/demo/laravel/composer.json +++ b/demo/laravel/composer.json @@ -20,10 +20,12 @@ "laravel/tinker": "^2.9", "livewire/livewire": "^3.4", "php-flasher/php-flasher": "@dev", + "spatie/laravel-csp": "^2.9", "spatie/laravel-ray": "^1.36" }, "require-dev": { "fakerphp/faker": "^1.23", + "larastan/larastan": "^2.9", "laravel/pint": "^1.13", "laravel/sail": "^1.26", "mockery/mockery": "^1.6", diff --git a/demo/laravel/composer.lock b/demo/laravel/composer.lock index 8c8d47d1..6b8f50d8 100644 --- a/demo/laravel/composer.lock +++ b/demo/laravel/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "82f8751127532ccbc003e6cf202250d7", + "content-hash": "6a5eb94d553bf800816057a2f860bceb", "packages": [ { "name": "brick/math", @@ -2484,7 +2484,7 @@ "dist": { "type": "path", "url": "../..", - "reference": "48f5a7fcf6f5cf84382b6be56ed6bfc20dbee649" + "reference": "f8262b2e6a75a3130fe97ce95e4b05dd3c6a5cf8" }, "require": { "ext-intl": "*", @@ -2574,20 +2574,18 @@ "role": "Developer" } ], - "description": "Elevate user engagement in Laravel and Symfony projects with PHPFlasher, a comprehensive flash messaging toolkit. This library facilitates streamlined user feedback management and supports a variety of popular notification styles including Noty, Notyf, SweetAlert, and Toastr. PHPFlasher is designed for ease of use, making it accessible to both beginners and experienced developers seeking to enhance the interactive elements of their web applications.", + "description": "The core repository for PHPFlasher, hosting the source code, contributions, issue tracking, and discussions for the PHPFlasher project. This mono-repo serves as the hub for development and community engagement.", "homepage": "https://php-flasher.io", "keywords": [ - "customizable-alerts-php", + "contributions", + "discussions", "flash-messages", - "interactive-web-notifications", - "laravel-notification", - "php-messaging-library", - "php-notification-system", - "php-user-interface", - "symfony-notification", - "user-engagement-php", - "user-feedback-tools", - "web-application-notifications" + "issue-tracking", + "notifications", + "open-source", + "php", + "phpflasher", + "user-feedback" ], "support": { "issues": "https://github.com/php-flasher/php-flasher/issues", @@ -3625,6 +3623,148 @@ ], "time": "2023-06-28T12:59:17+00:00" }, + { + "name": "spatie/laravel-csp", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-csp.git", + "reference": "41165322b0017b1f121969cd91055a5f20bc7c47" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-csp/zipball/41165322b0017b1f121969cd91055a5f20bc7c47", + "reference": "41165322b0017b1f121969cd91055a5f20bc7c47", + "shasum": "" + }, + "require": { + "illuminate/http": "^9.0|^10.0|^11.0", + "illuminate/support": "^9.0|^10.0|^11.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.11" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench": "^7.0|^8.0|^9.0", + "pestphp/pest": "^1.23.0|^2.34.0", + "roave/security-advisories": "dev-master" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\Csp\\CspServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\Csp\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Thomas Verhelst", + "email": "tvke91@gmail.com", + "homepage": "https://spatie.be", + "role": "Developer" + }, + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Add CSP headers to the responses of a Laravel app", + "homepage": "https://github.com/spatie/laravel-csp", + "keywords": [ + "content-security-policy", + "csp", + "headers", + "laravel", + "laravel-csp", + "security", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/laravel-csp/tree/2.9.0" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + } + ], + "time": "2024-02-27T12:13:22+00:00" + }, + { + "name": "spatie/laravel-package-tools", + "version": "1.16.4", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", + "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.28|^10.0|^11.0", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "orchestra/testbench": "^7.7|^8.0", + "pestphp/pest": "^1.22", + "phpunit/phpunit": "^9.5.24", + "spatie/pest-plugin-test-time": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\LaravelPackageTools\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", + "keywords": [ + "laravel-package-tools", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.4" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-03-20T07:29:11+00:00" + }, { "name": "spatie/laravel-ray", "version": "1.36.0", @@ -7205,6 +7345,108 @@ }, "time": "2024-03-08T09:58:59+00:00" }, + { + "name": "larastan/larastan", + "version": "v2.9.5", + "source": { + "type": "git", + "url": "https://github.com/larastan/larastan.git", + "reference": "101f1a4470f87326f4d3995411d28679d8800abe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/larastan/larastan/zipball/101f1a4470f87326f4d3995411d28679d8800abe", + "reference": "101f1a4470f87326f4d3995411d28679d8800abe", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/container": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/contracts": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/database": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/http": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/pipeline": "^9.52.16 || ^10.28.0 || ^11.0", + "illuminate/support": "^9.52.16 || ^10.28.0 || ^11.0", + "php": "^8.0.2", + "phpmyadmin/sql-parser": "^5.9.0", + "phpstan/phpstan": "^1.10.66" + }, + "require-dev": { + "doctrine/coding-standard": "^12.0", + "nikic/php-parser": "^4.19.1", + "orchestra/canvas": "^7.11.1 || ^8.11.0 || ^9.0.2", + "orchestra/testbench": "^7.33.0 || ^8.13.0 || ^9.0.3", + "phpunit/phpunit": "^9.6.13 || ^10.5.16" + }, + "suggest": { + "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Larastan\\Larastan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Can Vural", + "email": "can9119@gmail.com" + }, + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "larastan", + "laravel", + "package", + "php", + "static analysis" + ], + "support": { + "issues": "https://github.com/larastan/larastan/issues", + "source": "https://github.com/larastan/larastan/tree/v2.9.5" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/canvural", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2024-04-16T19:13:34+00:00" + }, { "name": "laravel/pint", "version": "v1.15.1", @@ -8182,6 +8424,94 @@ }, "time": "2024-02-23T11:10:43+00:00" }, + { + "name": "phpmyadmin/sql-parser", + "version": "5.9.0", + "source": { + "type": "git", + "url": "https://github.com/phpmyadmin/sql-parser.git", + "reference": "011fa18a4e55591fac6545a821921dd1d61c6984" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/011fa18a4e55591fac6545a821921dd1d61c6984", + "reference": "011fa18a4e55591fac6545a821921dd1d61c6984", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "phpmyadmin/motranslator": "<3.0" + }, + "require-dev": { + "phpbench/phpbench": "^1.1", + "phpmyadmin/coding-standard": "^3.0", + "phpmyadmin/motranslator": "^4.0 || ^5.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.9.12", + "phpstan/phpstan-phpunit": "^1.3.3", + "phpunit/php-code-coverage": "*", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "^0.16.1", + "vimeo/psalm": "^4.11", + "zumba/json-serializer": "~3.0.2" + }, + "suggest": { + "ext-mbstring": "For best performance", + "phpmyadmin/motranslator": "Translate messages to your favorite locale" + }, + "bin": [ + "bin/highlight-query", + "bin/lint-query", + "bin/sql-parser", + "bin/tokenize-query" + ], + "type": "library", + "autoload": { + "psr-4": { + "PhpMyAdmin\\SqlParser\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "The phpMyAdmin Team", + "email": "developers@phpmyadmin.net", + "homepage": "https://www.phpmyadmin.net/team/" + } + ], + "description": "A validating SQL lexer and parser with a focus on MySQL dialect.", + "homepage": "https://github.com/phpmyadmin/sql-parser", + "keywords": [ + "analysis", + "lexer", + "parser", + "query linter", + "sql", + "sql lexer", + "sql linter", + "sql parser", + "sql syntax highlighter", + "sql tokenizer" + ], + "support": { + "issues": "https://github.com/phpmyadmin/sql-parser/issues", + "source": "https://github.com/phpmyadmin/sql-parser" + }, + "funding": [ + { + "url": "https://www.phpmyadmin.net/donate/", + "type": "other" + } + ], + "time": "2024-01-20T20:34:02+00:00" + }, { "name": "phpstan/phpdoc-parser", "version": "1.28.0", diff --git a/demo/laravel/phpstan.neon.dist b/demo/laravel/phpstan.neon.dist new file mode 100644 index 00000000..078d6c6d --- /dev/null +++ b/demo/laravel/phpstan.neon.dist @@ -0,0 +1,7 @@ +includes: + - vendor/larastan/larastan/extension.neon + +parameters: + level: 9 + paths: + - routes/ diff --git a/demo/laravel/resources/views/welcome.blade.php b/demo/laravel/resources/views/welcome.blade.php index 7d713adc..b5efecff 100644 --- a/demo/laravel/resources/views/welcome.blade.php +++ b/demo/laravel/resources/views/welcome.blade.php @@ -2,18 +2,10 @@ - flash + PHPFlasher + - + diff --git a/demo/laravel/routes/web.php b/demo/laravel/routes/web.php index ec124176..a9226e9d 100644 --- a/demo/laravel/routes/web.php +++ b/demo/laravel/routes/web.php @@ -1,42 +1,17 @@ flash('success', 'Hello from default Symfony'); + // sweetalert()->timerProgressBar()->success('hello from Home Controller'); + // noty()->layout('topCenter')->success('hello from Home Controller'); + // notyf()->ripple(false)->warning('hello from Home Controller'); + // toastr()->positionClass('toast-bottom-left')->error('hello from Home Controller'); + // flash()->use('flasher')->success('hello from flasher factory'); - return << - - - - flash - - - - - - HTML; -})->name('app_home'); - -Route::get('/adapter/{adapter}', function (FlasherInterface $flasher, string $adapter) { - $factory = $flasher->create($adapter); - - $factory->success('Operation completed successfully.'); - $factory->info('Please note that some information has been updated.'); - $factory->warning('This action could have potential consequences.'); - $factory->error('An error occurred while processing your request.'); + flash()->created(new Book('lord of the rings')); + flash()->saved(new Book('harry potter')); return view('welcome'); -})->name('app_adapter'); - -Route::get('/livewire/counter', \App\Livewire\Counter::class); -Route::get('/livewire/eventous', \App\Livewire\Eventous::class); +})->name('app_home'); diff --git a/demo/symfony/composer.json b/demo/symfony/composer.json index 99679c4f..45e397c6 100644 --- a/demo/symfony/composer.json +++ b/demo/symfony/composer.json @@ -16,6 +16,7 @@ "php": ">=8.2", "ext-ctype": "*", "ext-iconv": "*", + "nelmio/security-bundle": "^3.3", "php-flasher/php-flasher": "@dev", "phpstan/phpstan-symfony": "^1.3", "symfony/console": "7.0.*", diff --git a/demo/symfony/composer.lock b/demo/symfony/composer.lock index 65331be8..b13418f4 100644 --- a/demo/symfony/composer.lock +++ b/demo/symfony/composer.lock @@ -4,15 +4,164 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9354bb44b6ee822835a32d7bdc0258dc", + "content-hash": "fdaf8a5cf22e2d2c4ac44c9f4217ef9a", "packages": [ + { + "name": "composer/ca-bundle", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "0c5ccfcfea312b5c5a190a21ac5cef93f74baf99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/0c5ccfcfea312b5c5a190a21ac5cef93f74baf99", + "reference": "0c5ccfcfea312b5c5a190a21ac5cef93f74baf99", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.10", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.5.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-03-15T14:00:32+00:00" + }, + { + "name": "nelmio/security-bundle", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/nelmio/NelmioSecurityBundle.git", + "reference": "6a6c75ef6342385ef732f0b5afa705660177250f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nelmio/NelmioSecurityBundle/zipball/6a6c75ef6342385ef732f0b5afa705660177250f", + "reference": "6a6c75ef6342385ef732f0b5afa705660177250f", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "symfony/framework-bundle": "^5.4 || ^6.3 || ^7.0", + "symfony/http-kernel": "^5.4 || ^6.3 || ^7.0", + "symfony/security-core": "^5.4 || ^6.3 || ^7.0", + "symfony/security-csrf": "^5.4 || ^6.3 || ^7.0", + "symfony/security-http": "^5.4 || ^6.3 || ^7.0", + "symfony/yaml": "^5.4 || ^6.3 || ^7.0", + "ua-parser/uap-php": "^3.4.4" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan-symfony": "^1.1", + "phpunit/phpunit": "^9.5", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/browser-kit": "^5.4 || ^6.3 || ^7.0", + "symfony/cache": "^5.4 || ^6.3 || ^7.0", + "symfony/phpunit-bridge": "^6.3 || ^7.0", + "symfony/twig-bundle": "^5.4 || ^6.3 || ^7.0", + "twig/twig": "^2.10 || ^3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Nelmio\\SecurityBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nelmio", + "homepage": "http://nelm.io" + }, + { + "name": "Symfony Community", + "homepage": "https://github.com/nelmio/NelmioSecurityBundle/contributors" + } + ], + "description": "Extra security-related features for Symfony: signed/encrypted cookies, HTTPS/SSL/HSTS handling, cookie session storage, ...", + "keywords": [ + "security" + ], + "support": { + "issues": "https://github.com/nelmio/NelmioSecurityBundle/issues", + "source": "https://github.com/nelmio/NelmioSecurityBundle/tree/v3.3.0" + }, + "time": "2024-04-10T08:11:27+00:00" + }, { "name": "php-flasher/php-flasher", "version": "2.x-dev", "dist": { "type": "path", "url": "../..", - "reference": "14646df9e5bba5ca45b53815ea28228f2e6b9720" + "reference": "f8262b2e6a75a3130fe97ce95e4b05dd3c6a5cf8" }, "require": { "ext-intl": "*", @@ -126,16 +275,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.66", + "version": "1.10.67", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "94779c987e4ebd620025d9e5fdd23323903950bd" + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/94779c987e4ebd620025d9e5fdd23323903950bd", - "reference": "94779c987e4ebd620025d9e5fdd23323903950bd", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", "shasum": "" }, "require": { @@ -178,26 +327,22 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2024-03-28T16:17:31+00:00" + "time": "2024-04-16T07:22:02+00:00" }, { "name": "phpstan/phpstan-symfony", - "version": "1.3.9", + "version": "1.3.12", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "a32bc86da24495025d7aafd1ba62444d4a364a98" + "reference": "f4b9407fa3203aebafd422ae8f0eb1ef94659a80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/a32bc86da24495025d7aafd1ba62444d4a364a98", - "reference": "a32bc86da24495025d7aafd1ba62444d4a364a98", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/f4b9407fa3203aebafd422ae8f0eb1ef94659a80", + "reference": "f4b9407fa3203aebafd422ae8f0eb1ef94659a80", "shasum": "" }, "require": { @@ -254,9 +399,9 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.9" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.12" }, - "time": "2024-03-16T16:50:20+00:00" + "time": "2024-04-14T13:30:23+00:00" }, { "name": "psr/cache", @@ -1779,6 +1924,78 @@ ], "time": "2024-04-03T06:12:25+00:00" }, + { + "name": "symfony/password-hasher", + "version": "v7.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/password-hasher.git", + "reference": "0eba656c16ecdf5588b3ddd2b2337b06173d839f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/password-hasher/zipball/0eba656c16ecdf5588b3ddd2b2337b06173d839f", + "reference": "0eba656c16ecdf5588b3ddd2b2337b06173d839f", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "conflict": { + "symfony/security-core": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0", + "symfony/security-core": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PasswordHasher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Robin Chalas", + "email": "robin.chalas@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides password hashing utilities", + "homepage": "https://symfony.com", + "keywords": [ + "hashing", + "password" + ], + "support": { + "source": "https://github.com/symfony/password-hasher/tree/v7.0.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-02-12T11:15:03+00:00" + }, { "name": "symfony/polyfill-intl-grapheme", "version": "v1.29.0", @@ -2095,6 +2312,165 @@ ], "time": "2024-01-29T20:11:03+00:00" }, + { + "name": "symfony/property-access", + "version": "v7.0.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "1c268ba954ccc5e78cf035b391abb67759e24423" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/1c268ba954ccc5e78cf035b391abb67759e24423", + "reference": "1c268ba954ccc5e78cf035b391abb67759e24423", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/property-info": "^6.4|^7.0" + }, + "require-dev": { + "symfony/cache": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyAccess\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides functions to read and write from/to an object or array using a simple string notation", + "homepage": "https://symfony.com", + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property-path", + "reflection" + ], + "support": { + "source": "https://github.com/symfony/property-access/tree/v7.0.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-03-19T11:57:22+00:00" + }, + { + "name": "symfony/property-info", + "version": "v7.0.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-info.git", + "reference": "b8844ddce7d53f78b57ec9be59da80fceddf3167" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-info/zipball/b8844ddce7d53f78b57ec9be59da80fceddf3167", + "reference": "b8844ddce7d53f78b57ec9be59da80fceddf3167", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/string": "^6.4|^7.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<5.2", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/dependency-injection": "<6.4", + "symfony/serializer": "<6.4" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^5.2", + "phpstan/phpdoc-parser": "^1.0", + "symfony/cache": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kรฉvin Dunglas", + "email": "dunglas@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts information about PHP class' properties using metadata of popular sources", + "homepage": "https://symfony.com", + "keywords": [ + "doctrine", + "phpdoc", + "property", + "symfony", + "type", + "validator" + ], + "support": { + "source": "https://github.com/symfony/property-info/tree/v7.0.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-03-28T09:20:36+00:00" + }, { "name": "symfony/routing", "version": "v7.0.6", @@ -2255,6 +2631,245 @@ ], "time": "2024-01-23T15:02:46+00:00" }, + { + "name": "symfony/security-core", + "version": "v7.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/security-core.git", + "reference": "72b9d961a5dcd21e6bc29b99df51a9000a15dde0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/security-core/zipball/72b9d961a5dcd21e6bc29b99df51a9000a15dde0", + "reference": "72b9d961a5dcd21e6bc29b99df51a9000a15dde0", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3", + "symfony/password-hasher": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/event-dispatcher": "<6.4", + "symfony/http-foundation": "<6.4", + "symfony/ldap": "<6.4", + "symfony/translation": "<6.4.3|>=7.0,<7.0.3", + "symfony/validator": "<6.4" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "psr/container": "^1.1|^2.0", + "psr/log": "^1|^2|^3", + "symfony/cache": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/ldap": "^6.4|^7.0", + "symfony/string": "^6.4|^7.0", + "symfony/translation": "^6.4.3|^7.0.3", + "symfony/validator": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Security\\Core\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Security Component - Core Library", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/security-core/tree/v7.0.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-23T15:02:46+00:00" + }, + { + "name": "symfony/security-csrf", + "version": "v7.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/security-csrf.git", + "reference": "f0f724e599f069b768e335e4bdf795726c7dfe8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/security-csrf/zipball/f0f724e599f069b768e335e4bdf795726c7dfe8e", + "reference": "f0f724e599f069b768e335e4bdf795726c7dfe8e", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/security-core": "^6.4|^7.0" + }, + "conflict": { + "symfony/http-foundation": "<6.4" + }, + "require-dev": { + "symfony/http-foundation": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Security\\Csrf\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Security Component - CSRF Library", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/security-csrf/tree/v7.0.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-23T15:02:46+00:00" + }, + { + "name": "symfony/security-http", + "version": "v7.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/security-http.git", + "reference": "f3a70a937128f47366821a9f4b5dbfaa0ba9c862" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/security-http/zipball/f3a70a937128f47366821a9f4b5dbfaa0ba9c862", + "reference": "f3a70a937128f47366821a9f4b5dbfaa0ba9c862", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/security-core": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/clock": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/http-client-contracts": "<3.0", + "symfony/security-bundle": "<6.4", + "symfony/security-csrf": "<6.4" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/cache": "^6.4|^7.0", + "symfony/clock": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-client-contracts": "^3.0", + "symfony/rate-limiter": "^6.4|^7.0", + "symfony/routing": "^6.4|^7.0", + "symfony/security-csrf": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", + "web-token/jwt-checker": "^3.1", + "web-token/jwt-signature-algorithm-ecdsa": "^3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Security\\Http\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Security Component - HTTP Integration", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/security-http/tree/v7.0.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-02-26T07:52:39+00:00" + }, { "name": "symfony/service-contracts", "version": "v3.4.2", @@ -3019,34 +3634,34 @@ }, { "name": "twig/extra-bundle", - "version": "v3.8.0", + "version": "v3.9.0", "source": { "type": "git", "url": "https://github.com/twigphp/twig-extra-bundle.git", - "reference": "32807183753de0388c8e59f7ac2d13bb47311140" + "reference": "3a68ffc7747ecc25823cabe2127710ced516a16a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/32807183753de0388c8e59f7ac2d13bb47311140", - "reference": "32807183753de0388c8e59f7ac2d13bb47311140", + "url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/3a68ffc7747ecc25823cabe2127710ced516a16a", + "reference": "3a68ffc7747ecc25823cabe2127710ced516a16a", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/framework-bundle": "^5.4|^6.0|^7.0", - "symfony/twig-bundle": "^5.4|^6.0|^7.0", + "symfony/framework-bundle": "^5.4|^6.4|^7.0", + "symfony/twig-bundle": "^5.4|^6.4|^7.0", "twig/twig": "^3.0" }, "require-dev": { "league/commonmark": "^1.0|^2.0", "symfony/phpunit-bridge": "^6.4|^7.0", "twig/cache-extra": "^3.0", - "twig/cssinliner-extra": "^2.12|^3.0", - "twig/html-extra": "^2.12|^3.0", - "twig/inky-extra": "^2.12|^3.0", - "twig/intl-extra": "^2.12|^3.0", - "twig/markdown-extra": "^2.12|^3.0", - "twig/string-extra": "^2.12|^3.0" + "twig/cssinliner-extra": "^3.0", + "twig/html-extra": "^3.0", + "twig/inky-extra": "^3.0", + "twig/intl-extra": "^3.0", + "twig/markdown-extra": "^3.0", + "twig/string-extra": "^3.0" }, "type": "symfony-bundle", "autoload": { @@ -3077,7 +3692,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.8.0" + "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.9.0" }, "funding": [ { @@ -3089,34 +3704,41 @@ "type": "tidelift" } ], - "time": "2023-11-21T14:02:01+00:00" + "time": "2024-02-07T08:24:24+00:00" }, { "name": "twig/twig", - "version": "v3.8.0", + "version": "v3.9.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d" + "reference": "47857eebb197745f66369b76c044a2359e3cc5b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", - "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/47857eebb197745f66369b76c044a2359e3cc5b9", + "reference": "47857eebb197745f66369b76c044a2359e3cc5b9", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3", "symfony/polyfill-php80": "^1.22" }, "require-dev": { "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0" + "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, "type": "library", "autoload": { + "files": [ + "src/Resources/core.php", + "src/Resources/debug.php", + "src/Resources/escaper.php", + "src/Resources/string_loader.php" + ], "psr-4": { "Twig\\": "src/" } @@ -3149,7 +3771,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.8.0" + "source": "https://github.com/twigphp/Twig/tree/v3.9.0" }, "funding": [ { @@ -3161,7 +3783,70 @@ "type": "tidelift" } ], - "time": "2023-11-21T18:54:41+00:00" + "time": "2024-04-16T16:04:21+00:00" + }, + { + "name": "ua-parser/uap-php", + "version": "v3.9.14", + "source": { + "type": "git", + "url": "https://github.com/ua-parser/uap-php.git", + "reference": "b796c5ea5df588e65aeb4e2c6cce3811dec4fed6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ua-parser/uap-php/zipball/b796c5ea5df588e65aeb4e2c6cce3811dec4fed6", + "reference": "b796c5ea5df588e65aeb4e2c6cce3811dec4fed6", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.1", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.33", + "phpunit/phpunit": "^8 || ^9", + "symfony/console": "^3.4 || ^4.2 || ^4.3 || ^5.0", + "symfony/filesystem": "^3.4 || ^4.2 || ^4.3 || ^5.0", + "symfony/finder": "^3.4 || ^4.2 || ^4.3 || ^5.0", + "symfony/yaml": "^3.4 || ^4.2 || ^4.3 || ^5.0", + "vimeo/psalm": "^3.12" + }, + "suggest": { + "symfony/console": "Required for CLI usage - ^3.4 || ^4.3 || ^5.0", + "symfony/filesystem": "Required for CLI usage - ^3.4 || ^4.3 || ^5.0", + "symfony/finder": "Required for CLI usage - ^3.4 || ^4.3 || ^5.0", + "symfony/yaml": "Required for CLI usage - ^3.4 || ^4.3 || ^5.0" + }, + "bin": [ + "bin/uaparser" + ], + "type": "library", + "autoload": { + "psr-4": { + "UAParser\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dave Olsen", + "email": "dmolsen@gmail.com" + }, + { + "name": "Lars Strojny", + "email": "lars@strojny.net" + } + ], + "description": "A multi-language port of Browserscope's user agent parser.", + "support": { + "issues": "https://github.com/ua-parser/uap-php/issues", + "source": "https://github.com/ua-parser/uap-php/tree/v3.9.14" + }, + "time": "2020-10-02T23:36:20+00:00" } ], "packages-dev": [ diff --git a/demo/symfony/config/bundles.php b/demo/symfony/config/bundles.php index 15210b37..daf6b004 100644 --- a/demo/symfony/config/bundles.php +++ b/demo/symfony/config/bundles.php @@ -10,4 +10,5 @@ return [ Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], + Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true], ]; diff --git a/demo/symfony/config/packages/nelmio_security.yaml b/demo/symfony/config/packages/nelmio_security.yaml new file mode 100644 index 00000000..126b813d --- /dev/null +++ b/demo/symfony/config/packages/nelmio_security.yaml @@ -0,0 +1,33 @@ +nelmio_security: + # prevents framing of the entire site + clickjacking: + paths: + '^/.*': DENY + + # disables content type sniffing for script resources + content_type: + nosniff: true + + # forces Microsoft's XSS-Protection with + # its block mode + xss_protection: + enabled: true + mode_block: true + + # Send a full URL in the `Referer` header when performing a same-origin request, + # only send the origin of the document to secure destination (HTTPS->HTTPS), + # and send no header to a less secure destination (HTTPS->HTTP). + # If `strict-origin-when-cross-origin` is not supported, use `no-referrer` policy, + # no referrer information is sent along with requests. + referrer_policy: + enabled: true + policies: + - 'no-referrer' + - 'strict-origin-when-cross-origin' + + csp: + enabled: true + + enforce: + script-src: + - 'self' diff --git a/demo/symfony/phpstan.dist.neon b/demo/symfony/phpstan.dist.neon index 548b4cce..a0ee91d7 100644 --- a/demo/symfony/phpstan.dist.neon +++ b/demo/symfony/phpstan.dist.neon @@ -1,5 +1,3 @@ -includes: - - vendor/php-flasher/php-flasher/src/Prime/extension.neon parameters: level: 9 paths: diff --git a/demo/symfony/src/Controller/HomeController.php b/demo/symfony/src/Controller/HomeController.php index 1c8df04d..68bbc753 100644 --- a/demo/symfony/src/Controller/HomeController.php +++ b/demo/symfony/src/Controller/HomeController.php @@ -2,7 +2,7 @@ namespace App\Controller; -use Flasher\Prime\FlasherInterface; +use App\Entity\Book; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; @@ -10,19 +10,19 @@ use Symfony\Component\Routing\Attribute\Route; class HomeController extends AbstractController { #[Route('/', name: 'app_home')] - public function index(FlasherInterface $flasher): Response + public function index(): Response { - $this->addFlash('success', 'welcome from php-flasher'); + sweetalert()->timerProgressBar()->success('hello from Home Controller'); + noty()->layout('topCenter')->success('hello from Home Controller'); + notyf()->ripple(false)->warning('hello from Home Controller'); + toastr()->positionClass('toast-bottom-left')->error('hello from Home Controller'); + flash()->use('flasher')->success('hello from flasher factory'); - flash()->info('hello from Home Controller', ['timeout' => 60000]); - $flasher->info('hello from Home Controller', ['timeout' => 60000]); + flash()->created(new Book('lord of the rings')); + flash()->saved(new Book('harry potter')); - sweetalert()->success('hello from Home Controller', ['timeout' => 60000]); - noty()->success('hello from Home Controller', ['timeout' => 60000]); - notyf()->warning('hello from Home Controller', ['timeout' => 60000]); - - toastr()->error('hello from Home Controller', ['timeout' => 60000]); - \Flasher\Toastr\Prime\toastr()->error('hello from Home Controller', ['timeout' => 60000]); + // flash()->updated(); + // flash()->deleted(); return $this->render('home/index.html.twig', [ 'controller_name' => 'HomeController', diff --git a/demo/symfony/src/Entity/Book.php b/demo/symfony/src/Entity/Book.php new file mode 100644 index 00000000..81937314 --- /dev/null +++ b/demo/symfony/src/Entity/Book.php @@ -0,0 +1,15 @@ +title); + } +} diff --git a/demo/symfony/symfony.lock b/demo/symfony/symfony.lock index c9098e0c..fb7e1f01 100644 --- a/demo/symfony/symfony.lock +++ b/demo/symfony/symfony.lock @@ -1,4 +1,16 @@ { + "nelmio/security-bundle": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "2.4", + "ref": "65726efb67ff51d89de38195bc0d230fa811f64d" + }, + "files": [ + "config/packages/nelmio_security.yaml" + ] + }, "phpstan/phpstan": { "version": "1.10", "recipe": { diff --git a/demo/symfony/templates/home/index.html.twig b/demo/symfony/templates/home/index.html.twig index a4661ebf..1dc31173 100644 --- a/demo/symfony/templates/home/index.html.twig +++ b/demo/symfony/templates/home/index.html.twig @@ -1,20 +1,7 @@ {% extends 'base.html.twig' %} -{% block title %}Hello HomeController!{% endblock %} +{% block title %}PHPFlasher{% endblock %} {% block body %} - -
-

Hello {{ controller_name }}! โœ…

- - This friendly message is coming from: - -
{% endblock %} diff --git a/docs/Gemfile b/docs/Gemfile index ca7c88a8..67c3d52a 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -3,6 +3,8 @@ source 'https://rubygems.org' gem 'jekyll' gem 'csv' gem 'bigdecimal' +gem 'base64' +gem 'kramdown-parser-gfm' group :jekyll_plugins do gem 'jekyll-sitemap' @@ -10,4 +12,4 @@ group :jekyll_plugins do gem 'jekyll-seo-tag' end -gem "webrick", "~> 1.8" +gem "webrick" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 3ad9d033..92d39954 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -3,6 +3,7 @@ GEM specs: addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) + base64 (0.2.0) bigdecimal (3.1.7) colorator (1.1.0) concurrent-ruby (1.2.3) @@ -57,18 +58,18 @@ GEM mercenary (0.4.0) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (5.0.4) - rake (13.1.0) + public_suffix (5.0.5) + rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.6) rouge (4.2.1) safe_yaml (1.0.5) - sass-embedded (1.72.0) + sass-embedded (1.76.0) google-protobuf (>= 3.25, < 5.0) rake (>= 13.0.0) - sass-embedded (1.72.0-x86_64-linux-gnu) + sass-embedded (1.76.0-x86_64-linux-gnu) google-protobuf (>= 3.25, < 5.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -80,13 +81,15 @@ PLATFORMS x86_64-linux DEPENDENCIES + base64 bigdecimal csv jekyll jekyll-redirect-from jekyll-seo-tag jekyll-sitemap - webrick (~> 1.8) + kramdown-parser-gfm + webrick BUNDLED WITH 2.5.6 diff --git a/docs/_data/manifest.json b/docs/_data/manifest.json index 0614a129..8089f10d 100644 --- a/docs/_data/manifest.json +++ b/docs/_data/manifest.json @@ -1,21 +1,21 @@ { - "dist/main.css": "/dist/main.89ac14de.css", - "dist/main.js": "/dist/main.4d227167.js", + "dist/main.css": "/dist/main.73b25228.css", + "dist/main.js": "/dist/main.09f63ce9.js", "dist/455.3a7b4474.css": "/dist/455.3a7b4474.css", - "dist/455.17bc016b.js": "/dist/455.17bc016b.js", + "dist/455.095e6545.js": "/dist/455.095e6545.js", "dist/411.29cd993e.css": "/dist/411.29cd993e.css", - "dist/411.42e6794f.js": "/dist/411.42e6794f.js", + "dist/411.277b21bc.js": "/dist/411.277b21bc.js", "dist/641.c0be7378.css": "/dist/641.c0be7378.css", - "dist/641.f8750364.js": "/dist/641.f8750364.js", + "dist/641.a938263c.js": "/dist/641.a938263c.js", "dist/160.554a2dcd.css": "/dist/160.554a2dcd.css", - "dist/160.264e6e64.js": "/dist/160.264e6e64.js", - "dist/265.396597b6.js": "/dist/265.396597b6.js", + "dist/160.22e7905c.js": "/dist/160.22e7905c.js", + "dist/265.52505228.js": "/dist/265.52505228.js", "dist/371.9523a7ff.css": "/dist/371.9523a7ff.css", - "dist/371.324a7072.js": "/dist/371.324a7072.js", + "dist/371.f9d2cf4e.js": "/dist/371.f9d2cf4e.js", "dist/735.11112420.css": "/dist/735.11112420.css", - "dist/735.3cd4e509.js": "/dist/735.3cd4e509.js", + "dist/735.5b8d44b1.js": "/dist/735.5b8d44b1.js", "dist/243.699ba66f.css": "/dist/243.699ba66f.css", "dist/243.991d9535.js": "/dist/243.991d9535.js", "dist/107.6a2ea759.css": "/dist/107.6a2ea759.css", - "dist/107.12087179.js": "/dist/107.12087179.js" + "dist/107.090fb6e1.js": "/dist/107.090fb6e1.js" } \ No newline at end of file diff --git a/docs/_data/menu.yml b/docs/_data/menu.yml index b59581d3..47d23d89 100644 --- a/docs/_data/menu.yml +++ b/docs/_data/menu.yml @@ -4,7 +4,6 @@ Laravel: '/laravel/' Livewire: '/livewire/' Inertia: '/inertia/' - PHPstan: '/phpstan/' libraries: Noty: '/library/noty/' diff --git a/docs/_includes/_usage.md b/docs/_includes/_usage.md index 58a7a7b5..aac9755e 100644 --- a/docs/_includes/_usage.md +++ b/docs/_includes/_usage.md @@ -12,16 +12,18 @@ Then, before returning a view or redirecting, call the `success()` method and pa ```php {{ id }} +use Flasher\Prime\FlasherInterface; + class BookController { public function saveBook() { // ... - flash('{{ message }}'); - flash()->success('{{ site.data.messages["success"] | sample }}'); - + + flash('{{ message }}'); + // ... redirect or render the view } @@ -31,9 +33,9 @@ class BookController public function register(FlasherInterface $flasher) { // ... - + $flasher->success('{{ site.data.messages["success"] | sample }}'); - + // ... redirect or render the view } } @@ -116,31 +118,27 @@ flash()->flash(string $type, string $message, string $title = null, array $optio flash()->flash('{{ type }}', '{{ message }}'); ``` -| param | description | -|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `$type` | Notification type : success, error, warning, info ....etc | -| `$message` | The body of the message you want to deliver to your user. This may contain HTML. If you add links, be sure to add the appropriate classes for the framework you are using. | -| `$title` | The notification title, Can also include HTML | -| `$options` | Custom options for javascript libraries (toastr, noty, notyf ...etc) | | +| param | description | +|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `$type` | Notification type : success, error, warning, info | +| `$message` | The body of the message you want to deliver to your user. This may contain HTML. If you add links, be sure to add the appropriate classes for the framework you are using. | +| `$title` | The notification title, Can also include HTML | +| `$options` | Custom options for javascript libraries (toastr, noty, notyf ...etc) | --- -## Modifiers -

options

-You can specify **custom options** for the flash messages when using a JavaScript library like `toastr`, `noty`, or `notyf`.

The `options()` method allows you to set multiple options at once by passing an array of `key-value` pairs, while the `option()` method allows you to set a single option by specifying its name and value as separate arguments.

-The optional `$merge` argument for the `options()` method can be used to specify whether the new options should be merged with any existing options, +The optional `$append` argument for the `options()` method can be used to specify whether the new options should be appended to any existing options, or whether they should overwrite them. ```php -flash()->options(array $options, bool $merge = true); +flash()->options(array $options, bool $append = true); ``` -> Refer to the documentation for your chosen JavaScript library to see which options are available and how they should be formatted. {% assign id = '#/ usage options' %} {% assign type = site.data.messages.types | sample %} @@ -158,12 +156,6 @@ flash() ]) ->{{ type }}('{{ message }}'); ``` - -| param | description | -|------------|--------------------------------------------------------------------------------------| -| `$options` | Custom options to be passed to the javascript libraries (toastr, noty, notyf ...etc) | -| `$merge` | Merge options if you call the options method multiple times | - ---

option

@@ -189,11 +181,6 @@ flash() ->{{ type }}('{{ message }}'); ``` -| param | description | -|-----------|--------------| -| `$option` | Option key | -| `$value` | Option value | - ---

priority

diff --git a/docs/_includes/playground.html b/docs/_includes/playground.html new file mode 100644 index 00000000..24c7b88e --- /dev/null +++ b/docs/_includes/playground.html @@ -0,0 +1,42 @@ +
+
+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ + + + +
+
+
+ +
+ + +
+ +
+
+
+
+
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 96fb5d6c..077a706c 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -10,6 +10,11 @@
{% endif %} +
+ ๐Ÿ‡ต๐Ÿ‡ธ Solidarity with Palestine. + We seek justice and peace, and strongly oppose all forms of injustice and genocide. +
+
-
- ๐Ÿ‡ต๐Ÿ‡ธ Solidarity with Palestine. - We seek justice and peace, and we strongly oppose all forms of injustice and genocide. Together, we support the rights and freedom of the Palestinian people. -
-