Compare commits

..

7 Commits

Author SHA1 Message Date
Khoubza Younes 91ba09fd39 fix: add more entries to FUNDING.yml 2022-12-25 20:25:25 +01:00
KHOUBZA Younes 5af384ecc2 update README 2022-11-06 12:33:41 +01:00
KHOUBZA Younes 351b9c5ac3 use PHPFlasher instead of PHP Flasher 2022-10-29 18:51:51 +01:00
KHOUBZA Younes 5bc76179ce update laravel and php packs readme 2022-09-25 17:40:54 +01:00
KHOUBZA Younes d3a6280f56 update github sponsor button 2022-07-31 16:13:01 +01:00
KHOUBZA Younes abbf475553 Prepare v1.0 release
rename template adapter to flasher, and add title to base notification class

Wip
2022-05-16 08:18:15 +01:00
Khoubza Younes 15f2b9a71e groups packages into packs 2022-03-09 09:21:16 +01:00
19 changed files with 68 additions and 370 deletions
-15
View File
@@ -1,15 +0,0 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
-13
View File
@@ -1,13 +0,0 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/.scrutinizer.yml export-ignore
/.styleci.yml export-ignore
/tests export-ignore
/.editorconfig export-ignore
-55
View File
@@ -1,55 +0,0 @@
# 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**!
+2 -3
View File
@@ -1,6 +1,5 @@
# These are supported funding model platforms
github: yoeunes
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
@@ -1,3 +0,0 @@
# Security Policy
If you discover any security related issues, please email younes.khoubza@gmail.com instead of using the issue tracker.
-7
View File
@@ -1,7 +0,0 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
+22
View File
@@ -0,0 +1,22 @@
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.
-5
View File
@@ -1,5 +0,0 @@
.idea
vendor
composer.lock
.phpunit.result.cache
.phpcs-cache
-3
View File
@@ -1,3 +0,0 @@
<?php
namespace PHPSTORM_META;
View File
-76
View File
@@ -1,76 +0,0 @@
# 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
@@ -1,47 +0,0 @@
<?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;
}
}
@@ -1,23 +0,0 @@
<?php
namespace Flasher\Toastr\Symfony\DependencyInjection;
use Flasher\Symfony\DependencyInjection\FlasherExtensionInterface;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
final class FlasherToastrExtension extends Extension implements FlasherExtensionInterface
{
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('config.php');
}
public function getConfigurationClass()
{
return new Configuration();
}
}
-21
View File
@@ -1,21 +0,0 @@
<?php
namespace Flasher\Toastr\Symfony;
use Flasher\Symfony\DependencyInjection\Compiler\ResourceCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Flasher\Symfony\Bridge\FlasherBundle;
use Flasher\Toastr\Symfony\DependencyInjection\FlasherToastrExtension;
class FlasherToastrSymfonyBundle extends FlasherBundle
{
protected function flasherBuild(ContainerBuilder $container)
{
$container->addCompilerPass(new ResourceCompilerPass($this->getFlasherContainerExtension()));
}
protected function getFlasherContainerExtension()
{
return new FlasherToastrExtension();
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 PHP Flasher
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
+30 -41
View File
@@ -1,13 +1,23 @@
<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">
: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.
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-logo-dark.svg">
<img width="600" src="https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-logo.svg" alt="PHPFlasher Logo">
</picture>
</p>
<p align="center">Flexible flash notifications system for PHP</p>
Flash messages are a great way to add some simple notifications to users of your website or application about important events that may have happened.
PHPFlasher gives a straightforward way to give feedback messages in the current or the next page to users with a flashing system.
The flashing system basically makes it possible to record a message and store it within the session so that it can be retrieved when needed.
## Official Documentation
Documentation for PHPFlasher can be found on the [PHPFlasher website](https://php-flasher.io).
<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">
@@ -24,54 +34,33 @@
<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>
# Why use PHP Flasher ?
# Why use PHPFlasher ?
The PHP Flasher project supports many notification libraries : __tailwindcss__, __bootstrap__, __toastr.js__, __sweet alert 2__, __pnotify__, __noty__, and __notyf__
The PHPFlasher project supports many notification libraries : [__toastr.js__](https://php-flasher.io/docs/adapter/toastr/), [__sweetalert 2__](https://php-flasher.io/docs/adapter/sweetalert/), [__pnotify__](https://php-flasher.io/docs/adapter/pnotify/), [__noty__](https://php-flasher.io/docs/adapter/noty/) and [__notyf__](https://php-flasher.io/docs/adapter/notyf/)
and its highly extendable so you can add your custom notifications.
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
> * Show various notifications simultaneously
> * Render notification easily from javascript with small footprint
> * LTR and Dark-mode support
> * Limit the amount of displayed notifications
> * Show Desktop notifications for Linux, macOS and Windows
> * Framework-agnostic with implementations for: Symfony and Laravel
> * Autocomplete for PHPSTORM
> * You can always create an adapter yourself
> * ...and more
## Official Documentation
Documentation for PHP Flasher can be found on the [PHP Flasher website](https://php-flasher.github.io/).
## Backers && Sponsors
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!
Thank you to all our backers and sponsors! 🙏
<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>
<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>
Documentation for PHPFlasher can be found on the [PHPFlasher website](https://php-flasher.io).
### Contact
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
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/flasher/issues)
@@ -82,6 +71,6 @@ on any of the following:
## License
PHP Flasher is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
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>
-21
View File
@@ -1,21 +0,0 @@
<?php
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Flasher\Symfony\Bridge\Bridge;
if (class_exists('Symfony\Component\DependencyInjection\ChildDefinition')) {
$definition = new ChildDefinition('flasher.notification_factory');
} else {
$definition = new DefinitionDecorator('flasher.notification_factory');
}
$definition
->setClass('Flasher\Toastr\Prime\ToastrFactory')
->addTag('flasher.factory', array('alias' => 'toastr'));
$container->setDefinition('flasher.toastr', $definition);
if (Bridge::canLoadAliases()) {
$container->setAlias('Flasher\Toastr\Prime\ToastrFactory', 'flasher.toastr');
}
View File
+13 -36
View File
@@ -1,45 +1,22 @@
{
"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/",
"name": "php-flasher/php-pack",
"description": "A pack for PHP",
"type": "flasher-pack",
"license": "MIT",
"authors": [
{
"name": "Younes Khoubza",
"name": "Younes KHOUBZA",
"email": "younes.khoubza@gmail.com",
"homepage": "https://github.com/yoeunes",
"homepage": "https://www.linkedin.com/in/younes-khoubza",
"role": "Developer"
}
],
"license": "MIT",
"require": {
"php": ">=5.3",
"php-flasher/flasher-symfony": "^0.6.1",
"php-flasher/flasher-toastr": "^0.6.1"
},
"autoload": {
"psr-4": {
"Flasher\\Toastr\\Symfony\\": ""
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
"php-flasher/flasher-cli": "*",
"php-flasher/flasher-noty": "*",
"php-flasher/flasher-notyf": "*",
"php-flasher/flasher-pnotify": "*",
"php-flasher/flasher-sweetalert": "*",
"php-flasher/flasher-toastr": "*"
}
}