mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Merge branch '1.6'
* 1.6: Plugins technical requirement changes due to Sylius Store release Move tests requirements to "Should have" with an explanation Fix recommended tests name PR review fixes [Docs] Plugins technical review checklist [SyliusUserBundle] Improve output of PromoteUserCommand and DemoteUserCommand
This commit is contained in:
commit
6211c27833
5 changed files with 46 additions and 37 deletions
|
|
@ -22,6 +22,6 @@ Exemplary features may be: Social media buttons, newsletter, wishlists, payment
|
|||
|
||||
creating-plugin
|
||||
official-plugins
|
||||
approved-plugins
|
||||
sylius-store
|
||||
|
||||
.. include:: /book/plugins/map.rst.inc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
* :doc:`/book/plugins/index`
|
||||
* :doc:`/book/plugins/creating-plugin`
|
||||
* :doc:`/book/plugins/official-plugins`
|
||||
* :doc:`/book/plugins/approved-plugins`
|
||||
* :doc:`/book/plugins/sylius-store`
|
||||
|
|
|
|||
|
|
@ -1,45 +1,40 @@
|
|||
Plugins Approved by Sylius
|
||||
==========================
|
||||
Sylius Store
|
||||
============
|
||||
|
||||
As the Sylius eCommerce framework is an open source project it has an awesome community of users and developers.
|
||||
Therefore our ecosystem flourishes with plugins created outside of our organization. These plugins can become officially
|
||||
approved by us, when they meet certain requirements. Then, when accepted, they will land on the `official list of plugins
|
||||
on our website <https://sylius.com/plugins/>`_.
|
||||
As the Sylius is an open-source project, it has an awesome community of users and developers.
|
||||
Therefore our ecosystem flourishes with plugins created outside of our organization. These plugins can be listed in our
|
||||
`Sylius Store <https://sylius.com/plugins/>`_ or even become officially approved by us when they meet specific requirements.
|
||||
|
||||
When a plugin is approved by Sylius, you can recognize it also by this badge below in its readme file:
|
||||
How to have a Plugin listed on Sylius Store?
|
||||
--------------------------------------------
|
||||
|
||||
.. image:: ../../_images/approved_plugin.png
|
||||
:scale: 50%
|
||||
|
||||
|
|
||||
|
||||
How to have a Plugin approved by Sylius?
|
||||
----------------------------------------
|
||||
|
||||
Since Sylius is an open-source platform, there is a certain flow in order for the plugin to become officially adopted by the community.
|
||||
Since Sylius is an open-source platform, there is a precise flow for the plugin to become officially adopted by the community.
|
||||
|
||||
**1.** Develop the plugin using :doc:`the official Plugin Development guide </book/plugins/creating-plugin>`.
|
||||
|
||||
**2.** Remember about the tests and code quality! Check out :ref:`book_plugins_technical_requirements` for more details.
|
||||
|
||||
**3.** Send it to the project maintainers. It can be via email to any member of the Sylius Core team, or `the official Sylius Slack <http://sylius.com/slack>`_.
|
||||
**3.** Send it to the project maintainers. The preferred way is to use `plugin request submit form <https://store.sylius.com/submit>`_.
|
||||
|
||||
**4.** One of our Plugin Curators will contact you with the feedback regarding your plugin's code quality, test suite,
|
||||
and general feeling. They will also ask you to provide some changes in the code (if needed) to make this plugin approved.
|
||||
and general feeling. They will also ask you to provide some changes in the code (if needed) to make this plugin visible in the Sylius Store.
|
||||
|
||||
**5.** Wait for your Plugin to be featured in `the list of plugins <http://sylius.com/developers/store/plugins>`_ on the Sylius website.
|
||||
**5.** Wait for your Plugin to be featured in `the list of plugins <http://sylius.com/plugins/>`_ on the Sylius website.
|
||||
|
||||
.. _book_plugins_technical_requirements:
|
||||
|
||||
Technical requirements
|
||||
----------------------
|
||||
|
||||
Below you can find a list of requirements that your plugin needs to fulfill to be approved by Sylius Core Team. Try to follow
|
||||
them, and your plugin's approval process will be faster and more efficient!
|
||||
Below you can find a list of requirements that your plugin needs to fulfill to pass the Sylius Core Team review. Try to follow
|
||||
them and your plugin's approval process will be faster and more efficient!
|
||||
|
||||
Must have
|
||||
#########
|
||||
|
||||
Every plugin must fulfill these requirements to be listed on the Sylius Store. We're happy to accept new extensions to our platform,
|
||||
but it's also crucial for us to keep their high standards.
|
||||
|
||||
**Name of the plugin:**
|
||||
|
||||
* Does the name clearly say what kind of feature the plugin provides?
|
||||
|
|
@ -58,19 +53,22 @@ Must have
|
|||
* Is it possible to install the plugin on a fresh Sylius-Standard application with no problems?
|
||||
* Is every step needed for installation and configuration explained in the documentation? Are there any assumptions that could be confusing for less experienced developers?
|
||||
|
||||
**Tests:**
|
||||
|
||||
* Are there any unit tests for the plugin's classes? They can be written in PHPSpec, PHPUnit or any other working and reliable unit testing library
|
||||
* Does the unit tests cover at least the most crucial classes in the plugin (those which contain important business logic)?
|
||||
* Does the plugin contain some functional/acceptance tests (written in Behat/PHPUnit or similar tool)?
|
||||
* Are the core features of the plugin described and tests by them?
|
||||
|
||||
**Coding standards:**
|
||||
|
||||
* Does the code apply at least `PSR-1 <https://www.php-fig.org/psr/psr-1/>`_?
|
||||
|
||||
Could have
|
||||
##########
|
||||
Should have
|
||||
###########
|
||||
|
||||
If you want your plugin to be officially approved by Sylius Core Team, there are more things to do. Only plugins with the
|
||||
highest standards of code and properly developed test suite could get the "Approved by Sylius" mark, which makes them more
|
||||
visible in the community and ensures users about their quality.
|
||||
When Sylius approve a plugin, you can recognize it also by this badge below in its readme file:
|
||||
|
||||
.. image:: ../../_images/approved_plugin.png
|
||||
:scale: 30%
|
||||
|
||||
|
|
||||
|
||||
**Coding standards:**
|
||||
|
||||
|
|
@ -80,7 +78,10 @@ Could have
|
|||
|
||||
**Tests:**
|
||||
|
||||
* Do unit tests cover most of the application classes?
|
||||
* Are there any unit tests for the plugin's classes? They can be written in PHPSpec, PHPUnit or any other working and reliable unit testing library
|
||||
* Does the unit tests cover at least the most crucial classes in the plugin (those which contain important business logic)?
|
||||
* Does the plugin include some functional/acceptance tests (written in Behat/PHPUnit or similar tool)?
|
||||
* Are the core features of the plugin described and tests by them?
|
||||
* Do the functional/acceptance tests describe most of the application business-related features?
|
||||
|
||||
**Continuous integration:**
|
||||
|
|
@ -49,21 +49,25 @@ EOT
|
|||
protected function executeRoleCommand(InputInterface $input, OutputInterface $output, UserInterface $user, array $securityRoles): void
|
||||
{
|
||||
$error = false;
|
||||
$successMessages = [];
|
||||
|
||||
foreach ($securityRoles as $securityRole) {
|
||||
if (!$user->hasRole($securityRole)) {
|
||||
$output->writeln(sprintf('<error>User "%s" didn\'t have "%s" Security role.</error>', $user->getEmail(), $securityRole));
|
||||
$output->writeln(sprintf('<error>User "%s" doesn\'t have "%s" Security role.</error>', $user->getEmail(), $securityRole));
|
||||
$error = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$user->removeRole($securityRole);
|
||||
$output->writeln(sprintf('Security role <comment>%s</comment> has been removed from user <comment>%s</comment>', $securityRole, $user->getEmail()));
|
||||
$successMessages[] = sprintf('Security role <comment>%s</comment> has been removed from user <comment>%s</comment>', $securityRole, $user->getEmail());
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$output->writeln($successMessages);
|
||||
$this->getEntityManager($input->getOption('user-type'))->flush();
|
||||
} else {
|
||||
$output->writeln(sprintf('<error>No roles removed from User "%s".</error>', $user->getEmail()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,21 +49,25 @@ EOT
|
|||
protected function executeRoleCommand(InputInterface $input, OutputInterface $output, UserInterface $user, array $securityRoles): void
|
||||
{
|
||||
$error = false;
|
||||
$successMessages = [];
|
||||
|
||||
foreach ($securityRoles as $securityRole) {
|
||||
if ($user->hasRole($securityRole)) {
|
||||
$output->writeln(sprintf('<error>User "%s" did already have "%s" security role.</error>', $user->getEmail(), $securityRole));
|
||||
$output->writeln(sprintf('<error>User "%s" already has "%s" security role.</error>', $user->getEmail(), $securityRole));
|
||||
$error = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$user->addRole($securityRole);
|
||||
$output->writeln(sprintf('Security role <comment>%s</comment> has been added to user <comment>%s</comment>', $securityRole, $user->getEmail()));
|
||||
$successMessages[] = sprintf('Security role <comment>%s</comment> has been added to user <comment>%s</comment>', $securityRole, $user->getEmail());
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$output->writeln($successMessages);
|
||||
$this->getEntityManager($input->getOption('user-type'))->flush();
|
||||
} else {
|
||||
$output->writeln(sprintf('<error>No roles added to User "%s".</error>', $user->getEmail()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue