Compare commits

..

20 Commits

Author SHA1 Message Date
Khoubza Younes 23d828c6f2 feat: update all README.md files 2023-01-21 16:16:28 +01:00
Khoubza Younes 419cca27ca add auto_closer.yaml file 2023-01-15 16:34:34 +01:00
Khoubza Younes b74f36b824 update composer files 2023-01-15 16:15:56 +01:00
Khoubza Younes fc4dbd5a1d update composer files description 2023-01-14 20:30:56 +01:00
Khoubza Younes de1556435a remove packs auto_closer github workflows 2023-01-14 20:16:06 +01:00
Khoubza Younes 6cf3101dec normalize packs composer files 2023-01-14 20:15:50 +01:00
Khoubza Younes aba8f328f0 format Ash Allen book and blog section 2023-01-13 16:40:46 +01:00
Khoubza Younes 5d31249b4c add Ash Allen blog 2023-01-13 16:39:19 +01:00
Khoubza Younes edfc554c21 add Lucas Maciel to the list of contributors 2023-01-13 14:50:51 +01:00
Khoubza Younes 33220ce041 add Mr. Nashwan youtube channel and Ash Allen Battle Ready Laravel book 2023-01-13 14:31:32 +01:00
Khoubza Younes 056dc821c2 update GitHub Community Health Files 2023-01-13 06:06:50 +01:00
Khoubza Younes 27c7b2e79a use a simple README.md on all repositories 2023-01-11 04:53:34 +01:00
Khoubza Younes 14ccfc56c7 update composer.json keywords 2023-01-11 04:44:50 +01:00
Khoubza Younes 91ba09fd39 fix: add more entries to FUNDING.yml 2022-12-25 20:25:25 +01:00
KHOUBZA Younes 5af384ecc2 update README 2022-11-06 12:33:41 +01:00
KHOUBZA Younes 351b9c5ac3 use PHPFlasher instead of PHP Flasher 2022-10-29 18:51:51 +01:00
KHOUBZA Younes 5bc76179ce update laravel and php packs readme 2022-09-25 17:40:54 +01:00
KHOUBZA Younes d3a6280f56 update github sponsor button 2022-07-31 16:13:01 +01:00
KHOUBZA Younes abbf475553 Prepare v1.0 release
rename template adapter to flasher, and add title to base notification class

