Skip to content

Commit c0ebb10

Browse files
authored
Merge pull request #1 from MateuszDyla/main
Init
2 parents 37aae15 + 6140a32 commit c0ebb10

6 files changed

Lines changed: 823 additions & 0 deletions

File tree

README.md

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,215 @@
11

2+
3+
# BitBag Coding Standard
4+
5+
----
6+
7+
8+
9+
10+
At BitBag we do believe in open source. However, we are able to do it just because of our awesome clients, who are kind enough to share some parts of our work with the community. Therefore, if you feel like there is a possibility for us to work together, feel free to reach out. You will find out more about our professional services, technologies, and contact details at [https://bitbag.io/](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_elasticsearch).
11+
12+
Like what we do? Want to join us? Check out our job listings on our [career page](https://bitbag.io/career/?utm_source=github&utm_medium=referral&utm_campaign=career). Not familiar with Symfony & Sylius yet, but still want to start with us? Join our [academy](https://bitbag.io/pl/akademia?utm_source=github&utm_medium=url&utm_campaign=akademia)!
13+
14+
## Table of Content
15+
16+
***
17+
18+
* [Overview](#overview)
19+
* [Support](#we-are-here-to-help)
20+
* [Installation without packagist](#installation-without-packagist)
21+
* [Usage](#usage)
22+
* [Customization](#customization)
23+
* [About us](#about-us)
24+
* [Community](#community)
25+
* [Demo](#demo-sylius-shop)
26+
* [License](#license)
27+
* [Contact](#contact)
28+
29+
# Overview
30+
31+
----
32+
[BitBag](https://bitbag.io/) coding standard helps you produce solid and maintainable code.
33+
At [BitBag Coding Bible](https://github.com/BitBagCommerce/BitBagBible) you can get familiar with standard we have
34+
implemented in our library. [ECS](https://github.com/symplify/easy-coding-standard)
35+
and [PHPStan](https://github.com/phpstan/phpstan) are responsible for keeping your code in order.
36+
37+
## We are here to help
38+
This **open-source library was developed to help the community**. If you have any additional questions, would like help with installing or configuring the plugin, or need any assistance with your project - let us know!
39+
40+
[![](https://bitbag.io/wp-content/uploads/2020/10/button-contact.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_elasticsearch)
41+
42+
43+
44+
# Installation without packagist
45+
46+
----
47+
48+
We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.
49+
50+
51+
Add repository and require-dev to your `composer.json`
52+
53+
```json
54+
"repositories": [
55+
{
56+
"type": "vcs",
57+
"url": "git@github.com:BitBagCommerce/coding-standard.git"
58+
}
59+
],
60+
"require-dev": {
61+
"bitbag/coding-standards": "dev-main",
62+
}
63+
64+
```
65+
66+
Install package with composer
67+
68+
```bash
69+
composer update
70+
```
71+
72+
73+
74+
Create `ecs.php` file with following lines or add import line to your existing file if you have one
75+
```php
76+
77+
<?php
78+
79+
declare(strict_types=1);
80+
81+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
82+
use Symplify\EasyCodingStandard\ValueObject\Option;
83+
84+
return static function (ContainerConfigurator $containerConfigurator): void {
85+
$containerConfigurator->import('vendor/bitbag/coding-standard/ecs.php');
86+
87+
$parameters = $containerConfigurator->parameters();
88+
$parameters->set(Option::PATHS, [
89+
__DIR__ . '/src',
90+
__DIR__ . '/tests',
91+
]);
92+
};
93+
94+
```
95+
96+
97+
## Usage
98+
99+
Just like with standard ECS, for example to check /src dir:
100+
```bash
101+
./vendor/bin/ecs check src
102+
```
103+
If ECS found any standard violations, you can fix it by:
104+
```bash
105+
./vendor/bin/ecs check src --fix
106+
```
107+
## Customization
108+
109+
#### ECS
110+
It's possible to extends `root/ecs.php` by your own fixers
111+
```php
112+
use Your\Place\For\Fixer\FooBarFixer;
113+
...
114+
return static function (ContainerConfigurator $containerConfigurator): void {
115+
$services = $containerConfigurator->services();
116+
$services->set(FooBarFixer::class);
117+
```
118+
119+
#### PHPStan
120+
You can set PHPStan rule level with following commands
121+
```bash
122+
./vendor/bin/phpstan analyze --configuration=vendor/bitbag/coding-standard/phpstan.neon src --level=8
123+
./vendor/bin/phpstan analyze --configuration=vendor/bitbag/coding-standard/phpstan.neon tests --level=5
124+
```
125+
126+
127+
# About us
128+
129+
---
130+
131+
BitBag is a company of people who **love what they do** and do it right. We fulfill the eCommerce technology stack with **Sylius**, Shopware, Akeneo, and Pimcore for PIM, eZ Platform for CMS, and VueStorefront for PWA. Our goal is to provide real digital transformation with an agile solution that scales with the **clients’ needs**. Our main area of expertise includes eCommerce consulting and development for B2C, B2B, and Multi-vendor Marketplaces.</br>
132+
We are advisers in the first place. We start each project with a diagnosis of problems, and an analysis of the needs and **goals** that the client wants to achieve.</br>
133+
We build **unforgettable**, consistent digital customer journeys on top of the **best technologies**. Based on a detailed analysis of the goals and needs of a given organization, we create dedicated systems and applications that let businesses grow.<br>
134+
Our team is fluent in **Polish, English, German and, French**. That is why our cooperation with clients from all over the world is smooth.
135+
136+
**Some numbers from BitBag regarding Sylius:**
137+
- 50+ **experts** including consultants, UI/UX designers, Sylius trained front-end and back-end developers,
138+
- 120+ projects **delivered** on top of Sylius,
139+
- 25+ **countries** of BitBag’s customers,
140+
- 4+ **years** in the Sylius ecosystem.
141+
142+
**Our services:**
143+
- Business audit/Consulting in the field of **strategy** development,
144+
- Data/shop **migration**,
145+
- Headless **eCommerce**,
146+
- Personalized **software** development,
147+
- **Project** maintenance and long term support,
148+
- Technical **support**.
149+
150+
**Key clients:** Mollie, Guave, P24, Folkstar, i-LUNCH, Elvi Project, WestCoast Gifts.
151+
152+
---
153+
154+
If you need some help with Sylius development, don't be hesitated to contact us directly. You can fill the form on [this site](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_elasticsearch) or send us an e-mail at hello@bitbag.io!
155+
156+
---
157+
158+
[![](https://bitbag.io/wp-content/uploads/2021/08/sylius-badges-transparent-wide.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_elasticsearch)
159+
160+
## Community
161+
162+
----
163+
164+
For online communication, we invite you to chat with us & other users on [Sylius Slack](https://sylius-devs.slack.com/).
165+
166+
# Demo Sylius Shop
167+
168+
---
169+
170+
We created a demo app with some useful use-cases of plugins!
171+
Visit [sylius-demo.bitbag.io](https://sylius-demo.bitbag.io/) to take a look at it. The admin can be accessed under
172+
[sylius-demo.bitbag.io/admin/login](https://sylius-demo.bitbag.io/admin/login) link and `bitbag: bitbag` credentials.
173+
Plugins that we have used in the demo:
174+
175+
| BitBag's Plugin | GitHub | Sylius' Store|
176+
| ------ | ------ | ------|
177+
| ACL Plugin | *Private. Available after the purchasing.*| https://plugins.sylius.com/plugin/access-control-layer-plugin/|
178+
| Braintree Plugin | https://github.com/BitBagCommerce/SyliusBraintreePlugin |https://plugins.sylius.com/plugin/braintree-plugin/|
179+
| CMS Plugin | https://github.com/BitBagCommerce/SyliusCmsPlugin | https://plugins.sylius.com/plugin/cmsplugin/|
180+
| Elasticsearch Plugin | https://github.com/BitBagCommerce/SyliusElasticsearchPlugin | https://plugins.sylius.com/plugin/2004/|
181+
| Mailchimp Plugin | https://github.com/BitBagCommerce/SyliusMailChimpPlugin | https://plugins.sylius.com/plugin/mailchimp/ |
182+
| Multisafepay Plugin | https://github.com/BitBagCommerce/SyliusMultiSafepayPlugin |
183+
| Wishlist Plugin | https://github.com/BitBagCommerce/SyliusWishlistPlugin | https://plugins.sylius.com/plugin/wishlist-plugin/|
184+
| **Sylius' Plugin** | **GitHub** | **Sylius' Store** |
185+
| Admin Order Creation Plugin | https://github.com/Sylius/AdminOrderCreationPlugin | https://plugins.sylius.com/plugin/admin-order-creation-plugin/ |
186+
| Invoicing Plugin | https://github.com/Sylius/InvoicingPlugin | https://plugins.sylius.com/plugin/invoicing-plugin/ |
187+
| Refund Plugin | https://github.com/Sylius/RefundPlugin | https://plugins.sylius.com/plugin/refund-plugin/ |
188+
189+
**If you need an overview of Sylius' capabilities, schedule a consultation with our expert.**
190+
191+
[![](https://bitbag.io/wp-content/uploads/2020/10/button_free_consulatation-1.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_elasticsearch)
192+
193+
## Additional resources for developers
194+
195+
---
196+
To learn more about our contribution workflow and more, we encourage you to use the following resources:
197+
* [Sylius Documentation](https://docs.sylius.com/en/latest/)
198+
* [Sylius Contribution Guide](https://docs.sylius.com/en/latest/contributing/)
199+
* [Sylius Online Course](https://sylius.com/online-course/)
200+
201+
202+
## License
203+
204+
---
205+
206+
This plugin's source code is completely free and released under the terms of the MIT license.
207+
208+
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen.)
209+
210+
## Contact
211+
212+
---
213+
If you want to contact us, the best way is to fill the form on [our website](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=coding-standard) or send us an e-mail to hello@bitbag.io with your question(s). We guarantee that we answer as soon as we can!
214+
215+
[![](https://bitbag.io/wp-content/uploads/2021/08/badges-bitbag.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=coding-standard)

composer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "bitbag/coding-standard",
3+
"keywords": ["bitbag", "coding-standard"],
4+
"description": "BitBag coding standard",
5+
"license": "MIT",
6+
"require": {
7+
"php": "^7.3 || ^7.4 || ^8.0"
8+
},
9+
"require-dev": {
10+
"phpstan/extension-installer": "^1.0",
11+
"phpstan/phpstan": "0.12.82",
12+
"phpstan/phpstan-doctrine": "0.12.33",
13+
"phpstan/phpstan-strict-rules": "^0.12.0",
14+
"phpstan/phpstan-webmozart-assert": "0.12.12",
15+
"symplify/easy-coding-standard": "^9.4",
16+
"friendsofphp/php-cs-fixer": "^3.0"
17+
},
18+
"autoload": {
19+
"psr-4": {
20+
"BitBag\\CodingStandard\\": "src/"
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)