Compare commits

..

40 Commits

Author SHA1 Message Date
Khoubza Younes 376749c2e6 upgrade flasher dependencies 2021-09-08 08:28:21 +01:00
KHOUBZA Younes b8e0e0de22 add metadata files like .editorconfig, SECURITY.md CODE_OF_CONDUCT.md LICENSE ...etc 2021-08-26 16:22:50 +01:00
KHOUBZA Younes 243251eca2 update dependencies 2021-08-22 23:17:53 +01:00
KHOUBZA Younes a0e4189fec replace assetSame by assetEquals 2021-05-09 17:18:48 +00:00
KHOUBZA Younes d50059e1a3 update flasher dependencies 2021-05-09 14:33:43 +00:00
KHOUBZA Younes e13aa4cc60 update PHP Coding Standards Fixer
update PHP Coding Standards Fixer
2021-05-09 13:56:16 +00:00
KHOUBZA Younes 9abe8b76ea update workflows test yml 2021-05-06 12:14:54 +00:00
KHOUBZA Younes 4d7d950f6f Merge remote-tracking branch 'toastr-symfony/main' 2021-05-02 14:41:24 +00:00
KHOUBZA Younes ce0a6e70fc rename extensions 2021-04-17 18:40:02 +02:00
KHOUBZA Younes 60a76cf1c3 rename symfony extensions 2021-04-17 18:13:10 +02:00
KHOUBZA Younes 3f0087d7c3 rename symfony bundles names to fix symfony flex bundle auto register 2021-04-17 17:57:12 +02:00
KHOUBZA Younes 5492d30374 update composer.json 2021-04-16 20:26:48 +02:00
KHOUBZA Younes 7ff1ec4fc1 clean up code 2021-04-16 20:08:36 +02:00
KHOUBZA Younes e6237cbe42 refactor symfony bundle configuration and response manager 2021-02-09 05:15:19 +01:00
Khoubza Younes 09fc4d6ec5 update home page 2020-12-17 11:26:35 +01:00
Khoubza Younes 1dac7bfdbb update README.md for all packages 2020-12-17 11:22:04 +01:00
Khoubza Younes b6ff681393 add open_collective to FUNDING.yml 2020-12-17 11:02:48 +01:00
Khoubza Younes 3e0b49d9db update README.md for all packages 2020-12-17 11:00:17 +01:00
Khoubza Younes ff48db2429 run tests on stable versions 2020-12-16 08:58:28 +01:00
Khoubza Younes 669e389677 run tests on stable versions 2020-12-16 08:48:36 +01:00
KHOUBZA Younes a19f4c4da1 update tests 2020-12-15 15:17:00 +01:00
KHOUBZA Younes 7e5116eaed update factories and add tailwindcss template 2020-12-15 15:00:08 +01:00
Khoubza Younes fd6f43026b tag 0.1.0 version 2020-12-14 09:20:45 +01:00
Khoubza Younes 8e852700c4 add toastr symfony tests 2020-12-12 09:11:32 +01:00
Khoubza Younes ed1d4154e9 update tests for flasher prime repository 2020-12-11 08:56:17 +01:00
Khoubza Younes 13012ce31e update laravel and js files 2020-12-10 13:55:46 +01:00
Khoubza Younes 3bd0365245 update session listener inject javascript before html tag instead of body 2020-12-10 05:13:54 +01:00
Khoubza Younes 68fee8dcf0 update flasherjs and flasher symfony bundle 2020-12-10 04:55:20 +01:00
Khoubza Younes 018e83b8da remove middelawares and delete renderer and rename presenter to renderer 2020-12-08 22:33:56 +01:00
Khoubza Younes aeaf31b5bb add FUNDING.yml file 2020-12-07 17:34:15 +01:00
Khoubza Younes be50c09c04 fix github workflow 2020-12-06 21:40:28 +01:00
Khoubza Younes 6e4620ef77 fix github workflow 2020-12-06 21:27:21 +01:00
Khoubza Younes c675167ec5 update github worklow.yaml 2020-12-06 19:39:19 +01:00
Khoubza Younes d7783cae2a fix all tests 2020-12-06 19:33:03 +01:00
Khoubza Younes 412e386eb6 fix composer.json psr-4 autoloading 2020-12-06 18:29:43 +01:00
Khoubza Younes 3588ac8d16 update namespaces 2020-12-06 17:29:32 +01:00
Khoubza Younes cdf0f7949a update composer.json 2020-12-06 16:34:11 +01:00
Khoubza Younes c5029a5d44 fix event dispatcher and call the storage service 2020-12-06 04:03:14 +01:00
KHOUBZA Younes e845b33608 update namespace 2020-12-03 09:15:47 +01:00
KHOUBZA Younes 30fb4672f1 add php-notify classes and rename namespaces 2020-12-02 00:57:12 +01:00
478 changed files with 615 additions and 28699 deletions
-1
View File
@@ -1 +0,0 @@
undefined
-3
View File
@@ -1,3 +0,0 @@
{
"path": "cz-conventional-changelog"
}
+55
View File
@@ -0,0 +1,55 @@
# Contributing
Contributions are **welcome** and will be fully **credited**.
Please read and understand the contribution guide before creating an issue or pull request.
## Etiquette
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
extremely unfair for them to suffer abuse or anger for their hard work.
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
world that developers are civilized and selfless people.
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
## Viability
When requesting or submitting new features, first consider whether it might be useful to others. Open
source projects are used by many developers, who may have entirely different needs to your own. Think about
whether or not your feature is likely to be used by other users of the project.
## Procedure
Before filing an issue:
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.
Before submitting a pull request:
- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
## Requirements
If the project maintainer has any additional requirements, you will find them listed here.
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
**Happy coding**!
+3 -2
View File
@@ -1,5 +1,6 @@
github: yoeunes
# These are supported funding model platforms
patreon: yoeunes
ko_fi: yoeunes
open_collective: php-flasher
custom: https://www.paypal.com/paypalme/yoeunes
custom: ['https://www.paypal.com/paypalme/yoeunes']
+3
View File
@@ -0,0 +1,3 @@
# Security Policy
If you discover any security related issues, please email younes.khoubza@gmail.com instead of using the issue tracker.
+7
View File
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
+79 -123
View File
@@ -1,147 +1,103 @@
name: tests
name: Running tests
on:
push:
pull_request:
schedule:
- cron: '* * * * *'
jobs:
symfony-test:
runs-on: ${{ matrix.os }}
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
fail-fast: true
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.* ]
symfony: [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.*]
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 }
- symfony: 5.2.*
php: 7.2
phpunit: 8.3.*
name: symfony[${{ matrix.symfony }}] php[${{ matrix.php }}] - ${{ matrix.os }}
- 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
name: S${{ matrix.symfony }} - P${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v1
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-symfony-${{ matrix.symfony }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: 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 "symfony/symfony:${{ matrix.symfony }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update
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
composer update --prefer-dist --no-interaction --no-suggest
- 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
run: vendor/bin/phpunit
-9
View File
@@ -3,12 +3,3 @@ 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);
+3
View File
@@ -0,0 +1,3 @@
<?php
namespace PHPSTORM_META;
-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.
+76
View File
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at younes.khoubza@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
+47
View File
@@ -0,0 +1,47 @@
<?php
namespace Flasher\Toastr\Symfony\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
final class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('flasher_toastr');
if (\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('flasher_toastr');
}
$rootNode
->children()
->arrayNode('scripts')
->prototype('scalar')->end()
->defaultValue(array(
'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js',
'https://cdn.jsdelivr.net/npm/@flasher/flasher-toastr@0.1.3/dist/flasher-toastr.min.js',
))
->end()
->arrayNode('styles')
->prototype('scalar')->end()
->defaultValue(array())
->end()
->arrayNode('options')
->prototype('variable')->end()
->ignoreExtraKeys(false)
->defaultValue(array(
'progressBar' => true,
'timeOut' => 5000,
))
->end()
->end()
;
return $treeBuilder;
}
}
@@ -0,0 +1,19 @@
<?php
namespace Flasher\Toastr\Symfony\DependencyInjection;
use Flasher\Symfony\DependencyInjection\Extension;
use Symfony\Component\Config\FileLocator;
final class FlasherToastrExtension extends Extension
{
protected function getConfigFileLocator()
{
return new FileLocator(__DIR__ . '/../Resources/config');
}
protected function getConfigClass()
{
return new Configuration();
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace Flasher\Toastr\Symfony;
use Flasher\Toastr\Symfony\DependencyInjection\FlasherToastrExtension;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class FlasherToastrSymfonyBundle extends Bundle
{
public function getContainerExtension()
{
return new FlasherToastrExtension();
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 PHPFlasher
Copyright (c) 2020 PHP Flasher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+61 -48
View File
@@ -1,67 +1,80 @@
<p align="center"><img width="600" alt="flasher" src="https://user-images.githubusercontent.com/10859693/102468596-03317180-4052-11eb-9df3-44dc6235b238.png"></p>
<h1 align="center">A powerful and flexible flash notifications system for PHP, Laravel, Symfony</h1>
<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>
:eyes: PHP Flasher helps you to add flash notifications to your PHP projects.
This library was developed with the idea that you should be able to add flash notification to your application with ease and with few lines of code.
No application-wide rewrites and no big investments upfront.
</p>
## About PHPFlasher
<p align="center">
<a href="https://github.com/php-flasher/flasher">
<img src="https://img.shields.io/badge/source-php--flasher/flasher-blue.svg?style=flat-square">
</a>
<a href="https://github.com/php-flasher/flasher/releases">
<img src="https://img.shields.io/github/tag/php-flasher/flasher.svg">
</a>
<a href="https://github.com/php-flasher/flasher/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-brightgreen.svg">
</a>
<a href="https://packagist.org/packages/php-flasher/flasher">
<img src="https://img.shields.io/packagist/dt/php-flasher/flasher.svg">
</a>
<a href="https://packagist.org/packages/php-flasher/flasher">
<img src="https://img.shields.io/packagist/php-v/php-flasher/flasher.svg?style=flat-square">
</a>
<a href="https://opencollective.com/php-flasher">
<img src="https://opencollective.com/php-flasher/tiers/backer/badge.svg?label=backer&color=brightgreen" />
</a>
<a href="https://opencollective.com/php-flasher">
<img src="https://opencollective.com/php-flasher/tiers/sponsor/badge.svg?label=sponsor&color=brightgreen" />
</a>
</p>
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.
# Why use PHP Flasher ?
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.
The PHP Flasher project supports many notification libraries : __tailwindcss__, __bootstrap__, __toastr.js__, __sweet alert 2__, __pnotify__, __noty__, and __notyf__
and its highly extendable so you can add your custom notifications.
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.
This library is designed, so you can take full control when creating you notifications :
> * Display multiple notifications
> * Sort and filter notifications
> * Render notification from JSON object
> * Limit the number of displayed notifications
> * Show notifications from different libraries at the same time
> * Framework angostic with integration for : Symfony and Laravel
> * Support templates
> * Easy migration from similar libraries.
> * Very flexible so you can add you own adapters
> * ...and more
## Official Documentation
Documentation for PHPFlasher can be found on the [https://php-flasher.io](https://php-flasher.io).
Documentation for PHP Flasher can be found on the [PHP Flasher website](https://php-flasher.github.io/).
## Contributors and sponsors
## Backers && Sponsors
Join our team of contributors and make a lasting impact on our project!
Support this project by becoming a sponsor. Your name will show up in the Contribute page of all PHP Flasher installations as well as here with a link to your website!
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.
Thank you to all our backers and sponsors! 🙏
Shining stars of our community:
<a href="https://opencollective.com/php-flasher#backers" target="_blank">
<img src="https://opencollective.com/php-flasher/backers.svg?width=890" title="Backers" alt="Backers">
</a>
<!-- 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>
<a href="https://opencollective.com/php-flasher#sponsors" target="_blank">
<img src="https://opencollective.com/php-flasher/sponsors.svg?width=890" title="Sponsors" alt="Sponsors">
</a>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
### Contact
<!-- ALL-CONTRIBUTORS-LIST:END -->
PHP Flasher 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:
## 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 Issues](https://github.com/php-flasher/flasher/issues)
- [Github](https://github.com/yoeunes)
- [Twitter](https://twitter.com/yoeunes)
- [Linkedin](https://www.linkedin.com/in/younes-khoubza/)
@@ -69,6 +82,6 @@ You can reach out with questions, bug reports, or feature requests on any of the
## License
PHPFlasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
PHP Flasher 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>
<p align="center"> <b>Made with ❤️ by <a href="https://www.linkedin.com/in/younes-khoubza/">Younes KHOUBZA</a> <b> </p>
+8
View File
@@ -0,0 +1,8 @@
services:
flasher.toastr:
parent: 'flasher.notification_factory'
class: Flasher\Toastr\Prime\ToastrFactory
tags:
- { name: 'flasher.factory', alias: 'toastr' }
Flasher\Toastr\Prime\ToastrFactory: '@flasher.toastr'
@@ -0,0 +1,43 @@
<?php
namespace Flasher\Toastr\Symfony\Tests\DependencyInjection;
use Flasher\Prime\Tests\TestCase;
use Flasher\Toastr\Symfony\DependencyInjection\Configuration;
use Symfony\Component\Config\Definition\Processor;
class ConfigurationTest extends TestCase
{
public function testDefaultConfig()
{
$config = $this->process(array());
$expected = array(
'scripts' => array(
'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js',
'https://cdn.jsdelivr.net/npm/@flasher/flasher-toastr@0.1.3/dist/flasher-toastr.min.js',
),
'styles' => array(),
'options' => array(
'progressBar' => true,
'timeOut' => 5000,
),
);
$this->assertEquals($expected, $config);
}
/**
* Processes an array of configurations and returns a compiled version.
*
* @param array $configs An array of raw configurations
*
* @return array A normalized array
*/
private function process($configs)
{
$processor = new Processor();
return $processor->processConfiguration(new Configuration(), $configs);
}
}
@@ -0,0 +1,72 @@
<?php
namespace Flasher\Toastr\Symfony\Tests\DependencyInjection;
use Flasher\Prime\Tests\TestCase;
use Flasher\Symfony\DependencyInjection\FlasherExtension;
use Flasher\Symfony\FlasherSymfonyBundle;
use Flasher\Toastr\Symfony\DependencyInjection\FlasherToastrExtension;
use Flasher\Toastr\Symfony\FlasherToastrSymfonyBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class FlasherToastrExtensionTest extends TestCase
{
public function testContainerContainFlasherServices()
{
$container = $this->getRawContainer();
$container->loadFromExtension('flasher', array());
$container->loadFromExtension('flasher_toastr', array());
$container->compile();
$this->assertTrue($container->has('flasher.toastr'));
}
public function testCreateInstanceOfToastrAdapter()
{
$container = $this->getRawContainer();
$container->loadFromExtension('flasher');
$container->loadFromExtension('flasher_toastr');
$container->compile();
$flasher = $container->getDefinition('flasher');
$calls = $flasher->getMethodCalls();
$this->assertCount(2, $calls);
$this->assertEquals('addFactory', $calls[0][0]);
$this->assertEquals('template', $calls[0][1][0]);
$this->assertEquals('flasher.notification_factory', (string) $calls[0][1][1]);
$this->assertEquals('addFactory', $calls[1][0]);
$this->assertEquals('toastr', $calls[1][1][0]);
$this->assertEquals('flasher.toastr', (string) $calls[1][1][1]);
}
private function getRawContainer()
{
$container = new ContainerBuilder();
$container->registerExtension(new FlasherExtension());
$flasherBundle = new FlasherSymfonyBundle();
$flasherBundle->build($container);
$container->registerExtension(new FlasherToastrExtension());
$adapterBundle = new FlasherToastrSymfonyBundle();
$adapterBundle->build($container);
$container->getCompilerPassConfig()->setOptimizationPasses(array());
$container->getCompilerPassConfig()->setRemovingPasses(array());
$container->getCompilerPassConfig()->setAfterRemovingPasses(array());
return $container;
}
private function getContainer()
{
$container = $this->getRawContainer();
$container->loadFromExtension('flasher', array());
$container->loadFromExtension('flasher_toastr', array());
$container->compile();
return $container;
}
}
-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.
+27 -135
View File
@@ -1,164 +1,56 @@
{
"name": "php-flasher/php-flasher",
"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",
"name": "php-flasher/flasher-toastr-symfony",
"type": "symfony-bundle",
"description": "PHP Flasher Symfony adapter for Toastr",
"keywords": [
"php-flasher",
"flash-messages",
"notification-system",
"user-feedback",
"toastr",
"sweetalert",
"pnotify",
"noty",
"notyf",
"desktop-notifications",
"yoeunes",
"notify",
"php",
"laravel",
"symfony",
"javascript",
"yoeunes",
"framework-agnostic",
"phpstorm-auto-complete",
"custom-adapter",
"user-experience",
"rtl",
"dark-mode"
"Lumen",
"notifications",
"messages",
"alerts",
"pnotify",
"toastr ",
"bundle",
"flex"
],
"homepage": "https://php-flasher.github.io/",
"authors": [
{
"name": "Younes KHOUBZA",
"name": "Younes Khoubza",
"email": "younes.khoubza@gmail.com",
"homepage": "https://www.linkedin.com/in/younes-khoubza",
"homepage": "https://github.com/yoeunes",
"role": "Developer"
}
],
"license": "MIT",
"require": {
"php": ">=5.3"
"php": ">=5.3",
"php-flasher/flasher-symfony": "^0.5",
"php-flasher/flasher-toastr": "^0.5"
},
"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"
"phpunit/phpunit": "^4.8|^5.0|^6.0|^7.0|^8.0|^9.0"
},
"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",
"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/"
"Flasher\\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"
"exclude-from-classmap": [
"/Tests/"
]
},
"autoload-dev": {
"psr-4": {
"Flasher\\Tests\\": "tests/"
"Flasher\\Toastr\\Symfony\\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 {} \\;"
}
"minimum-stability": "dev",
"prefer-stable": true
}
+75
View File
@@ -0,0 +1,75 @@
{
"name": "php-flasher/flasher-toastr-symfony",
"type": "symfony-bundle",
"description": "PHP Flasher Symfony adapter for Toastr",
"keywords": [
"yoeunes",
"notify",
"php",
"laravel",
"symfony",
"Lumen",
"notifications",
"messages",
"alerts",
"pnotify",
"toastr ",
"bundle",
"flex"
],
"homepage": "https://php-flasher.github.io/",
"authors": [
{
"name": "Younes Khoubza",
"email": "younes.khoubza@gmail.com",
"homepage": "https://github.com/yoeunes",
"role": "Developer"
}
],
"license": "MIT",
"repositories": [
{
"type": "path",
"url": "../../Symfony",
"options": {
"symlink": true
}
},
{
"type": "path",
"url": "../Prime",
"options": {
"symlink": true
}
}
],
"require": {
"php": ">=5.3",
"php-flasher/flasher-symfony": "@dev",
"php-flasher/flasher-toastr": "@dev"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.0|^6.0|^7.0|^8.0|^9.0"
},
"autoload": {
"psr-4": {
"Flasher\\Toastr\\Symfony\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"autoload-dev": {
"psr-4": {
"Flasher\\Toastr\\Symfony\\Tests\\": "Tests/"
}
},
"config": {
"sort-packages": true,
"platform": {
"php": "5.3.10"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
-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>
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="true">
<testsuites>
<testsuite name="Flasher Test Suite">
<directory>Tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./</directory>
</whitelist>
</filter>
</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
}
}

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