Wip
2022-05-16 08:18:15 +01:00
Khoubza Younes 15f2b9a71e groups packages into packs 2022-03-09 09:21:16 +01:00
465 changed files with 9 additions and 28671 deletions
-1
View File
@@ -1 +0,0 @@
undefined
-3
View File
@@ -1,3 +0,0 @@
{
"path": "cz-conventional-changelog"
}
-15
View File
@@ -1,15 +0,0 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
-13
View File
@@ -1,13 +0,0 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/.scrutinizer.yml export-ignore
/.styleci.yml export-ignore
/tests export-ignore
/.editorconfig export-ignore
-147
View File
@@ -1,147 +0,0 @@
name: tests
on:
push:
jobs:
symfony-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
symfony: [ 7.1.*, 7.0.*, 6.4.*, 6.3.*, 6.2.*, 6.1.*, 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: 7.1.*, php: 8.3, phpunit: 10.5.* }
- { symfony: 7.0.*, php: 8.2, phpunit: 10.5.* }
- { symfony: 6.4.*, php: 8.2, phpunit: 9.5.* }
- { symfony: 6.3.*, php: 8.2, phpunit: 9.5.* }
- { symfony: 6.2.*, php: 8.1, phpunit: 9.5.* }
- { symfony: 6.1.*, php: 8.1, phpunit: 9.5.* }
- { 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 }
name: symfony[${{ matrix.symfony }}] php[${{ matrix.php }}] - ${{ matrix.os }}
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@v3
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-composer
- 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 }}"
if [[ "${{ matrix.symfony }}" == "7.0.*" || "${{ matrix.symfony }}" == "7.1.*" ]]; then
composer require "symfony/config:${{ matrix.symfony }}" \
"symfony/console:${{ matrix.symfony }}" \
"symfony/dependency-injection:${{ matrix.symfony }}" \
"symfony/http-kernel:${{ matrix.symfony }}" \
"symfony/translation:${{ matrix.symfony }}" \
"symfony/framework-bundle:${{ matrix.symfony }}" \
"symfony/twig-bundle:${{ matrix.symfony }}" \
"phpunit/phpunit:${{ matrix.phpunit }}" \
"monolog/monolog" --no-interaction --no-update
else
composer require "symfony/symfony:${{ matrix.symfony }}" "phpunit/phpunit:${{ matrix.phpunit }}" "monolog/monolog" --no-interaction --no-update
fi
composer update --prefer-stable --prefer-dist
- name: Execute tests
run: vendor/bin/phpunit --configuration=phpunit-symfony.xml
laravel-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
laravel: [ 11.*, 10.*, 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: 11.*, testbench: 9.*, php: 8.3, phpunit: 10.5.* }
- { laravel: 11.*, testbench: 9.*, php: 8.2, phpunit: 10.5.* }
- { laravel: 10.*, testbench: 8.*, php: 8.2, phpunit: 10.2.* }
- { laravel: 9.*, testbench: 7.*, php: 8.1, 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.* }
name: laravel[${{ matrix.laravel }}] php[${{ matrix.php }}] - ${{ matrix.os }}
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@v3
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-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-stable --prefer-dist
- name: Execute tests
run: vendor/bin/phpunit --configuration=phpunit-laravel.xml
-14
View File
@@ -1,14 +0,0 @@
.idea
vendor
composer.lock
.phpunit.result.cache
.phpcs-cache
.php-cs-fixer.cache
packs/**/composer.lock
packs/**/vendor/
node_modules/
coverage/
.phpunit.cache/
.run/
-29
View File
@@ -1,29 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
$header = <<<'EOF'
This file is part of the PHPFlasher package.
(c) Younes KHOUBZA <younes.khoubza@gmail.com>
EOF;
$rules = array(
'@Symfony' => true,
'header_comment' => array('header' => $header),
'array_syntax' => array('syntax' => 'long'),
'visibility_required' => array('elements' => array('property', 'method')),
'ordered_class_elements' => true,
);
$finder = new PhpCsFixer\Finder();
$finder->in(__DIR__)->exclude(__DIR__.'/vendor');
$config = new PhpCsFixer\Config();
return $config->setFinder($finder)
->setUsingCache(false)
->setRiskyAllowed(true)
->setRules($rules);
-1
View File
@@ -46,7 +46,6 @@ Shining stars of our community:
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/lucas.maciel_z"><img src="https://avatars.githubusercontent.com/u/80225404?v=4?s=100" width="100px;" alt="Lucas Maciel"/><br /><sub><b>Lucas Maciel</b></sub></a><br /><a href="#design-LucasStorm" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://siek.io/"><img src="https://avatars.githubusercontent.com/u/5730766?v=4?s=100" width="100px;" alt="Antoni Siek"/><br /><sub><b>Antoni Siek</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=ImJustToNy" title="Code">💻</a></td>
</tr>
</tbody>
</table>
-40
View File
@@ -1,40 +0,0 @@
#!/usr/bin/env php
<?php
require __DIR__ . '/../vendor/autoload.php';
/** @var \Flasher\Prime\Plugin\PluginInterface[] $plugins */
$plugins = array(
new \Flasher\Prime\Plugin\FlasherPlugin(),
new \Flasher\Noty\Prime\NotyPlugin(),
new \Flasher\Notyf\Prime\NotyfPlugin(),
new \Flasher\Pnotify\Prime\PnotifyPlugin(),
new \Flasher\SweetAlert\Prime\SweetAlertPlugin(),
new \Flasher\Toastr\Prime\ToastrPlugin(),
);
echo 'Downloading assets ...'. PHP_EOL;
foreach ($plugins as $plugin) {
$scripts = $plugin->getScripts();
foreach ($scripts['cdn'] as $index => $script) {
echo $script . PHP_EOL;
$path = $plugin->getAssetsDir() . '/'. pathinfo($script, PATHINFO_BASENAME);
$content = file_get_contents($script);
file_put_contents($path, $content);
}
$styles = $plugin->getStyles();
foreach ($styles['cdn'] as $index => $script) {
echo $script . PHP_EOL;
$path = $plugin->getAssetsDir() . '/'. pathinfo($script, PATHINFO_BASENAME);
$content = file_get_contents($script);
file_put_contents($path, $content);
}
}
echo 'DONE' . PHP_EOL;
-50
View File
@@ -1,50 +0,0 @@
#!/usr/bin/env php
<?php
$shared = realpath(__DIR__.'/../.shared');
$resources = array(
$shared,
__DIR__.'/../.github/FUNDING.yml',
__DIR__.'/../README.md',
__DIR__.'/../LICENSE',
);
$dirs = array(__DIR__.'/../packs', __DIR__.'/../src');
$packages = array_reduce($dirs, function ($files, $dir) {
return array_merge($files, glob("$dir/*/composer.json"), glob("$dir/*/*/composer.json"));
}, array());
foreach ($packages as $package) {
$package = realpath(dirname($package));
foreach ($resources as $resource) {
$resource = realpath($resource);
$dest = $package.str_replace(realpath(__DIR__.'/../'), '', $resource);
if (!is_dir($resource) && file_exists($resource)) {
copy($resource, $dest);
continue;
}
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($resource, FilesystemIterator::SKIP_DOTS),
RecursiveIteratorIterator::SELF_FIRST
);
foreach ($files as $file) {
$target = $resource === $shared
? $package.str_replace($resource, '', $file->getPathname())
: $dest .'/'. $file->getFilename();
if ($file->isDir()) {
system('rm -rf -- ' . escapeshellarg($dest));
@mkdir(dirname($target), 0777, true);
continue;
}
@mkdir(dirname($target), 0777, true);
@copy($file->getPathname(), $target);
}
}
}
-83
View File
@@ -1,83 +0,0 @@
#!/usr/bin/env bash
set -e
# Make sure the release tag is provided.
if (( "$#" != 1 ))
then
echo "Tag has to be provided."
exit 1
fi
RELEASE_BRANCH="main"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
VERSION=$1
# Make sure current branch and release branch match.
if [[ "$RELEASE_BRANCH" != "$CURRENT_BRANCH" ]]
then
echo "Release branch ($RELEASE_BRANCH) does not match the current active branch ($CURRENT_BRANCH)."
exit 1
fi
# Make sure the working directory is clear.
if [[ ! -z "$(git status --porcelain)" ]]
then
echo "Your working directory is dirty. Did you forget to commit your changes?"
exit 1
fi
# Make sure latest changes are fetched first.
git fetch origin
# Make sure that release branch is in sync with origin.
if [[ $(git rev-parse HEAD) != $(git rev-parse origin/$RELEASE_BRANCH) ]]
then
echo "Your branch is out of date with its upstream. Did you forget to pull or push any changes before releasing?"
exit 1
fi
# Always prepend with "v"
if [[ $VERSION != v* ]]
then
VERSION="v$VERSION"
fi
# Tag PHPFlasher
git tag "$VERSION"
git push origin --tags --force
# Tag Repositories
for REMOTE in flasher flasher-laravel flasher-symfony \
flasher-toastr flasher-toastr-laravel flasher-toastr-symfony \
flasher-notyf flasher-notyf-laravel flasher-notyf-symfony \
flasher-sweetalert flasher-sweetalert-laravel flasher-sweetalert-symfony \
flasher-pnotify flasher-pnotify-laravel flasher-pnotify-symfony \
flasher-noty flasher-noty-laravel flasher-noty-symfony \
flasher-cli flasher-cli-laravel flasher-cli-symfony \
laravel-pack php-pack symfony-pack
do
echo ""
echo ""
echo "Releasing $REMOTE";
TMP_DIR="/tmp/php-flasher"
REMOTE_URL="git@github.com:php-flasher/$REMOTE.git"
rm -rf $TMP_DIR;
mkdir $TMP_DIR;
(
cd $TMP_DIR;
git clone $REMOTE_URL .
git checkout "$RELEASE_BRANCH";
git tag "$VERSION"
git push origin --tags --force
)
done
-120
View File
@@ -1,120 +0,0 @@
#!/usr/bin/env bash
# Set the "errexit" options
set -o errexit
# Define colors and emoji for better visual feedback
INDIGO='\033[0;94m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
CHECK_MARK="✅"
CROSS_MARK="❌"
# Initialize global flags
DEBUG=0
DRY_RUN=0
# Process command-line arguments
for arg in "$@"; do
case $arg in
--debug)
DEBUG=1
shift
;;
--dry-run)
DRY_RUN=1
shift
;;
*)
# Unknown option
;;
esac
done
# Debug message function
debug_msg() {
if [ "$DEBUG" -eq 1 ]; then
echo -e "${INDIGO}Debug: $*${NC}"
fi
}
# Define remotes
REMOTES=(
'src/Prime:flasher'
'src/Laravel:flasher-laravel'
'src/Symfony:flasher-symfony'
'src/Toastr/Prime:flasher-toastr'
'src/Toastr/Laravel:flasher-toastr-laravel'
'src/Toastr/Symfony:flasher-toastr-symfony'
'src/Notyf/Prime:flasher-notyf'
'src/Notyf/Laravel:flasher-notyf-laravel'
'src/Notyf/Symfony:flasher-notyf-symfony'
'src/SweetAlert/Prime:flasher-sweetalert'
'src/SweetAlert/Laravel:flasher-sweetalert-laravel'
'src/SweetAlert/Symfony:flasher-sweetalert-symfony'
'src/Pnotify/Prime:flasher-pnotify'
'src/Pnotify/Laravel:flasher-pnotify-laravel'
'src/Pnotify/Symfony:flasher-pnotify-symfony'
'src/Noty/Prime:flasher-noty'
'src/Noty/Laravel:flasher-noty-laravel'
'src/Noty/Symfony:flasher-noty-symfony'
'src/Cli/Prime:flasher-cli'
'src/Cli/Laravel:flasher-cli-laravel'
'src/Cli/Symfony:flasher-cli-symfony'
'packs/laravel-pack:laravel-pack'
'packs/php-pack:php-pack'
'packs/symfony-pack:symfony-pack'
)
# Function to get the current git branch name
function current_branch() {
git rev-parse --abbrev-ref HEAD
}
# Define a function to split and push code to a remote repository
function split() {
local prefix_and_remote="$1"
local prefix="${prefix_and_remote%:*}"
local remote="${prefix_and_remote#*:}"
local current_branch=$(current_branch)
# Add remote if it does not exist (ignoring errors silently)
if git remote add "$remote" "git@github.com:php-flasher/$remote.git" 2>/dev/null; then
echo -e "${GREEN}Added remote ${INDIGO}$remote${NC} ${CHECK_MARK}"
else
debug_msg "Remote $remote already exists or could not be added."
fi
# Split the code using the splitsh-lite utility
SHA1=$(./bin/splitsh-lite --prefix="$prefix")
debug_msg "SHA1 for $prefix is $SHA1."
# Push the code to the remote repository on the same branch as the current branch
if [ "$DRY_RUN" -eq 0 ]; then
git push "$remote" "$SHA1:refs/heads/$current_branch" -f
else
echo -e "${INDIGO}Dry run: Would push $SHA1 to $remote on branch $current_branch${NC}"
fi
}
# Pull the latest code from the origin repository
if [ "$DRY_RUN" -eq 0 ]; then
echo -e "${INDIGO}Pulling the latest code from the origin repository on branch ${current_branch}...${NC}"
git fetch origin "$current_branch"
else
echo -e "${INDIGO}Dry run: Would fetch latest code for branch $current_branch from the origin repository.${NC}"
fi
# Iterate over the remotes and split and push the code
for remote in "${REMOTES[@]}"; do
split "$remote"
done
echo -e "${GREEN}All done!${NC} ${CHECK_MARK}"
BIN
View File
Binary file not shown.
+9 -122
View File
@@ -1,8 +1,8 @@
{
"name": "php-flasher/php-flasher",
"name": "php-flasher/php-pack",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"license": "MIT",
"type": "library",
"type": "flasher-pack",
"keywords": [
"php-flasher",
"flash-messages",
@@ -35,130 +35,17 @@
}
],
"require": {
"php": ">=5.3"
"php-flasher/flasher-cli": "*",
"php-flasher/flasher-noty": "*",
"php-flasher/flasher-notyf": "*",
"php-flasher/flasher-pnotify": "*",
"php-flasher/flasher-sweetalert": "*",
"php-flasher/flasher-toastr": "*"
},
"require-dev": {
"ext-json": "*",
"ext-mbstring": "*",
"ergebnis/composer-normalize": "^2.31",
"friendsofphp/php-cs-fixer": "^3.17",
"illuminate/routing": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0",
"illuminate/support": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0",
"livewire/livewire": "^2.12.3 || ^3.0",
"orchestra/testbench": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"phpro/grumphp": "^1.16",
"phpstan/phpstan": "^1.10.16",
"phpunit/phpunit": "^10.2.1",
"symfony/config": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
"symfony/console": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0",
"symfony/http-kernel": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
"symfony/translation": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
"symfony/twig-bundle": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
"symplify/monorepo-builder": "^11.2.3.72",
"vimeo/psalm": "^5.12"
},
"replace": {
"php-flasher/flasher": "self.version",
"php-flasher/flasher-cli": "self.version",
"php-flasher/flasher-cli-laravel": "self.version",
"php-flasher/flasher-cli-symfony": "self.version",
"php-flasher/flasher-laravel": "self.version",
"php-flasher/flasher-noty": "self.version",
"php-flasher/flasher-noty-laravel": "self.version",
"php-flasher/flasher-noty-symfony": "self.version",
"php-flasher/flasher-notyf": "self.version",
"php-flasher/flasher-notyf-laravel": "self.version",
"php-flasher/flasher-notyf-symfony": "self.version",
"php-flasher/flasher-pnotify": "self.version",
"php-flasher/flasher-pnotify-laravel": "self.version",
"php-flasher/flasher-pnotify-symfony": "self.version",
"php-flasher/flasher-sweetalert": "self.version",
"php-flasher/flasher-sweetalert-laravel": "self.version",
"php-flasher/flasher-sweetalert-symfony": "self.version",
"php-flasher/flasher-symfony": "self.version",
"php-flasher/flasher-toastr": "self.version",
"php-flasher/flasher-toastr-laravel": "self.version",
"php-flasher/flasher-toastr-symfony": "self.version"
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Flasher\\": "src/",
"Flasher\\Cli\\Laravel\\": "src/Cli/Laravel/",
"Flasher\\Cli\\Prime\\": "src/Cli/Prime/",
"Flasher\\Cli\\Symfony\\": "src/Cli/Symfony/",
"Flasher\\Laravel\\": "src/Laravel/",
"Flasher\\Noty\\Laravel\\": "src/Noty/Laravel/",
"Flasher\\Noty\\Prime\\": "src/Noty/Prime/",
"Flasher\\Noty\\Symfony\\": "src/Noty/Symfony/",
"Flasher\\Notyf\\Laravel\\": "src/Notyf/Laravel/",
"Flasher\\Notyf\\Prime\\": "src/Notyf/Prime/",
"Flasher\\Notyf\\Symfony\\": "src/Notyf/Symfony/",
"Flasher\\Pnotify\\Laravel\\": "src/Pnotify/Laravel/",
"Flasher\\Pnotify\\Prime\\": "src/Pnotify/Prime/",
"Flasher\\Pnotify\\Symfony\\": "src/Pnotify/Symfony/",
"Flasher\\Prime\\": "src/Prime/",
"Flasher\\SweetAlert\\Laravel\\": "src/SweetAlert/Laravel/",
"Flasher\\SweetAlert\\Prime\\": "src/SweetAlert/Prime/",
"Flasher\\SweetAlert\\Symfony\\": "src/SweetAlert/Symfony/",
"Flasher\\Symfony\\": "src/Symfony/",
"Flasher\\Toastr\\Laravel\\": "src/Toastr/Laravel/",
"Flasher\\Toastr\\Prime\\": "src/Toastr/Prime/",
"Flasher\\Toastr\\Symfony\\": "src/Toastr/Symfony/"
},
"files": [
"src/Cli/Prime/helpers.php",
"src/Noty/Prime/helpers.php",
"src/Notyf/Prime/helpers.php",
"src/Pnotify/Prime/helpers.php",
"src/Prime/helpers.php",
"src/SweetAlert/Prime/helpers.php",
"src/Toastr/Prime/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Flasher\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true,
"kylekatarnls/update-helper": true,
"phpro/grumphp": true
},
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"aliases": {
"Flasher": "Flasher\\Laravel\\Facade\\Flasher",
"Noty": "Flasher\\Laravel\\Facade\\Flasher",
"Notyf": "Flasher\\Notyf\\Laravel\\Facade\\Notyf",
"Pnotify": "Flasher\\Pnotify\\Laravel\\Facade\\Pnotify",
"SweetAlert": "Flasher\\SweetAlert\\Laravel\\Facade\\SweetAlert",
"Toastr": "Flasher\\Toastr\\Laravel\\Facade\\Toastr"
},
"providers": [
"Flasher\\Cli\\Laravel\\FlasherCliServiceProvider",
"Flasher\\Toastr\\Laravel\\FlasherToastrServiceProvider",
"Flasher\\Laravel\\FlasherServiceProvider",
"Flasher\\Noty\\Laravel\\FlasherNotyServiceProvider",
"Flasher\\Pnotify\\Laravel\\FlasherPnotifyServiceProvider",
"Flasher\\Notyf\\Laravel\\FlasherNotyfServiceProvider",
"Flasher\\SweetAlert\\Laravel\\FlasherSweetAlertServiceProvider"
]
}
},
"scripts": {
"check-syntax": "test `find ./src -iname \"*.php\" | xargs -n1 -P6 php -l | grep -Fv \"No syntax errors\" | wc -l` -eq 0",
"lint": "git diff --staged | php ./vendor/bin/grumphp run",
"normalize-composer": "find src -name \"composer.json\" -exec composer normalize {} \\;",
"normalize-packs": "find packs -name \"composer.json\" -exec composer normalize {} \\;",
"validate-composer": "find src -name \"composer.json\" -exec composer validate --strict {} \\;"
}
}
-41
View File
@@ -1,41 +0,0 @@
grumphp:
ascii: ~
tasks:
# composer: ~
# composer_normalize: ~
# composer_script:
# script: check-syntax
# phpcsfixer: ~
# jsonlint: ~
# yamllint: ~
# phpstan: ~
# phpunit: ~
# git_branch_name:
# blacklist:
# - main
git_commit_message:
allow_empty_message: false
enforce_capitalized_subject: false
max_subject_width: 93
type_scope_conventions:
types:
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
scopes:
- core
- flasher
- toastr
- noty
- notyf
- pnotify
- sweetalert
- notify
-25
View File
@@ -1,25 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
use Symplify\MonorepoBuilder\Config\MBConfig;
return static function (MBConfig $config) {
$config->packageDirectories(array(
__DIR__.'/src',
));
$config->packageAliasFormat('2.x-dev');
$config->workers(array(
// 'Symplify\MonorepoBuilder\Release\ReleaseWorker\AddTagToChangelogReleaseWorker',
// 'Symplify\MonorepoBuilder\Release\ReleaseWorker\PushNextDevReleaseWorker',
// 'Symplify\MonorepoBuilder\Release\ReleaseWorker\PushTagReleaseWorker',
// 'Symplify\MonorepoBuilder\Release\ReleaseWorker\SetCurrentMutualDependenciesReleaseWorker',
// 'Symplify\MonorepoBuilder\Release\ReleaseWorker\TagVersionReleaseWorker',
// 'Symplify\MonorepoBuilder\Release\ReleaseWorker\UpdateBranchAliasReleaseWorker',
));
};
-2161
View File
File diff suppressed because it is too large Load Diff
-9
View File
@@ -1,9 +0,0 @@
{
"devDependencies": {
"commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.3.0"
},
"scripts": {
"commit": "cz"
}
}
-5
View File
@@ -1,5 +0,0 @@
github: yoeunes
patreon: yoeunes
ko_fi: yoeunes
open_collective: php-flasher
custom: https://www.paypal.com/paypalme/yoeunes
-22
View File
@@ -1,22 +0,0 @@
name: Auto Closer PR
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Hi, thank you for your contribution.
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
We'd like to kindly ask you to move the contribution there - https://github.com/php-flasher/php-flasher.
We'll check it, review it and give you feed back right way.
Thank you.
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 PHPFlasher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-74
View File
@@ -1,74 +0,0 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
<img src="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github.png" alt="PHPFlasher Logo">
</picture>
</p>
## About PHPFlasher
PHPFlasher is a powerful and easy-to-use package that allows you to quickly and easily add flash messages to your Laravel or Symfony projects.
Whether you need to alert users of a successful form submission, an error, or any other important information, flash messages are a simple and effective solution for providing feedback to your users.
With PHPFlasher, you can easily record and store messages within the session, making it simple to retrieve and display them on the current or next page.
This improves user engagement and enhances the overall user experience on your website or application.
Whether you're a beginner or an experienced developer, PHPFlasher's intuitive and straightforward design makes it easy to integrate into your projects.
So, if you're looking for a reliable, flexible and easy to use flash messages solution, PHPFlasher is the perfect choice.
## Official Documentation
Documentation for PHPFlasher can be found on the [https://php-flasher.io](https://php-flasher.io).
## Contributors and sponsors
Join our team of contributors and make a lasting impact on our project!
We are always looking for passionate individuals who want to contribute their skills and ideas.
Whether you're a developer, designer, or simply have a great idea, we welcome your participation and collaboration.
Shining stars of our community:
<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes-khoubza/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes KHOUBZA"/><br /><sub><b>Younes KHOUBZA</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salmayno"><img src="https://avatars.githubusercontent.com/u/27933199?v=4?s=100" width="100px;" alt="Salma Mourad"/><br /><sub><b>Salma Mourad</b></sub></a><br /><a href="#financial-salmayno" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/rstacode"><img src="https://avatars.githubusercontent.com/u/35005761?v=4?s=100" width="100px;" alt="Nashwan Abdullah"/><br /><sub><b>Nashwan Abdullah</b></sub></a><br /><a href="#financial-codenashwan" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://darvis.nl/"><img src="https://avatars.githubusercontent.com/u/7394837?v=4?s=100" width="100px;" alt="Arvid de Jong"/><br /><sub><b>Arvid de Jong</b></sub></a><br /><a href="#financial-darviscommerce" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ashallendesign.co.uk/"><img src="https://avatars.githubusercontent.com/u/39652331?v=4?s=100" width="100px;" alt="Ash Allen"/><br /><sub><b>Ash Allen</b></sub></a><br /><a href="#design-ash-jc-allen" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://about.me/murrant"><img src="https://avatars.githubusercontent.com/u/39462?v=4?s=100" width="100px;" alt="Tony Murray"/><br /><sub><b>Tony Murray</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=murrant" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/n3wborn"><img src="https://avatars.githubusercontent.com/u/10246722?v=4?s=100" width="100px;" alt="Stéphane P"/><br /><sub><b>Stéphane P</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=n3wborn" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/lucas.maciel_z"><img src="https://avatars.githubusercontent.com/u/80225404?v=4?s=100" width="100px;" alt="Lucas Maciel"/><br /><sub><b>Lucas Maciel</b></sub></a><br /><a href="#design-LucasStorm" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://siek.io/"><img src="https://avatars.githubusercontent.com/u/5730766?v=4?s=100" width="100px;" alt="Antoni Siek"/><br /><sub><b>Antoni Siek</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=ImJustToNy" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Contact
PHPFlasher is being actively developed by <a href="https://github.com/yoeunes">yoeunes</a>.
You can reach out with questions, bug reports, or feature requests on any of the following:
- [Github Issues](https://github.com/php-flasher/php-flasher/issues)
- [Github](https://github.com/yoeunes)
- [Twitter](https://twitter.com/yoeunes)
- [Linkedin](https://www.linkedin.com/in/younes-khoubza/)
- [Email me directly](mailto:younes.khoubza@gmail.com)
## License
PHPFlasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
<p align="center"> <b>Made with ❤️ by <a href="https://www.linkedin.com/in/younes-khoubza/">Younes KHOUBZA</a> </b> </p>
-51
View File
@@ -1,51 +0,0 @@
{
"name": "php-flasher/laravel-pack",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"license": "MIT",
"type": "flasher-pack",
"keywords": [
"php-flasher",
"flash-messages",
"notification-system",
"user-feedback",
"toastr",
"sweetalert",
"pnotify",
"noty",
"notyf",
"desktop-notifications",
"php",
"laravel",
"symfony",
"javascript",
"yoeunes",
"framework-agnostic",
"phpstorm-auto-complete",
"custom-adapter",
"user-experience",
"rtl",
"dark-mode"
],
"authors": [
{
"name": "Younes KHOUBZA",
"email": "younes.khoubza@gmail.com",
"homepage": "https://www.linkedin.com/in/younes-khoubza",
"role": "Developer"
}
],
"require": {
"php-flasher/flasher-cli-laravel": "*",
"php-flasher/flasher-noty-laravel": "*",
"php-flasher/flasher-notyf-laravel": "*",
"php-flasher/flasher-pnotify-laravel": "*",
"php-flasher/flasher-sweetalert-laravel": "*",
"php-flasher/flasher-toastr-laravel": "*"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"preferred-install": "dist",
"sort-packages": true
}
}
-5
View File
@@ -1,5 +0,0 @@
github: yoeunes
patreon: yoeunes
ko_fi: yoeunes
open_collective: php-flasher
custom: https://www.paypal.com/paypalme/yoeunes
-22
View File
@@ -1,22 +0,0 @@
name: Auto Closer PR
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Hi, thank you for your contribution.
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
We'd like to kindly ask you to move the contribution there - https://github.com/php-flasher/php-flasher.
We'll check it, review it and give you feed back right way.
Thank you.
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 PHPFlasher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-74
View File
@@ -1,74 +0,0 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
<img src="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github.png" alt="PHPFlasher Logo">
</picture>
</p>
## About PHPFlasher
PHPFlasher is a powerful and easy-to-use package that allows you to quickly and easily add flash messages to your Laravel or Symfony projects.
Whether you need to alert users of a successful form submission, an error, or any other important information, flash messages are a simple and effective solution for providing feedback to your users.
With PHPFlasher, you can easily record and store messages within the session, making it simple to retrieve and display them on the current or next page.
This improves user engagement and enhances the overall user experience on your website or application.
Whether you're a beginner or an experienced developer, PHPFlasher's intuitive and straightforward design makes it easy to integrate into your projects.
So, if you're looking for a reliable, flexible and easy to use flash messages solution, PHPFlasher is the perfect choice.
## Official Documentation
Documentation for PHPFlasher can be found on the [https://php-flasher.io](https://php-flasher.io).
## Contributors and sponsors
Join our team of contributors and make a lasting impact on our project!
We are always looking for passionate individuals who want to contribute their skills and ideas.
Whether you're a developer, designer, or simply have a great idea, we welcome your participation and collaboration.
Shining stars of our community:
<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes-khoubza/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes KHOUBZA"/><br /><sub><b>Younes KHOUBZA</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salmayno"><img src="https://avatars.githubusercontent.com/u/27933199?v=4?s=100" width="100px;" alt="Salma Mourad"/><br /><sub><b>Salma Mourad</b></sub></a><br /><a href="#financial-salmayno" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/rstacode"><img src="https://avatars.githubusercontent.com/u/35005761?v=4?s=100" width="100px;" alt="Nashwan Abdullah"/><br /><sub><b>Nashwan Abdullah</b></sub></a><br /><a href="#financial-codenashwan" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://darvis.nl/"><img src="https://avatars.githubusercontent.com/u/7394837?v=4?s=100" width="100px;" alt="Arvid de Jong"/><br /><sub><b>Arvid de Jong</b></sub></a><br /><a href="#financial-darviscommerce" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ashallendesign.co.uk/"><img src="https://avatars.githubusercontent.com/u/39652331?v=4?s=100" width="100px;" alt="Ash Allen"/><br /><sub><b>Ash Allen</b></sub></a><br /><a href="#design-ash-jc-allen" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://about.me/murrant"><img src="https://avatars.githubusercontent.com/u/39462?v=4?s=100" width="100px;" alt="Tony Murray"/><br /><sub><b>Tony Murray</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=murrant" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/n3wborn"><img src="https://avatars.githubusercontent.com/u/10246722?v=4?s=100" width="100px;" alt="Stéphane P"/><br /><sub><b>Stéphane P</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=n3wborn" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/lucas.maciel_z"><img src="https://avatars.githubusercontent.com/u/80225404?v=4?s=100" width="100px;" alt="Lucas Maciel"/><br /><sub><b>Lucas Maciel</b></sub></a><br /><a href="#design-LucasStorm" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://siek.io/"><img src="https://avatars.githubusercontent.com/u/5730766?v=4?s=100" width="100px;" alt="Antoni Siek"/><br /><sub><b>Antoni Siek</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=ImJustToNy" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Contact
PHPFlasher is being actively developed by <a href="https://github.com/yoeunes">yoeunes</a>.
You can reach out with questions, bug reports, or feature requests on any of the following:
- [Github Issues](https://github.com/php-flasher/php-flasher/issues)
- [Github](https://github.com/yoeunes)
- [Twitter](https://twitter.com/yoeunes)
- [Linkedin](https://www.linkedin.com/in/younes-khoubza/)
- [Email me directly](mailto:younes.khoubza@gmail.com)
## License
PHPFlasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
<p align="center"> <b>Made with ❤️ by <a href="https://www.linkedin.com/in/younes-khoubza/">Younes KHOUBZA</a> </b> </p>
-51
View File
@@ -1,51 +0,0 @@
{
"name": "php-flasher/php-pack",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"license": "MIT",
"type": "flasher-pack",
"keywords": [
"php-flasher",
"flash-messages",
"notification-system",
"user-feedback",
"toastr",
"sweetalert",
"pnotify",
"noty",
"notyf",
"desktop-notifications",
"php",
"laravel",
"symfony",
"javascript",
"yoeunes",
"framework-agnostic",
"phpstorm-auto-complete",
"custom-adapter",
"user-experience",
"rtl",
"dark-mode"
],
"authors": [
{
"name": "Younes KHOUBZA",
"email": "younes.khoubza@gmail.com",
"homepage": "https://www.linkedin.com/in/younes-khoubza",
"role": "Developer"
}
],
"require": {
"php-flasher/flasher-cli": "*",
"php-flasher/flasher-noty": "*",
"php-flasher/flasher-notyf": "*",
"php-flasher/flasher-pnotify": "*",
"php-flasher/flasher-sweetalert": "*",
"php-flasher/flasher-toastr": "*"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"preferred-install": "dist",
"sort-packages": true
}
}
-5
View File
@@ -1,5 +0,0 @@
github: yoeunes
patreon: yoeunes
ko_fi: yoeunes
open_collective: php-flasher
custom: https://www.paypal.com/paypalme/yoeunes
-22
View File
@@ -1,22 +0,0 @@
name: Auto Closer PR
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Hi, thank you for your contribution.
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
We'd like to kindly ask you to move the contribution there - https://github.com/php-flasher/php-flasher.
We'll check it, review it and give you feed back right way.
Thank you.
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 PHPFlasher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-74
View File
@@ -1,74 +0,0 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
<img src="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github.png" alt="PHPFlasher Logo">
</picture>
</p>
## About PHPFlasher
PHPFlasher is a powerful and easy-to-use package that allows you to quickly and easily add flash messages to your Laravel or Symfony projects.
Whether you need to alert users of a successful form submission, an error, or any other important information, flash messages are a simple and effective solution for providing feedback to your users.
With PHPFlasher, you can easily record and store messages within the session, making it simple to retrieve and display them on the current or next page.
This improves user engagement and enhances the overall user experience on your website or application.
Whether you're a beginner or an experienced developer, PHPFlasher's intuitive and straightforward design makes it easy to integrate into your projects.
So, if you're looking for a reliable, flexible and easy to use flash messages solution, PHPFlasher is the perfect choice.
## Official Documentation
Documentation for PHPFlasher can be found on the [https://php-flasher.io](https://php-flasher.io).
## Contributors and sponsors
Join our team of contributors and make a lasting impact on our project!
We are always looking for passionate individuals who want to contribute their skills and ideas.
Whether you're a developer, designer, or simply have a great idea, we welcome your participation and collaboration.
Shining stars of our community:
<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes-khoubza/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes KHOUBZA"/><br /><sub><b>Younes KHOUBZA</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salmayno"><img src="https://avatars.githubusercontent.com/u/27933199?v=4?s=100" width="100px;" alt="Salma Mourad"/><br /><sub><b>Salma Mourad</b></sub></a><br /><a href="#financial-salmayno" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/rstacode"><img src="https://avatars.githubusercontent.com/u/35005761?v=4?s=100" width="100px;" alt="Nashwan Abdullah"/><br /><sub><b>Nashwan Abdullah</b></sub></a><br /><a href="#financial-codenashwan" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://darvis.nl/"><img src="https://avatars.githubusercontent.com/u/7394837?v=4?s=100" width="100px;" alt="Arvid de Jong"/><br /><sub><b>Arvid de Jong</b></sub></a><br /><a href="#financial-darviscommerce" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ashallendesign.co.uk/"><img src="https://avatars.githubusercontent.com/u/39652331?v=4?s=100" width="100px;" alt="Ash Allen"/><br /><sub><b>Ash Allen</b></sub></a><br /><a href="#design-ash-jc-allen" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://about.me/murrant"><img src="https://avatars.githubusercontent.com/u/39462?v=4?s=100" width="100px;" alt="Tony Murray"/><br /><sub><b>Tony Murray</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=murrant" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/n3wborn"><img src="https://avatars.githubusercontent.com/u/10246722?v=4?s=100" width="100px;" alt="Stéphane P"/><br /><sub><b>Stéphane P</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=n3wborn" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/lucas.maciel_z"><img src="https://avatars.githubusercontent.com/u/80225404?v=4?s=100" width="100px;" alt="Lucas Maciel"/><br /><sub><b>Lucas Maciel</b></sub></a><br /><a href="#design-LucasStorm" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://siek.io/"><img src="https://avatars.githubusercontent.com/u/5730766?v=4?s=100" width="100px;" alt="Antoni Siek"/><br /><sub><b>Antoni Siek</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=ImJustToNy" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Contact
PHPFlasher is being actively developed by <a href="https://github.com/yoeunes">yoeunes</a>.
You can reach out with questions, bug reports, or feature requests on any of the following:
- [Github Issues](https://github.com/php-flasher/php-flasher/issues)
- [Github](https://github.com/yoeunes)
- [Twitter](https://twitter.com/yoeunes)
- [Linkedin](https://www.linkedin.com/in/younes-khoubza/)
- [Email me directly](mailto:younes.khoubza@gmail.com)
## License
PHPFlasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
<p align="center"> <b>Made with ❤️ by <a href="https://www.linkedin.com/in/younes-khoubza/">Younes KHOUBZA</a> </b> </p>
-51
View File
@@ -1,51 +0,0 @@
{
"name": "php-flasher/symfony-pack",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"license": "MIT",
"type": "flasher-pack",
"keywords": [
"php-flasher",
"flash-messages",
"notification-system",
"user-feedback",
"toastr",
"sweetalert",
"pnotify",
"noty",
"notyf",
"desktop-notifications",
"php",
"laravel",
"symfony",
"javascript",
"yoeunes",
"framework-agnostic",
"phpstorm-auto-complete",
"custom-adapter",
"user-experience",
"rtl",
"dark-mode"
],
"authors": [
{
"name": "Younes KHOUBZA",
"email": "younes.khoubza@gmail.com",
"homepage": "https://www.linkedin.com/in/younes-khoubza",
"role": "Developer"
}
],
"require": {
"php-flasher/flasher-cli-symfony": "*",
"php-flasher/flasher-noty-symfony": "*",
"php-flasher/flasher-notyf-symfony": "*",
"php-flasher/flasher-pnotify-symfony": "*",
"php-flasher/flasher-sweetalert-symfony": "*",
"php-flasher/flasher-toastr-symfony": "*"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"preferred-install": "dist",
"sort-packages": true
}
}
-9
View File
@@ -1,9 +0,0 @@
parameters:
level: 9
paths:
- src
excludePaths:
- src/Symfony/Bridge/
- src/Laravel/Middleware/HttpKernelFlasherMiddleware.php
- src/Laravel/Middleware/HttpKernelSessionMiddleware.php
- src/*/Symfony/Flasher*SymfonyBundle.php
-9
View File
@@ -1,9 +0,0 @@
<?php
namespace PHPSTORM_META;
override(\Illuminate\Foundation\Application::make(0), map([
'config' => \Illuminate\Contracts\Config\Repository::class,
'session' => \Illuminate\Session\SessionManager::class,
'view' => \Illuminate\View\Factory::class,
]));
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
stopOnFailure="true"
cacheDirectory=".phpunit.cache"
>
<testsuites>
<testsuite name="flasher">
<directory>tests/Prime</directory>
<directory>tests/Laravel</directory>
</testsuite>
</testsuites>
<coverage/>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>
</phpunit>
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
stopOnFailure="true"
cacheDirectory=".phpunit.cache"
>
<testsuites>
<testsuite name="flasher">
<directory>tests/Prime</directory>
<directory>tests/Symfony</directory>
</testsuite>
</testsuites>
<coverage/>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>
</phpunit>
-21
View File
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
stopOnFailure="true"
cacheDirectory=".phpunit.cache"
>
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage/>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>
</phpunit>
-26
View File
@@ -1,26 +0,0 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="src/Prime" />
<ignoreFiles>
<directory name="vendor" />
<file name="phpstorm/Laravel/.phpstorm.meta.php" />
<file name="src/SweetAlert/Prime/.phpstorm.meta.php" />
<file name="src/Notyf/Prime/.phpstorm.meta.php" />
<file name="src/Pnotify/Prime/.phpstorm.meta.php" />
<file name="src/Noty/Prime/.phpstorm.meta.php" />
<file name="src/Laravel/.phpstorm.meta.php" />
<file name="src/Toastr/Prime/.phpstorm.meta.php" />
<file name="src/Prime/.phpstorm.meta.php" />
<file name="src/Cli/Prime/.phpstorm.meta.php" />
</ignoreFiles>
</projectFiles>
</psalm>
-5
View File
@@ -1,5 +0,0 @@
github: yoeunes
patreon: yoeunes
ko_fi: yoeunes
open_collective: php-flasher
custom: https://www.paypal.com/paypalme/yoeunes
-22
View File
@@ -1,22 +0,0 @@
name: Auto Closer PR
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Hi, thank you for your contribution.
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
We'd like to kindly ask you to move the contribution there - https://github.com/php-flasher/php-flasher.
We'll check it, review it and give you feed back right way.
Thank you.
@@ -1,106 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Laravel;
use Flasher\Cli\Prime\CliFactory;
use Flasher\Cli\Prime\EventListener\RenderListener;
use Flasher\Cli\Prime\Notify;
use Flasher\Cli\Prime\Presenter\CliPresenter;
use Flasher\Prime\EventDispatcher\EventDispatcherInterface;
use Flasher\Prime\FlasherInterface;
use Flasher\Prime\Response\ResponseManagerInterface;
use Illuminate\Container\Container;
use Illuminate\Support\ServiceProvider;
final class FlasherCliServiceProvider extends ServiceProvider
{
/**
* @return void
*/
public function boot()
{
$this->processConfiguration();
$this->registerRenderListener();
$this->registerPresenter();
}
/**
* {@inheritdoc}
*/
public function register()
{
$this->registerNotifierFactory();
$this->registerNotifier();
}
/**
* @return void
*/
private function processConfiguration()
{
$name = 'flasher_cli';
$config = $this->app->make('config');
$config->set($name, $config->get($name, array())); // @phpstan-ignore-line
}
/**
* @return void
*/
private function registerNotifierFactory()
{
$this->app->singleton('flasher.cli', function (Container $app) {
return new CliFactory($app->make('flasher.storage_manager')); // @phpstan-ignore-line
});
$this->app->alias('flasher.cli', 'Flasher\Cli\Prime\CliFactory');
}
/**
* @return void
*/
private function registerNotifier()
{
$this->app->singleton('flasher.notify', function (Container $app) {
/** @phpstan-ignore-next-line */
$title = $app->make('config')->get('flasher_cli.title', null);
$icons = $app->make('config')->get('flasher_cli.icons', array()); // @phpstan-ignore-line
return new Notify($title, $icons);
});
$this->app->alias('flasher.notify', 'Flasher\Cli\Prime\Notify');
$this->app->alias('flasher.notify', 'Flasher\Cli\Prime\NotifyInterface');
}
/**
* @return void
*/
private function registerRenderListener()
{
/** @var FlasherInterface $flasher */
$flasher = $this->app->make('flasher');
$this->app->extend('flasher.event_dispatcher', function (EventDispatcherInterface $dispatcher) use ($flasher) {
$dispatcher->addSubscriber(new RenderListener($flasher));
return $dispatcher;
});
}
/**
* @return void
*/
private function registerPresenter()
{
$this->app->extend('flasher.response_manager', function (ResponseManagerInterface $manager, Container $app) {
$manager->addPresenter(CliPresenter::NAME, new CliPresenter($app->make('flasher.notify'))); // @phpstan-ignore-line
return $manager;
});
}
}
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 PHPFlasher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-74
View File
@@ -1,74 +0,0 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
<img src="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github.png" alt="PHPFlasher Logo">
</picture>
</p>
## About PHPFlasher
PHPFlasher is a powerful and easy-to-use package that allows you to quickly and easily add flash messages to your Laravel or Symfony projects.
Whether you need to alert users of a successful form submission, an error, or any other important information, flash messages are a simple and effective solution for providing feedback to your users.
With PHPFlasher, you can easily record and store messages within the session, making it simple to retrieve and display them on the current or next page.
This improves user engagement and enhances the overall user experience on your website or application.
Whether you're a beginner or an experienced developer, PHPFlasher's intuitive and straightforward design makes it easy to integrate into your projects.
So, if you're looking for a reliable, flexible and easy to use flash messages solution, PHPFlasher is the perfect choice.
## Official Documentation
Documentation for PHPFlasher can be found on the [https://php-flasher.io](https://php-flasher.io).
## Contributors and sponsors
Join our team of contributors and make a lasting impact on our project!
We are always looking for passionate individuals who want to contribute their skills and ideas.
Whether you're a developer, designer, or simply have a great idea, we welcome your participation and collaboration.
Shining stars of our community:
<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes-khoubza/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes KHOUBZA"/><br /><sub><b>Younes KHOUBZA</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salmayno"><img src="https://avatars.githubusercontent.com/u/27933199?v=4?s=100" width="100px;" alt="Salma Mourad"/><br /><sub><b>Salma Mourad</b></sub></a><br /><a href="#financial-salmayno" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/rstacode"><img src="https://avatars.githubusercontent.com/u/35005761?v=4?s=100" width="100px;" alt="Nashwan Abdullah"/><br /><sub><b>Nashwan Abdullah</b></sub></a><br /><a href="#financial-codenashwan" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://darvis.nl/"><img src="https://avatars.githubusercontent.com/u/7394837?v=4?s=100" width="100px;" alt="Arvid de Jong"/><br /><sub><b>Arvid de Jong</b></sub></a><br /><a href="#financial-darviscommerce" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ashallendesign.co.uk/"><img src="https://avatars.githubusercontent.com/u/39652331?v=4?s=100" width="100px;" alt="Ash Allen"/><br /><sub><b>Ash Allen</b></sub></a><br /><a href="#design-ash-jc-allen" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://about.me/murrant"><img src="https://avatars.githubusercontent.com/u/39462?v=4?s=100" width="100px;" alt="Tony Murray"/><br /><sub><b>Tony Murray</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=murrant" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/n3wborn"><img src="https://avatars.githubusercontent.com/u/10246722?v=4?s=100" width="100px;" alt="Stéphane P"/><br /><sub><b>Stéphane P</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=n3wborn" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/lucas.maciel_z"><img src="https://avatars.githubusercontent.com/u/80225404?v=4?s=100" width="100px;" alt="Lucas Maciel"/><br /><sub><b>Lucas Maciel</b></sub></a><br /><a href="#design-LucasStorm" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://siek.io/"><img src="https://avatars.githubusercontent.com/u/5730766?v=4?s=100" width="100px;" alt="Antoni Siek"/><br /><sub><b>Antoni Siek</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=ImJustToNy" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Contact
PHPFlasher is being actively developed by <a href="https://github.com/yoeunes">yoeunes</a>.
You can reach out with questions, bug reports, or feature requests on any of the following:
- [Github Issues](https://github.com/php-flasher/php-flasher/issues)
- [Github](https://github.com/yoeunes)
- [Twitter](https://twitter.com/yoeunes)
- [Linkedin](https://www.linkedin.com/in/younes-khoubza/)
- [Email me directly](mailto:younes.khoubza@gmail.com)
## License
PHPFlasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
<p align="center"> <b>Made with ❤️ by <a href="https://www.linkedin.com/in/younes-khoubza/">Younes KHOUBZA</a> </b> </p>
-61
View File
@@ -1,61 +0,0 @@
{
"name": "php-flasher/flasher-cli-laravel",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"license": "MIT",
"type": "library",
"keywords": [
"php-flasher",
"flash-messages",
"notification-system",
"user-feedback",
"toastr",
"sweetalert",
"pnotify",
"noty",
"notyf",
"desktop-notifications",
"php",
"laravel",
"symfony",
"javascript",
"yoeunes",
"framework-agnostic",
"phpstorm-auto-complete",
"custom-adapter",
"user-experience",
"rtl",
"dark-mode"
],
"authors": [
{
"name": "Younes KHOUBZA",
"email": "younes.khoubza@gmail.com",
"homepage": "https://www.linkedin.com/in/younes-khoubza",
"role": "Developer"
}
],
"homepage": "https://php-flasher.io",
"require": {
"php": ">=5.3",
"php-flasher/flasher-cli": "^1.15.14",
"php-flasher/flasher-laravel": "^1.15.14"
},
"minimum-stability": "stable",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Flasher\\Cli\\Laravel\\": ""
}
},
"config": {
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Flasher\\Cli\\Laravel\\FlasherCliServiceProvider"
]
}
}
}
-5
View File
@@ -1,5 +0,0 @@
github: yoeunes
patreon: yoeunes
ko_fi: yoeunes
open_collective: php-flasher
custom: https://www.paypal.com/paypalme/yoeunes
-22
View File
@@ -1,22 +0,0 @@
name: Auto Closer PR
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Hi, thank you for your contribution.
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
We'd like to kindly ask you to move the contribution there - https://github.com/php-flasher/php-flasher.
We'll check it, review it and give you feed back right way.
Thank you.
-11
View File
@@ -1,11 +0,0 @@
<?php
namespace PHPSTORM_META;
override(\Flasher\Prime\FlasherInterface::create(), map([
'cli' => \Flasher\Cli\Prime\CliFactory::class
]));
override(\Flasher\Prime\FlasherInterface::using(), map([
'cli' => \Flasher\Cli\Prime\CliFactory::class
]));
-41
View File
@@ -1,41 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime;
use Flasher\Prime\Notification\NotificationBuilder;
final class CliBuilder extends NotificationBuilder
{
/**
* @param string $title
*
* @return static
*/
public function title($title)
{
/** @var Notification $notification */
$notification = $this->envelope->getNotification();
$notification->setTitle($title);
return $this;
}
/**
* @param string $icon
*
* @return static
*/
public function icon($icon)
{
/** @var Notification $notification */
$notification = $this->envelope->getNotification();
$notification->setIcon($icon);
return $this;
}
}
-18
View File
@@ -1,18 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime;
use Flasher\Prime\Factory\NotificationFactory;
final class CliFactory extends NotificationFactory
{
public function createNotificationBuilder()
{
return new CliBuilder($this->getStorageManager(), new Notification(), 'cli');
}
}
@@ -1,46 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\EventListener;
use Flasher\Cli\Prime\Presenter\CliPresenter;
use Flasher\Prime\EventDispatcher\Event\PostPersistEvent;
use Flasher\Prime\EventDispatcher\EventListener\EventSubscriberInterface;
use Flasher\Prime\FlasherInterface;
final class RenderListener implements EventSubscriberInterface
{
/**
* @var FlasherInterface
*/
private $flasher;
public function __construct(FlasherInterface $flasher)
{
$this->flasher = $flasher;
}
/**
* @return void
*/
public function __invoke(PostPersistEvent $event)
{
if ('cli' !== \PHP_SAPI) {
return;
}
$this->flasher->render(array(), CliPresenter::NAME);
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents()
{
return 'Flasher\Prime\EventDispatcher\Event\PostPersistEvent';
}
}
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 PHPFlasher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-228
View File
@@ -1,228 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime;
use Flasher\Prime\Notification\Envelope;
use Flasher\Prime\Notification\Notification as BaseNotification;
use Flasher\Prime\Notification\NotificationInterface;
final class Notification extends BaseNotification
{
/**
* @var string|null
*/
private $title;
/**
* @var string|null
*/
private $icon;
/**
* @param string|null $message
* @param string|null $title
* @param string|null $icon
* @param string $type
* @param array<string, mixed> $options
*/
public function __construct($message = null, $title = null, $icon = null, $type = self::INFO, array $options = array())
{
$this->message = $message;
$this->title = $title;
$this->icon = $icon;
$this->type = $type;
$this->options = $options;
}
/**
* @param Notification|string $notification
*
* @return static
*/
public static function wrap($notification)
{
if ($notification instanceof Notification) {
return $notification;
}
return self::create($notification);
}
/**
* @param string $message
* @param string|null $title
* @param string|null $icon
* @param string $type
* @param array<string, mixed> $options
*
* @return static
*/
public static function create($message, $title = null, $icon = null, $type = self::INFO, array $options = array())
{
return new self($message, $title, $icon, $type, $options);
}
/**
* @param string $message
* @param string|null $title
* @param string|null $icon
* @param array<string, mixed> $options
*
* @return static
*/
public static function error($message, $title = null, $icon = null, array $options = array())
{
return self::create($message, $title, $icon, NotificationInterface::ERROR, $options);
}
/**
* @param string $message
* @param string|null $title
* @param string|null $icon
* @param array<string, mixed> $options
*
* @return static
*/
public static function info($message, $title = null, $icon = null, array $options = array())
{
return self::create($message, $title, $icon, NotificationInterface::INFO, $options);
}
/**
* @param string $message
* @param string|null $title
* @param string|null $icon
* @param array<string, mixed> $options
*
* @return static
*/
public static function success($message, $title = null, $icon = null, array $options = array())
{
return self::create($message, $title, $icon, NotificationInterface::SUCCESS, $options);
}
/**
* @param string $message
* @param string|null $title
* @param string|null $icon
* @param array<string, mixed> $options
*
* @return static
*/
public static function warning($message, $title = null, $icon = null, array $options = array())
{
return self::create($message, $title, $icon, NotificationInterface::WARNING, $options);
}
/**
* {@inheritdoc}
*/
public function getMessage()
{
$message = parent::getMessage();
if (\is_string($message)) {
$message = addslashes($message);
}
return $message;
}
/**
* {@inheritdoc}
*/
public function getOption($name, $default = null)
{
$option = parent::getOption($name, $default);
if (\is_string($option)) {
$option = addslashes($option);
}
return $option;
}
/**
* @return string|null
*/
public function getTitle()
{
$title = $this->title;
if (\is_string($title)) {
$title = addslashes($title);
}
return $title;
}
/**
* @param string|null $title
*
* @return static
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* @return string|null
*/
public function getIcon()
{
return $this->icon;
}
/**
* @param string|null $icon
*
* @return static
*/
public function setIcon($icon)
{
$this->icon = $icon;
return $this;
}
/**
* {@inheritdoc}
*/
public function toArray()
{
return array_merge(parent::toArray(), array(
'title' => $this->getTitle(),
'icon' => $this->getIcon(),
));
}
/**
* @return static
*/
public static function fromEnvelope(Envelope $envelope)
{
$self = new self();
$self->setType($envelope->getType());
$self->setMessage($envelope->getMessage());
$self->setOptions($envelope->getOptions());
$notification = $envelope->getNotification();
if (!$notification instanceof self) {
return $self;
}
$self->setTitle($notification->getTitle());
$self->setIcon($notification->getIcon());
return $self;
}
}
@@ -1,57 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
final class AppleScriptBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addArgument(sprintf('display notification "%s"', $notification->getMessage()))
->addArgument(sprintf('with title "%s"', $notification->getTitle()));
/** @var string $subtitle */
$subtitle = $notification->getOption('subtitle');
if ($subtitle) {
$cmd->addArgument(sprintf('subtitle "%s"', $subtitle));
}
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
if (!$this->getProgram()) {
return false;
}
return OS::isMacOS() && version_compare(OS::getMacOSVersion(), '10.9.0', '>=');
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'osascript';
}
}
-111
View File
@@ -1,111 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\NotifyInterface;
use Flasher\Cli\Prime\System\Path;
use Flasher\Cli\Prime\System\Program;
use Flasher\Prime\Notification\NotificationInterface;
abstract class BaseNotifier implements NotifyInterface
{
/**
* {@inheritdoc}
*/
public function isSupported()
{
return true;
}
/**
* {@inheritdoc}
*/
public function getPriority()
{
return 0;
}
/**
* @return string|null
*/
public function getBinary()
{
return null;
}
/**
* @return string|string[]
*/
public function getBinaryPaths()
{
return array();
}
/**
* @return string|null
*/
public function getProgram()
{
if (Program::exist($this->getBinary())) {
return $this->getBinary();
}
foreach ((array) $this->getBinaryPaths() as $path) {
$path = Path::realpath($path);
if (file_exists($path)) {
return $path;
}
}
return null;
}
/**
* {@inheritdoc}
*/
public function success($message, $title = null, $options = array())
{
$this->type(NotificationInterface::SUCCESS, $message, $title, $options);
}
/**
* {@inheritdoc}
*/
public function info($message, $title = null, $options = array())
{
$this->type(NotificationInterface::INFO, $message, $title, $options);
}
/**
* {@inheritdoc}
*/
public function error($message, $title = null, $options = array())
{
$this->type(NotificationInterface::ERROR, $message, $title, $options);
}
/**
* {@inheritdoc}
*/
public function warning($message, $title = null, $options = array())
{
$this->type(NotificationInterface::WARNING, $message, $title, $options);
}
/**
* {@inheritdoc}
*/
public function type($type, $message, $title = null, $options = array())
{
$notification = new Notification($message, $title, null, $type, $options);
$this->send($notification);
}
}
@@ -1,48 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
final class GrowlNotifyBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addOption('--message', $notification->getMessage())
->addOption('--title', $notification->getTitle())
->addOption('--image', $notification->getIcon());
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
return OS::isMacOS() && $this->getProgram();
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'growlnotify';
}
}
@@ -1,48 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
final class KDialogBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addOption('--passivepopup', $notification->getMessage())
->addOption('--title', $notification->getTitle())
->addArgument(5);
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
return OS::isUnix() && $this->getProgram();
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'kdialog';
}
}
@@ -1,54 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
use Flasher\Cli\Prime\System\Path;
final class NotifuBaseNotifier extends BaseNotifier
{
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addOption('/m', $notification->getMessage())
->addOption('/p', $notification->getTitle())
->addOption('/i', $notification->getIcon());
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
return OS::isWindowsSeven() && $this->getProgram();
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'notifu';
}
/**
* {@inheritdoc}
*/
public function getBinaryPaths()
{
return Path::realpath(__DIR__.'/../Resources/bin/notifu/notifu.exe');
}
}
@@ -1,51 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
final class NotifySendBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addOption('--urgency', 'normal')
->addOption('--app-name', 'notify')
->addOption('--icon', $notification->getIcon())
->addOption('--expire-time', 1)
->addArgument($notification->getTitle())
->addArgument($notification->getMessage());
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
return OS::isUnix() && $this->getProgram();
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'notify-send';
}
}
@@ -1,34 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
final class NullBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
return false;
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return '';
}
}
@@ -1,61 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
use Flasher\Cli\Prime\System\Path;
final class SnoreToastBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addOption('-m', $notification->getMessage())
->addOption('-t', $notification->getTitle())
->addOption('-p', $notification->getIcon());
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
if (!$this->getProgram()) {
return false;
}
return OS::isWindowsEightOrHigher() || OS::isWindowsSubsystemForLinux();
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'snoretoast';
}
/**
* {@inheritdoc}
*/
public function getBinaryPaths()
{
return Path::realpath(__DIR__.'/../Resources/bin/snoreToast/snoretoast-x86.exe');
}
}
@@ -1,57 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
final class TerminalNotifierBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addOption('-message', $notification->getMessage())
->addOption('-title', $notification->getTitle());
if (version_compare(OS::getMacOSVersion(), '10.9.0', '>=')) {
$cmd->addOption('-appIcon', $notification->getIcon());
}
/** @var string|null $url */
$url = $notification->getOption('url');
if ($url) {
$cmd->addOption('-open', $url);
}
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
return OS::isMacOS() && $this->getProgram();
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'terminal-notifier';
}
}
@@ -1,62 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
use Flasher\Cli\Prime\System\Path;
final class ToasterBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addOption('-t', $notification->getTitle())
->addOption('-m', $notification->getMessage())
->addOption('-p', $notification->getIcon())
->addArgument('-w');
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
if (!$this->getProgram()) {
return false;
}
return OS::isWindowsEightOrHigher() || OS::isWindowsSubsystemForLinux();
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'toast';
}
/**
* {@inheritdoc}
*/
public function getBinaryPaths()
{
return Path::realpath(__DIR__.'/../Resources/bin/toaster/toast.exe');
}
}
@@ -1,48 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Notifier;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\System\Command;
use Flasher\Cli\Prime\System\OS;
final class ZenityBaseNotifier extends BaseNotifier
{
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = Notification::wrap($notification);
$cmd = new Command($this->getProgram());
$cmd
->addArgument('--notification')
->addOption('--text', $notification->getTitle().'\n\n'.$notification->getMessage())
->addOption('--window-icon', $notification->getIcon());
$cmd->run();
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
return OS::isUnix() && $this->getProgram();
}
/**
* {@inheritdoc}
*/
public function getBinary()
{
return 'zenity';
}
}
-231
View File
@@ -1,231 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime;
use Flasher\Cli\Prime\Notifier\BaseNotifier;
use Flasher\Cli\Prime\System\Path;
use Flasher\Prime\Notification\NotificationInterface;
final class Notify extends BaseNotifier
{
/**
* @var NotifyInterface|null
*/
private $notifier;
/**
* @var NotifyInterface[]
*/
private $notifiers = array();
/**
* @var NotifyInterface[]
*/
private $sorted = array();
/**
* @var bool|null
*/
private $isSupported;
/**
* @var string|null
*/
private $title;
/**
* @var array{success?: string, error?: string, info?: string, warning?: string}
*/
private $icons = array();
/**
* @param string|null $title
* @param array{success?: string, error?: string, info?: string, warning?: string}|string $icons
*/
public function __construct($title = 'PHPFlasher', $icons = array())
{
$this->title = $title;
$this->icons = $this->configureIcons($icons);
$this->addNotifier(new Notifier\NotifySendBaseNotifier());
$this->addNotifier(new Notifier\AppleScriptBaseNotifier());
$this->addNotifier(new Notifier\GrowlNotifyBaseNotifier());
$this->addNotifier(new Notifier\KDialogBaseNotifier());
$this->addNotifier(new Notifier\NotifuBaseNotifier());
$this->addNotifier(new Notifier\SnoreToastBaseNotifier());
$this->addNotifier(new Notifier\TerminalNotifierBaseNotifier());
$this->addNotifier(new Notifier\ToasterBaseNotifier());
$this->addNotifier(new Notifier\ZenityBaseNotifier());
}
/**
* @param string|null $title
* @param array{success?: string, error?: string, info?: string, warning?: string}|string $icons
*
* @return static
*/
public static function create($title = null, $icons = array())
{
return new self($title, $icons);
}
/**
* {@inheritdoc}
*/
public function send($notification)
{
$notification = $this->configureNotification($notification);
$notifier = $this->createNotifier();
$notifier->send($notification);
}
/**
* @return void
*/
public function addNotifier(NotifyInterface $notifier)
{
$this->notifiers[] = $notifier;
$this->reset();
}
/**
* {@inheritdoc}
*/
public function getPriority()
{
return 0;
}
/**
* {@inheritdoc}
*/
public function isSupported()
{
if (null !== $this->isSupported) {
return $this->isSupported;
}
if ($this->notifier instanceof NotifyInterface) {
return true;
}
foreach ($this->getNotifiers() as $notifier) {
if ($notifier->isSupported()) {
return $this->isSupported = true;
}
}
return false;
}
/**
* @return void
*/
private function reset()
{
$this->notifier = null;
$this->sorted = array();
$this->isSupported = null;
}
/**
* @return NotifyInterface[]
*/
private function getNotifiers()
{
if (array() !== $this->sorted) {
return $this->sorted;
}
$this->sorted = $this->notifiers;
usort($this->sorted, static function (NotifyInterface $a, NotifyInterface $b) {
$priorityA = $a->getPriority();
$priorityB = $b->getPriority();
if ($priorityA === $priorityB) {
return 0;
}
return $priorityA < $priorityB ? 1 : -1;
});
return $this->sorted;
}
/**
* @return NotifyInterface
*/
private function createNotifier()
{
if ($this->notifier instanceof NotifyInterface) {
return $this->notifier;
}
foreach ($this->getNotifiers() as $notifier) {
if ($notifier->isSupported()) {
return $this->notifier = $notifier;
}
}
return new Notifier\NullBaseNotifier();
}
/**
* @param array{success?: string, error?: string, info?: string, warning?: string}|string $icons
*
* @return array<'default'|'error'|'info'|'success'|'warning', string>
*/
private function configureIcons($icons = array())
{
$icons = $icons ?: array();
if (!\is_array($icons)) {
$icons = array(
NotificationInterface::SUCCESS => $icons,
NotificationInterface::ERROR => $icons,
NotificationInterface::INFO => $icons,
NotificationInterface::WARNING => $icons,
'default' => $icons,
);
}
return array_merge(array(
NotificationInterface::SUCCESS => Path::realpath(__DIR__.'/Resources/icons/success.png'),
NotificationInterface::ERROR => Path::realpath(__DIR__.'/Resources/icons/error.png'),
NotificationInterface::INFO => Path::realpath(__DIR__.'/Resources/icons/info.png'),
NotificationInterface::WARNING => Path::realpath(__DIR__.'/Resources/icons/warning.png'),
'default' => Path::realpath(__DIR__.'/Resources/icons/info.png'),
), $icons);
}
/**
* @param Notification|string $notification
*
* @return Notification
*/
private function configureNotification($notification)
{
$notification = Notification::wrap($notification);
if (null === $notification->getTitle()) {
$notification->setTitle($this->title);
}
if (null === $notification->getIcon() && isset($this->icons[$notification->getType()])) {
$notification->setIcon($this->icons[$notification->getType()]);
}
if (null === $notification->getIcon()) {
$notification->setIcon($this->icons['default']); // @phpstan-ignore-line
}
return $notification;
}
}
-74
View File
@@ -1,74 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime;
interface NotifyInterface
{
/**
* @param Notification|string $notification
*
* @return void
*/
public function send($notification);
/**
* @return int
*/
public function getPriority();
/**
* @return bool
*/
public function isSupported();
/**
* @param string $type
* @param string $message
* @param string|null $title
* @param array<string, mixed> $options
*
* @return void
*/
public function type($type, $message, $title = null, $options = array());
/**
* @param string $message
* @param string|null $title
* @param array<string, mixed> $options
*
* @return void
*/
public function warning($message, $title = null, $options = array());
/**
* @param string $message
* @param string|null $title
* @param array<string, mixed> $options
*
* @return void
*/
public function info($message, $title = null, $options = array());
/**
* @param string $message
* @param string|null $title
* @param array<string, mixed> $options
*
* @return void
*/
public function error($message, $title = null, $options = array());
/**
* @param string $message
* @param string|null $title
* @param array<string, mixed> $options
*
* @return void
*/
public function success($message, $title = null, $options = array());
}
-44
View File
@@ -1,44 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\Presenter;
use Flasher\Cli\Prime\Notification;
use Flasher\Cli\Prime\Notify;
use Flasher\Cli\Prime\NotifyInterface;
use Flasher\Prime\Response\Presenter\PresenterInterface;
use Flasher\Prime\Response\Response;
final class CliPresenter implements PresenterInterface
{
const NAME = 'cli';
/**
* @var NotifyInterface
*/
private $notifier;
public function __construct(NotifyInterface $notifier = null)
{
$this->notifier = $notifier ?: new Notify();
}
/**
* {@inheritdoc}
*/
public function render(Response $response)
{
if ('cli' !== \PHP_SAPI || array() === $response->getEnvelopes()) {
return;
}
foreach ($response->getEnvelopes() as $envelope) {
$notification = Notification::fromEnvelope($envelope);
$this->notifier->send($notification);
}
}
}
-74
View File
@@ -1,74 +0,0 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
<img src="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github.png" alt="PHPFlasher Logo">
</picture>
</p>
## About PHPFlasher
PHPFlasher is a powerful and easy-to-use package that allows you to quickly and easily add flash messages to your Laravel or Symfony projects.
Whether you need to alert users of a successful form submission, an error, or any other important information, flash messages are a simple and effective solution for providing feedback to your users.
With PHPFlasher, you can easily record and store messages within the session, making it simple to retrieve and display them on the current or next page.
This improves user engagement and enhances the overall user experience on your website or application.
Whether you're a beginner or an experienced developer, PHPFlasher's intuitive and straightforward design makes it easy to integrate into your projects.
So, if you're looking for a reliable, flexible and easy to use flash messages solution, PHPFlasher is the perfect choice.
## Official Documentation
Documentation for PHPFlasher can be found on the [https://php-flasher.io](https://php-flasher.io).
## Contributors and sponsors
Join our team of contributors and make a lasting impact on our project!
We are always looking for passionate individuals who want to contribute their skills and ideas.
Whether you're a developer, designer, or simply have a great idea, we welcome your participation and collaboration.
Shining stars of our community:
<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes-khoubza/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes KHOUBZA"/><br /><sub><b>Younes KHOUBZA</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salmayno"><img src="https://avatars.githubusercontent.com/u/27933199?v=4?s=100" width="100px;" alt="Salma Mourad"/><br /><sub><b>Salma Mourad</b></sub></a><br /><a href="#financial-salmayno" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/rstacode"><img src="https://avatars.githubusercontent.com/u/35005761?v=4?s=100" width="100px;" alt="Nashwan Abdullah"/><br /><sub><b>Nashwan Abdullah</b></sub></a><br /><a href="#financial-codenashwan" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://darvis.nl/"><img src="https://avatars.githubusercontent.com/u/7394837?v=4?s=100" width="100px;" alt="Arvid de Jong"/><br /><sub><b>Arvid de Jong</b></sub></a><br /><a href="#financial-darviscommerce" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ashallendesign.co.uk/"><img src="https://avatars.githubusercontent.com/u/39652331?v=4?s=100" width="100px;" alt="Ash Allen"/><br /><sub><b>Ash Allen</b></sub></a><br /><a href="#design-ash-jc-allen" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://about.me/murrant"><img src="https://avatars.githubusercontent.com/u/39462?v=4?s=100" width="100px;" alt="Tony Murray"/><br /><sub><b>Tony Murray</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=murrant" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/n3wborn"><img src="https://avatars.githubusercontent.com/u/10246722?v=4?s=100" width="100px;" alt="Stéphane P"/><br /><sub><b>Stéphane P</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=n3wborn" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/lucas.maciel_z"><img src="https://avatars.githubusercontent.com/u/80225404?v=4?s=100" width="100px;" alt="Lucas Maciel"/><br /><sub><b>Lucas Maciel</b></sub></a><br /><a href="#design-LucasStorm" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://siek.io/"><img src="https://avatars.githubusercontent.com/u/5730766?v=4?s=100" width="100px;" alt="Antoni Siek"/><br /><sub><b>Antoni Siek</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=ImJustToNy" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Contact
PHPFlasher is being actively developed by <a href="https://github.com/yoeunes">yoeunes</a>.
You can reach out with questions, bug reports, or feature requests on any of the following:
- [Github Issues](https://github.com/php-flasher/php-flasher/issues)
- [Github](https://github.com/yoeunes)
- [Twitter](https://twitter.com/yoeunes)
- [Linkedin](https://www.linkedin.com/in/younes-khoubza/)
- [Email me directly](mailto:younes.khoubza@gmail.com)
## License
PHPFlasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
<p align="center"> <b>Made with ❤️ by <a href="https://www.linkedin.com/in/younes-khoubza/">Younes KHOUBZA</a> </b> </p>
@@ -1,7 +0,0 @@
# Notifu
This binary come from the [Notifu](http://www.paralint.com/projects/notifu)
project. All credits for this Windows tool goes to their original authors.
Only the required file was extracted here. If you want to fully test it, please
have a look at [this url](http://www.paralint.com/projects/notifu) instead.
@@ -1,166 +0,0 @@
// Retrieved from https://github.com/KDE/snoretoast/blob/master/COPYING.LGPL-3 version 0.7.0
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
@@ -1,7 +0,0 @@
# SnoreToast
These toaster binary files come from the [KDE/snoretoast](https://github.com/KDE/snoretoast)
project. All credits for this Windows 8* application goes to [KDE project](https://github.com/KDE).
Only the required files were extracted here. If you want to fully test it,
please have a look at the github project instead.
@@ -1,7 +0,0 @@
# Toaster
These toaster binary files come from the [nels-o/toaster](https://github.com/nels-o/toaster)
project. All credits for this Windows 8 application goes to [nels-o](https://github.com/nels-o).
Only the required files were extracted here. If you want to fully test it,
please have a look at the github project instead.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

-100
View File
@@ -1,100 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\System;
final class Command
{
/**
* @var string|null
*/
private $command;
/**
* @var array<string, int|string|null>
*/
private $options = array();
/**
* @var array<int|string|null>
*/
private $arguments = array();
/**
* @param string|null $command
*/
public function __construct($command)
{
$this->command = null !== $command ? escapeshellcmd((string) $command) : null;
}
/**
* @param string $name
* @param int|string|null $value
*
* @return static
*/
public function addOption($name, $value = null)
{
$this->options[$name] = null !== $value ? escapeshellarg((string) $value) : null;
return $this;
}
/**
* @param int|string|null $argument
*
* @return static
*/
public function addArgument($argument)
{
$this->arguments[] = null !== $argument ? escapeshellarg((string) $argument) : $argument;
return $this;
}
/**
* @return void
*/
public function run()
{
$command = $this->command.' '.$this->formatOptions().' '.$this->formatArguments();
if (OS::isWindows()) {
pclose(popen('start /B '.$command, 'r')); // @phpstan-ignore-line
return;
}
exec($command);
}
/**
* @return string
*/
private function formatArguments()
{
return implode(' ', $this->arguments);
}
/**
* @return string
*/
private function formatOptions()
{
$line = '';
foreach ($this->options as $name => $value) {
$line .= $name;
if ($value) {
$line .= ' '.$value.' ';
}
}
return $line;
}
}
-94
View File
@@ -1,94 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\System;
final class OS
{
/**
* @return string
*/
public static function getName()
{
return php_uname('s');
}
/**
* @return string
*/
public static function getRelease()
{
return php_uname('r');
}
/**
* @return bool
*/
public static function isUnix()
{
return \in_array(self::getName(), array(
'Linux',
'FreeBSD',
'NetBSD',
'OpenBSD',
'SunOS',
'DragonFly',
), true);
}
/**
* @return bool
*/
public static function isWindows()
{
return 'WIN' === strtoupper(substr(self::getName(), 0, 3));
}
/**
* @return bool
*/
public static function isWindowsSeven()
{
return self::isWindows() && '6.1' === self::getRelease();
}
/**
* @return bool
*/
public static function isWindowsEightOrHigher()
{
return self::isWindows() && version_compare(self::getRelease(), '6.2', '>=');
}
/**
* @return bool
*/
public static function isWindowsSubsystemForLinux()
{
return self::isUnix() && false !== mb_strpos(strtolower(self::getName()), 'microsoft');
}
/**
* @return bool
*/
public static function isMacOS()
{
return false !== strpos(self::getName(), 'Darwin');
}
/**
* @return string
*/
public static function getMacOSVersion()
{
exec('sw_vers -productVersion', $output);
$output = (array) $output;
return trim(reset($output));
}
}
-21
View File
@@ -1,21 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\System;
final class Path
{
/**
* @param string $path
*
* @return string
*/
public static function realpath($path)
{
return (string) realpath(str_replace(array('/', '\\'), \DIRECTORY_SEPARATOR, $path));
}
}
-33
View File
@@ -1,33 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Prime\System;
final class Program
{
/**
* @param string|null $program
*
* @return bool
*/
public static function exist($program)
{
if (null === $program) {
return false;
}
if (OS::isWindows()) {
$output = shell_exec("where {$program} 2>null");
return !empty($output);
}
$output = shell_exec("command -v {$program}");
return !empty($output);
}
}
-57
View File
@@ -1,57 +0,0 @@
{
"name": "php-flasher/flasher-cli",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"license": "MIT",
"type": "library",
"keywords": [
"php-flasher",
"flash-messages",
"notification-system",
"user-feedback",
"toastr",
"sweetalert",
"pnotify",
"noty",
"notyf",
"desktop-notifications",
"php",
"laravel",
"symfony",
"javascript",
"yoeunes",
"framework-agnostic",
"phpstorm-auto-complete",
"custom-adapter",
"user-experience",
"rtl",
"dark-mode"
],
"authors": [
{
"name": "Younes KHOUBZA",
"email": "younes.khoubza@gmail.com",
"homepage": "https://www.linkedin.com/in/younes-khoubza",
"role": "Developer"
}
],
"homepage": "https://php-flasher.io",
"require": {
"php": ">=5.3",
"ext-mbstring": "*",
"php-flasher/flasher": "^1.15.14"
},
"minimum-stability": "stable",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Flasher\\Cli\\Prime\\": ""
},
"files": [
"helpers.php"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true
}
}
-29
View File
@@ -1,29 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
use Flasher\Prime\Container\FlasherContainer;
if (!function_exists('notify')) {
/**
* @param Flasher\Cli\Prime\Notification|string|null $notification
*
* @return Flasher\Cli\Prime\Notify
*/
function notify($notification = null)
{
/** @var Flasher\Cli\Prime\Notify $notifier */
$notifier = FlasherContainer::create('flasher.notify');
if (null === $notification || 0 === func_num_args()) {
return $notifier;
}
$notifier->send($notification);
return $notifier;
}
}
-5
View File
@@ -1,5 +0,0 @@
github: yoeunes
patreon: yoeunes
ko_fi: yoeunes
open_collective: php-flasher
custom: https://www.paypal.com/paypalme/yoeunes
-22
View File
@@ -1,22 +0,0 @@
name: Auto Closer PR
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Hi, thank you for your contribution.
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
We'd like to kindly ask you to move the contribution there - https://github.com/php-flasher/php-flasher.
We'll check it, review it and give you feed back right way.
Thank you.
@@ -1,31 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Symfony\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
final class NotifierCompilerPass implements CompilerPassInterface
{
/**
* @return void
*/
public function process(ContainerBuilder $container)
{
if (!$container->has('flasher.cli_notifier')) {
return;
}
$notifier = $container->findDefinition('flasher.cli_notifier');
foreach ($container->findTaggedServiceIds('flasher.cli_notifier') as $id => $tags) {
$notifier->addMethodCall('addNotifier', array(new Reference($id)));
}
}
}
@@ -1,42 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Symfony\DependencyInjection;
use Flasher\Symfony\Bridge\DependencyInjection\FlasherConfiguration;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
final class Configuration extends FlasherConfiguration
{
/**
* @return TreeBuilder
*/
public function getFlasherConfigTreeBuilder()
{
$name = 'flasher_cli';
$treeBuilder = new TreeBuilder($name);
$rootNode = method_exists($treeBuilder, 'getRootNode')
? $treeBuilder->getRootNode()
: $treeBuilder->root($name); // @phpstan-ignore-line
$rootNode
->children()
->scalarNode('title')
->defaultValue('PHPFlasher')
->end()
->arrayNode('icons')
->prototype('variable')->end()
->defaultValue(array())
->end()
->end()
;
return $treeBuilder;
}
}
@@ -1,43 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Symfony\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
final class FlasherCliExtension extends Extension
{
/**
* @param array<int, array<string, mixed>> $configs
*
* @return void
*/
public function load(array $configs, ContainerBuilder $container)
{
$configs = $this->processConfiguration(new Configuration(), $configs);
$loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.php');
$this->configureNotifier($configs, $container);
}
/**
* @param array<int, array<string, mixed>> $configs
*
* @return void
*/
private function configureNotifier(array $configs, ContainerBuilder $container)
{
$notifier = $container->getDefinition('flasher.notify');
$notifier->replaceArgument(0, $configs['title']); // @phpstan-ignore-line
$notifier->replaceArgument(1, $configs['icons']); // @phpstan-ignore-line
}
}
@@ -1,26 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Cli\Symfony;
use Flasher\Cli\Symfony\DependencyInjection\Compiler\NotifierCompilerPass;
use Flasher\Cli\Symfony\DependencyInjection\FlasherCliExtension;
use Flasher\Symfony\Bridge\FlasherBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class FlasherCliSymfonyBundle extends FlasherBundle // Symfony\Component\HttpKernel\Bundle\Bundle
{
protected function flasherBuild(ContainerBuilder $container)
{
$container->addCompilerPass(new NotifierCompilerPass());
}
protected function getFlasherContainerExtension()
{
return new FlasherCliExtension();
}
}
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 PHPFlasher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-74
View File
@@ -1,74 +0,0 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github-dark.png">
<img src="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-github.png" alt="PHPFlasher Logo">
</picture>
</p>
## About PHPFlasher
PHPFlasher is a powerful and easy-to-use package that allows you to quickly and easily add flash messages to your Laravel or Symfony projects.
Whether you need to alert users of a successful form submission, an error, or any other important information, flash messages are a simple and effective solution for providing feedback to your users.
With PHPFlasher, you can easily record and store messages within the session, making it simple to retrieve and display them on the current or next page.
This improves user engagement and enhances the overall user experience on your website or application.
Whether you're a beginner or an experienced developer, PHPFlasher's intuitive and straightforward design makes it easy to integrate into your projects.
So, if you're looking for a reliable, flexible and easy to use flash messages solution, PHPFlasher is the perfect choice.
## Official Documentation
Documentation for PHPFlasher can be found on the [https://php-flasher.io](https://php-flasher.io).
## Contributors and sponsors
Join our team of contributors and make a lasting impact on our project!
We are always looking for passionate individuals who want to contribute their skills and ideas.
Whether you're a developer, designer, or simply have a great idea, we welcome your participation and collaboration.
Shining stars of our community:
<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/younes-khoubza/"><img src="https://avatars.githubusercontent.com/u/10859693?v=4?s=100" width="100px;" alt="Younes KHOUBZA"/><br /><sub><b>Younes KHOUBZA</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Code">💻</a> <a href="https://github.com/php-flasher/php-flasher/commits?author=yoeunes" title="Documentation">📖</a> <a href="#maintenance-yoeunes" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salmayno"><img src="https://avatars.githubusercontent.com/u/27933199?v=4?s=100" width="100px;" alt="Salma Mourad"/><br /><sub><b>Salma Mourad</b></sub></a><br /><a href="#financial-salmayno" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.youtube.com/rstacode"><img src="https://avatars.githubusercontent.com/u/35005761?v=4?s=100" width="100px;" alt="Nashwan Abdullah"/><br /><sub><b>Nashwan Abdullah</b></sub></a><br /><a href="#financial-codenashwan" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://darvis.nl/"><img src="https://avatars.githubusercontent.com/u/7394837?v=4?s=100" width="100px;" alt="Arvid de Jong"/><br /><sub><b>Arvid de Jong</b></sub></a><br /><a href="#financial-darviscommerce" title="Financial">💵</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ashallendesign.co.uk/"><img src="https://avatars.githubusercontent.com/u/39652331?v=4?s=100" width="100px;" alt="Ash Allen"/><br /><sub><b>Ash Allen</b></sub></a><br /><a href="#design-ash-jc-allen" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://about.me/murrant"><img src="https://avatars.githubusercontent.com/u/39462?v=4?s=100" width="100px;" alt="Tony Murray"/><br /><sub><b>Tony Murray</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=murrant" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/n3wborn"><img src="https://avatars.githubusercontent.com/u/10246722?v=4?s=100" width="100px;" alt="Stéphane P"/><br /><sub><b>Stéphane P</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=n3wborn" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/lucas.maciel_z"><img src="https://avatars.githubusercontent.com/u/80225404?v=4?s=100" width="100px;" alt="Lucas Maciel"/><br /><sub><b>Lucas Maciel</b></sub></a><br /><a href="#design-LucasStorm" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://siek.io/"><img src="https://avatars.githubusercontent.com/u/5730766?v=4?s=100" width="100px;" alt="Antoni Siek"/><br /><sub><b>Antoni Siek</b></sub></a><br /><a href="https://github.com/php-flasher/php-flasher/commits?author=ImJustToNy" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
## Contact
PHPFlasher is being actively developed by <a href="https://github.com/yoeunes">yoeunes</a>.
You can reach out with questions, bug reports, or feature requests on any of the following:
- [Github Issues](https://github.com/php-flasher/php-flasher/issues)
- [Github](https://github.com/yoeunes)
- [Twitter](https://twitter.com/yoeunes)
- [Linkedin](https://www.linkedin.com/in/younes-khoubza/)
- [Email me directly](mailto:younes.khoubza@gmail.com)
## License
PHPFlasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
<p align="center"> <b>Made with ❤️ by <a href="https://www.linkedin.com/in/younes-khoubza/">Younes KHOUBZA</a> </b> </p>
@@ -1,49 +0,0 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
use Flasher\Cli\Prime\Presenter\CliPresenter;
use Flasher\Symfony\Bridge\Bridge;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\Reference;
if (!isset($container)) {
return;
}
/** @var ChildDefinition $definition */
$definition = class_exists('Symfony\Component\DependencyInjection\ChildDefinition')
? new ChildDefinition('flasher.notification_factory')
: new DefinitionDecorator('flasher.notification_factory'); // @phpstan-ignore-line
$definition
->setClass('Flasher\Cli\Prime\CliFactory')
->setPublic(true)
->addTag('flasher.factory', array('alias' => 'cli'));
$container->setDefinition('flasher.cli', $definition);
$container->register('flasher.notify', 'Flasher\Cli\Prime\Notify')
->setPublic(true)
->addArgument(null)
->addArgument(array());
$container
->register('flasher.cli.presenter', 'Flasher\Cli\Prime\Presenter\CliPresenter')
->addArgument(new Reference('flasher.notify'))
->addTag('flasher.presenter', array('alias' => CliPresenter::NAME));
$container
->register('flasher.cli.render_listener', 'Flasher\Cli\Prime\EventListener\RenderListener')
->addArgument(new Reference('flasher'))
->addTag('flasher.event_subscriber', array('priority' => -256));
if (Bridge::canLoadAliases()) {
$container->setAlias('Flasher\Cli\Prime\CliFactory', 'flasher.cli');
$container->setAlias('Flasher\Cli\Prime\Notify', 'flasher.notify');
$container->setAlias('Flasher\Cli\Prime\NotifyInterface', 'flasher.notify');
}
-54
View File
@@ -1,54 +0,0 @@
{
"name": "php-flasher/flasher-cli-symfony",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"license": "MIT",
"type": "symfony-bundle",
"keywords": [
"php-flasher",
"flash-messages",
"notification-system",
"user-feedback",
"toastr",
"sweetalert",
"pnotify",
"noty",
"notyf",
"desktop-notifications",
"php",
"laravel",
"symfony",
"javascript",
"yoeunes",
"framework-agnostic",
"phpstorm-auto-complete",
"custom-adapter",
"user-experience",
"rtl",
"dark-mode"
],
"authors": [
{
"name": "Younes KHOUBZA",
"email": "younes.khoubza@gmail.com",
"homepage": "https://www.linkedin.com/in/younes-khoubza",
"role": "Developer"
}
],
"homepage": "https://php-flasher.io",
"require": {
"php": ">=5.3",
"php-flasher/flasher-cli": "^1.15.14",
"php-flasher/flasher-symfony": "^1.15.14"
},
"minimum-stability": "stable",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Flasher\\Cli\\Symfony\\": ""
}
},
"config": {
"preferred-install": "dist",
"sort-packages": true
}
}
-5
View File
@@ -1,5 +0,0 @@
github: yoeunes
patreon: yoeunes
ko_fi: yoeunes
open_collective: php-flasher
custom: https://www.paypal.com/paypalme/yoeunes
-22
View File
@@ -1,22 +0,0 @@
name: Auto Closer PR
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Hi, thank you for your contribution.
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
We'd like to kindly ask you to move the contribution there - https://github.com/php-flasher/php-flasher.
We'll check it, review it and give you feed back right way.
Thank you.

Some files were not shown because too many files have changed in this diff Show More