Prepare v1.0 release

rename template adapter to flasher, and add title to base notification class

Wip
This commit is contained in:
KHOUBZA Younes
2022-05-16 08:07:49 +01:00
parent cceaa9d814
commit ac6d046c63
689 changed files with 7328 additions and 15180 deletions
+23 -134
View File
@@ -1,160 +1,49 @@
name: Running tests
name: tests
on:
push:
pull_request:
schedule:
- cron: '* * * * *'
jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
laravel:
- 8.*
- 7.*
- 6.*
- 5.8.*
- 5.7.*
- 5.6.*
- 5.5.*
- 5.4.*
- 5.3.*
- 5.2.*
- 5.1.*
- 5.0.*
- 4.2.*
- 4.1.*
- 4.0.*
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
laravel: [ 9.*, 8.*, 7.*, 6.*, 5.8.*, 5.7.*, 5.6.*, 5.5.*, 5.4.*, 5.3.*, 5.2.*, 5.1.*, 5.0.*, 4.2.*, 4.1.*, 4.0.* ]
include:
- laravel: 8.*
testbench: 6.*
php: 7.3
phpunit: 9.3.*
- { laravel: 9.*, testbench: 7.*, php: 8.0, phpunit: 9.5.* }
- { laravel: 8.*, testbench: 6.*, php: 7.3, phpunit: 9.3.* }
- { laravel: 7.*, testbench: 5.*, php: 7.3, phpunit: 8.4.* }
- { laravel: 6.*, testbench: 4.*, php: 7.2, phpunit: 8.3.* }
- { laravel: 5.8.*, testbench: 3.8.*, php: 7.1, phpunit: 7.5.* }
- { laravel: 5.7.*, testbench: 3.7.*, php: 7.1, phpunit: 7.0.* }
- { laravel: 5.6.*, testbench: 3.6.*, php: 7.1, phpunit: 7.0.* }
- { laravel: 5.5.*, testbench: 3.5.*, php: 7.0, phpunit: 6.0.* }
- { laravel: 5.4.*, testbench: 3.4.*, php: 5.6, phpunit: 5.7.* }
- { laravel: 5.3.*, testbench: 3.3.*, php: 5.6, phpunit: 4.8.* }
- { laravel: 5.2.*, testbench: 3.2.*, php: 5.5, phpunit: 4.8.* }
- { laravel: 5.1.*, testbench: 3.1.*, php: 5.5, phpunit: 4.8.* }
- { laravel: 5.0.*, testbench: 3.0.*, php: 5.4, phpunit: 4.8.* }
- { laravel: 4.2.*, testbench: 2.2.*, php: 5.4, phpunit: 4.8.* }
- { laravel: 4.1.*, testbench: 2.1.*, php: 5.4, phpunit: 4.8.* }
- { laravel: 4.0.*, testbench: 2.0.*, php: 5.4, phpunit: 4.8.* }
- laravel: 7.*
testbench: 5.*
php: 7.3
phpunit: 8.4.*
- laravel: 6.*
testbench: 4.*
php: 7.2
phpunit: 8.3.*
- laravel: 5.8.*
testbench: 3.8.*
php: 7.1
phpunit: 7.5.*
- laravel: 5.7.*
testbench: 3.7.*
php: 7.1
phpunit: 7.0.*
- laravel: 5.6.*
testbench: 3.6.*
php: 7.1
phpunit: 7.0.*
- laravel: 5.5.*
testbench: 3.5.*
php: 7.0
phpunit: 6.0.*
- laravel: 5.4.*
testbench: 3.4.*
php: 5.6
phpunit: 5.7.*
- laravel: 5.3.*
testbench: 3.3.*
php: 5.6
phpunit: 4.8.*
- laravel: 5.2.*
testbench: 3.2.*
php: 5.5
phpunit: 4.8.*
- laravel: 5.1.*
testbench: 3.1.*
php: 5.5
phpunit: 4.8.*
- laravel: 5.0.*
testbench: 3.0.*
php: 5.4
phpunit: 4.8.*
- laravel: 4.2.*
testbench: 2.2.*
php: 5.4
phpunit: 4.8.*
- laravel: 4.1.*
testbench: 2.1.*
php: 5.4
phpunit: 4.8.*
- laravel: 4.0.*
testbench: 2.0.*
php: 5.4
phpunit: 4.8.*
name: ${{ matrix.os }} - L${{ matrix.laravel }} - P${{ matrix.php }}
name: laravel[${{ matrix.laravel }}] php[${{ matrix.php }}]
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
ini-values: memory_limit=-1
coverage: none
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-suggest
composer remove friendsofphp/php-cs-fixer laravel/laravel livewire/livewire phpstan/phpstan symfony/symfony orchestra/testbench phpunit/phpunit --dev
composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction
- name: Execute tests
run: vendor/bin/phpunit --configuration=phpunit-laravel.xml
- name: Install Flasher Depencies
run: |
composer require "php-flasher/flasher:^0.9"
composer require "php-flasher/flasher-laravel:^0.9"
composer require "php-flasher/flasher-cli:^0.9"
composer require "php-flasher/flasher-cli-laravel:^0.9"
composer require "php-flasher/flasher-toastr:^0.9"
composer require "php-flasher/flasher-toastr-laravel:^0.9"
composer require "php-flasher/flasher-noty:^0.9"
composer require "php-flasher/flasher-noty-laravel:^0.9"
composer require "php-flasher/flasher-notyf:^0.9"
composer require "php-flasher/flasher-notyf-laravel:^0.9"
composer require "php-flasher/flasher-sweet-alert:^0.9"
composer require "php-flasher/flasher-sweet-alert-laravel:^0.9"
composer require "php-flasher/flasher-pnotify:^0.9"
composer require "php-flasher/flasher-pnotify-laravel:^0.9"
+78
View File
@@ -0,0 +1,78 @@
name: Split Monorepo
on:
push:
branches:
- main
tags:
- '*'
jobs:
split_monorepo:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- { path: 'src/Prime', repo: 'flasher' }
- { path: 'src/Laravel', repo: 'flasher-laravel' }
- { path: 'src/Symfony', repo: 'flasher-symfony' }
- { path: 'src/Cli/Prime', repo: 'flasher-cli' }
- { path: 'src/Cli/Laravel', repo: 'flasher-cli-laravel' }
- { path: 'src/Cli/Symfony', repo: 'flasher-cli-symfony' }
- { path: 'src/Noty/Prime', repo: 'flasher-noty' }
- { path: 'src/Noty/Laravel', repo: 'flasher-noty-laravel' }
- { path: 'src/Noty/Symfony', repo: 'flasher-noty-symfony' }
- { path: 'src/Notyf/Prime', repo: 'flasher-notyf' }
- { path: 'src/Notyf/Laravel', repo: 'flasher-notyf-laravel' }
- { path: 'src/Notyf/Symfony', repo: 'flasher-notyf-symfony' }
- { path: 'src/Pnotify/Prime', repo: 'flasher-pnotify' }
- { path: 'src/Pnotify/Laravel', repo: 'flasher-pnotify-laravel' }
- { path: 'src/Pnotify/Symfony', repo: 'flasher-pnotify-symfony' }
- { path: 'src/SweetAlert/Prime', repo: 'flasher-sweetalert' }
- { path: 'src/SweetAlert/Laravel', repo: 'flasher-sweetalert-laravel' }
- { path: 'src/SweetAlert/Symfony', repo: 'flasher-sweetalert-symfony' }
- { path: 'src/Toastr/Prime', repo: 'flasher-toastr' }
- { path: 'src/Toastr/Laravel', repo: 'flasher-toastr-laravel' }
- { path: 'src/Toastr/Symfony', repo: 'flasher-toastr-symfony' }
- { path: 'packs/php-pack', repo: 'php-pack' }
- { path: 'packs/laravel-pack', repo: 'laravel-pack' }
- { path: 'packs/symfony-pack', repo: 'symfony-pack' }
steps:
- uses: actions/checkout@v2
- if: "!startsWith(github.ref, 'refs/tags/')"
name: Monorepo Split of ${{ matrix.package }}
uses: symplify/github-action-monorepo-split@2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
package-directory: '${{ matrix.package.path }}'
split-repository-organization: 'php-flasher'
split-repository-name: '${{ matrix.package.repo }}'
user-name: "Younes KHOUBZA"
user-email: "younes.khoubza@gmail.com"
branch: main
- if: "startsWith(github.ref, 'refs/tags/')"
name: Monorepo Tagged Split of ${{ matrix.package }}
uses: symplify/github-action-monorepo-split@2.0
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag: ${GITHUB_REF#refs/tags/}
package-directory: 'src/${{ matrix.package.path }}'
split-repository-organization: 'php-flasher'
split-repository-name: '${{ matrix.package.repo }}'
user-name: "Younes KHOUBZA"
user-email: "younes.khoubza@gmail.com"
branch: main
+32 -164
View File
@@ -1,191 +1,59 @@
name: Running tests
name: tests
on:
push:
pull_request:
schedule:
- cron: '* * * * *'
jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
symfony:
- 5.4.*
- 5.3.*
- 5.2.*
- 5.1.*
- 5.0.*
- 4.4.*
- 4.3.*
- 4.2.*
- 4.1.*
- 4.0.*
- 3.4.*
- 3.3.*
- 3.2.*
- 3.1.*
- 3.0.*
- 2.8.*
- 2.7.*
- 2.6.*
- 2.5.*
- 2.4.*
- 2.3.*
- 2.2.*
- 2.1.*
- 2.0.*
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
symfony: [ 6.0.*, 5.4.*, 5.3.*, 5.2.*, 5.1.*, 5.0.*, 4.4.*, 4.3.*, 4.2.*, 4.1.*, 4.0.*, 3.4.*, 3.3.*, 3.2.*, 3.1.*, 3.0.*, 2.8.*, 2.7.*, 2.6.*, 2.5.*, 2.4.*, 2.3.*, 2.2.*, 2.1.*, 2.0.* ]
include:
- symfony: 5.4.*
php: 7.2
phpunit: 8.3.*
- { symfony: 6.0.*, php: 8.0, phpunit: 9.5.* }
- { symfony: 5.4.*, php: 7.2, phpunit: 8.3.* }
- { symfony: 5.3.*, php: 7.2, phpunit: 8.3.* }
- { symfony: 5.2.*, php: 7.2, phpunit: 8.3.* }
- { symfony: 5.1.*, php: 7.2, phpunit: 8.3.* }
- { symfony: 5.0.*, php: 7.2, phpunit: 8.3.* }
- { symfony: 4.4.*, php: 7.1, phpunit: 7.0.* }
- { symfony: 4.3.*, php: 7.1, phpunit: 7.0.* }
- { symfony: 4.2.*, php: 7.1, phpunit: 7.0.* }
- { symfony: 4.1.*, php: 7.1, phpunit: 7.0.* }
- { symfony: 4.0.*, php: 7.1, phpunit: 7.0.* }
- { symfony: 3.4.*, php: 5.5, phpunit: 4.8.36 }
- { symfony: 3.3.*, php: 5.5, phpunit: 4.8.36 }
- { symfony: 3.2.*, php: 5.5, phpunit: 4.8.36 }
- { symfony: 3.1.*, php: 5.5, phpunit: 4.8.36 }
- { symfony: 3.0.*, php: 5.5, phpunit: 4.8.36 }
- { symfony: 2.8.*, php: 5.3, phpunit: 4.8.36 }
- { symfony: 2.7.*, php: 5.3, phpunit: 4.8.36 }
- { symfony: 2.6.*, php: 5.3, phpunit: 4.8.36 }
- { symfony: 2.5.*, php: 5.3, phpunit: 4.8.36 }
- { symfony: 2.4.*, php: 5.3, phpunit: 4.8.36 }
- { symfony: 2.3.*, php: 5.3, phpunit: 4.8.36 }
- { symfony: 2.2.*, php: 5.3, phpunit: 4.8.36 }
- { symfony: 2.1.*, php: 5.3, phpunit: 4.8.36 }
- { symfony: 2.0.*, php: 5.3, phpunit: 4.8.36 }
- symfony: 5.3.*
php: 7.2
phpunit: 8.3.*
- symfony: 5.2.*
php: 7.2
phpunit: 8.3.*
- symfony: 5.1.*
php: 7.2
phpunit: 8.3.*
- symfony: 5.0.*
php: 7.2
phpunit: 8.3.*
- symfony: 4.4.*
php: 7.1
phpunit: 7.0.*
- symfony: 4.3.*
php: 7.1
phpunit: 7.0.*
- symfony: 4.2.*
php: 7.1
phpunit: 7.0.*
- symfony: 4.1.*
php: 7.1
phpunit: 7.0.*
- symfony: 4.0.*
php: 7.1
phpunit: 7.0.*
- symfony: 3.4.*
php: 5.5
phpunit: 4.8.36
- symfony: 3.3.*
php: 5.5
phpunit: 4.8.36
- symfony: 3.2.*
php: 5.5
phpunit: 4.8.36
- symfony: 3.1.*
php: 5.5
phpunit: 4.8.36
- symfony: 3.0.*
php: 5.5
phpunit: 4.8.36
- symfony: 2.8.*
php: 5.3
phpunit: 4.8.36
- symfony: 2.7.*
php: 5.3
phpunit: 4.8.36
- symfony: 2.6.*
php: 5.3
phpunit: 4.8.36
- symfony: 2.5.*
php: 5.3
phpunit: 4.8.36
- symfony: 2.4.*
php: 5.3
phpunit: 4.8.36
- symfony: 2.3.*
php: 5.3
phpunit: 4.8.36
- symfony: 2.2.*
php: 5.3
phpunit: 4.8.36
- symfony: 2.1.*
php: 5.3
phpunit: 4.8.36
- symfony: 2.0.*
php: 5.3
phpunit: 4.8.36
name: ${{ matrix.os }} - S${{ matrix.symfony }} - P${{ matrix.php }}
name: symfony[${{ matrix.symfony }}] php[${{ matrix.php }}]
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-symfony-${{ matrix.symfony }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Install dependencies
run: |
composer require "symfony/symfony:${{ matrix.symfony }}" "phpunit/phpunit:${{ matrix.phpunit }}" twig/twig --no-interaction --no-update
composer remove friendsofphp/php-cs-fixer laravel/laravel livewire/livewire phpstan/phpstan symfony/symfony orchestra/testbench phpunit/phpunit --dev
composer config extra.symfony.require "${{ matrix.symfony }}"
composer update --prefer-dist --no-interaction --no-suggest
composer require "symfony/symfony:${{ matrix.symfony }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction
- name: Execute tests
run: vendor/bin/phpunit --configuration=phpunit-symfony.xml
- name: Install Flasher Depencies
run: |
composer require "php-flasher/flasher:^0.9"
composer require "php-flasher/flasher-laravel:^0.9"
composer require "php-flasher/flasher-symfony:^0.9"
composer require "php-flasher/flasher-cli:^0.9"
composer require "php-flasher/flasher-cli-symfony:^0.9"
composer require "php-flasher/flasher-toastr:^0.9"
composer require "php-flasher/flasher-toastr-symfony:^0.9"
composer require "php-flasher/flasher-noty:^0.9"
composer require "php-flasher/flasher-noty-symfony:^0.9"
composer require "php-flasher/flasher-notyf:^0.9"
composer require "php-flasher/flasher-notyf-symfony:^0.9"
composer require "php-flasher/flasher-sweet-alert:^0.9"
composer require "php-flasher/flasher-sweet-alert-symfony:^0.9"
composer require "php-flasher/flasher-pnotify:^0.9"
composer require "php-flasher/flasher-pnotify-symfony:^0.9"