-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[administration] init administration bundle (#3239)
- Loading branch information
0 parents
commit 3d64e9b
Showing
14 changed files
with
241 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: [push] | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
name: "Checks and tests" | ||
jobs: | ||
checks-and-tests: | ||
name: Run checks and tests | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Sleep for 15 seconds to ensure that split packages has been promoted to packagist.org | ||
run: sleep 15s | ||
shell: bash | ||
- name: GIT checkout branch - ${{ github.ref }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Install PHP, extensions and tools | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.3' | ||
extensions: bcmath, gd, intl, pdo_pgsql, redis, pgsql, zip | ||
tools: composer | ||
- name: Install Composer dependencies | ||
run: composer install --optimize-autoloader --no-interaction | ||
- name: Run PHPUnit | ||
run: php vendor/bin/phpunit tests | ||
- name: Run PHPStan level 5 | ||
run: php vendor/bin/phpstan analyze -c ./phpstan.neon ./src --level=5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/.php_cs.cache | ||
/vendor | ||
/composer.lock | ||
/.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Contributing | ||
|
||
Thank you for your contributions to Shopsys Platform Package. | ||
Together we are making Shopsys Platform better. | ||
|
||
This repository is READ-ONLY. | ||
If you want to [report issues](https://github.com/shopsys/shopsys/issues/new) and/or send [pull requests](https://github.com/shopsys/shopsys/compare), | ||
please use the main [Shopsys repository](https://github.com/shopsys/shopsys). | ||
|
||
Please, check our [Contribution Guide](https://github.com/shopsys/shopsys/blob/HEAD/CONTRIBUTING.md) before contributing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Shopsys Platform Development License | ||
version 2023-10-03 | ||
|
||
The software which includes this copyright notice and licensing agreement (“Agreement”) | ||
and associated documentation files (“Software”) is protected by copyright. | ||
The copyright holder is Shopsys s.r.o., a Czech company with Id. No. 27790487 (“Shopsys”). | ||
|
||
By this Agreement Shopsys grants to any person obtaining a copy of the Software (“Licensee”) | ||
a free of charge non-exclusive restricted license (“Development License”) to use the Software | ||
for the purpose of evaluation and testing of the Software (“Permitted Purpose”), subject to the following conditions: | ||
|
||
(1) Licensee shall not, and shall not allow any other person to, use the Software or any software | ||
created by derivation from the Software for (i) processing actual orders, or (ii) any other purposes | ||
except for the Permitted Purpose, in particular for any commercial use. If any instance of the Software | ||
or any software created by derivation from the Software used by the Licensee or its affiliates processes | ||
any order which results in a revenue for the Licensee or any of its affiliates the Development License shall | ||
terminate immediately. Any entity directly or indirectly controlling, controlled by, or under common control | ||
with the Licensee qualifies as a Licensee’s affiliate. | ||
|
||
(2) This Agreement governing the terms of the Development License and including the above copyright notice | ||
must be included in all copies or substantial portions of the Software, whether in its original or altered form. | ||
|
||
(3) 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 HOLDER 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. | ||
|
||
The Licensee is welcomed to apply with Shopsys for a commercial license allowing the Licensee to use the Software | ||
for other than Permitted Use and/or after the termination of the Development License. | ||
By using the Software the Licensee agrees to this Agreement. This Agreement and the terms of the Development License | ||
granted under this Agreement are governed by laws of the Czech Republic. This Agreement replaces any community, | ||
licensing or similar non-commercial license agreement entered into between Shopsys and the Licensee. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Shopsys Administration | ||
|
||
[![Downloads](https://img.shields.io/packagist/dt/shopsys/administration.svg)](https://packagist.org/packages/shopsys/administration) | ||
|
||
This bundle for [Shopsys Platform](https://www.shopsys.com) adds the administration interface. | ||
The bundle is dedicated for projects based on Shopsys Platform (i.e. created from [`shopsys/project-base`](https://github.com/shopsys/project-base)) exclusively. | ||
This repository is maintained by [shopsys/shopsys](https://github.com/shopsys/shopsys) monorepo. | ||
|
||
## Documentation | ||
|
||
[Documentation](https://docs.shopsys.com/en/latest/) can be found in Shopsys Platform Knowledge Base. | ||
|
||
## Installation | ||
|
||
The plugin is a Symfony bundle and is installed in the same way: | ||
|
||
### Download | ||
|
||
First, you download the package using [Composer](https://getcomposer.org/): | ||
|
||
``` | ||
composer require shopsys/administration | ||
``` | ||
|
||
## Contributing | ||
|
||
Thank you for your contributions to Shopsys Administration package. | ||
Together, we are making Shopsys Platform better. | ||
|
||
This repository is READ-ONLY. | ||
If you want to [report issues](https://github.com/shopsys/shopsys/issues/new) and/or send [pull requests](https://github.com/shopsys/shopsys/compare), | ||
please use the main [Shopsys repository](https://github.com/shopsys/shopsys). | ||
|
||
Please, check our [Contribution Guide](https://github.com/shopsys/shopsys/blob/HEAD/CONTRIBUTING.md) before contributing. | ||
|
||
## Support | ||
|
||
What to do when you are in troubles or need some help? | ||
The best way is to join our [Slack](https://join.slack.com/t/shopsysframework/shared_invite/zt-11wx9au4g-e5pXei73UJydHRQ7nVApAQ). | ||
|
||
If you want to [report issues](https://github.com/shopsys/shopsys/issues/new), please use the main [Shopsys repository](https://github.com/shopsys/shopsys). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "shopsys/administration", | ||
"type": "library", | ||
"description": "Administration interface for the Shopsys Platform", | ||
"keywords": ["Shopsys Platform", "SSFW", "admin", "administration", "admin panel"], | ||
"license": "proprietary", | ||
"authors": [ | ||
{ | ||
"name": "Shopsys", | ||
"homepage": "https://www.shopsys.com/" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Shopsys\\AdministrationBundle\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\AdministrationBundle\\": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"php": "^8.3", | ||
"shopsys/form-types-bundle": "15.0.x-dev", | ||
"shopsys/framework": "15.0.x-dev", | ||
"shopsys/migrations": "15.0.x-dev", | ||
"shopsys/plugin-interface": "15.0.x-dev", | ||
"symfony/config": "^5.4", | ||
"symfony/dependency-injection": "^5.4", | ||
"symfony/form": "^5.4", | ||
"symfony/http-foundation": "^5.4", | ||
"symfony/http-kernel": "^5.4", | ||
"symfony/routing": "^5.4", | ||
"symfony/translation": "^5.4", | ||
"twig/twig": "^3.5.0" | ||
}, | ||
"require-dev": { | ||
"phpstan/phpstan": "^1.6.8", | ||
"phpstan/phpstan-doctrine": "^1.3.4", | ||
"phpstan/phpstan-phpunit": "^1.1.1", | ||
"phpstan/phpstan-symfony": "^1.1.8", | ||
"phpunit/phpunit": "^9.5.20", | ||
"shopsys/coding-standards": "15.0.x-dev" | ||
}, | ||
"extra": { | ||
"symfony": { | ||
"require": "^5.4", | ||
"docker": false | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"symfony/flex": true, | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
parameters: | ||
treatPhpDocTypesAsCertain: false | ||
includes: | ||
- vendor/phpstan/phpstan-doctrine/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-symfony/extension.neon | ||
- vendor/phpstan/phpstan-symfony/rules.neon | ||
- vendor/shopsys/coding-standards/extension.neon |
Empty file.
35 changes: 35 additions & 0 deletions
35
src/DependencyInjection/ShopsysAdministrationExtension.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shopsys\AdministrationBundle\DependencyInjection; | ||
|
||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; | ||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
|
||
class ShopsysAdministrationExtension extends Extension implements PrependExtensionInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container): void | ||
{ | ||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); | ||
$loader->load('services.yaml'); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function prepend(ContainerBuilder $container): void | ||
{ | ||
$container->prependExtensionConfig('doctrine_migrations', [ | ||
'migrations_paths' => [ | ||
'Shopsys\AdministrationBundle\Migrations' => __DIR__ . '/../Migrations', | ||
], | ||
]); | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
services: | ||
_defaults: | ||
autoconfigure: true | ||
autowire: true | ||
public: false | ||
|
||
Shopsys\AdministrationBundle\: | ||
exclude: '../../{Command,Controller,DependencyInjection,Form,Migrations,Resources,Twig}' | ||
resource: '../../**/*{Enum,Facade,Factory,Repository,Transformer}.php' | ||
|
||
Shopsys\AdministrationBundle\Controller\: | ||
resource: '../../Controller/' | ||
tags: ['controller.service_arguments'] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shopsys\AdministrationBundle; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class ShopsysAdministrationBundle extends Bundle | ||
{ | ||
} |
Empty file.