Skip to content

Commit c588004

Browse files
committed
Initial commit
0 parents  commit c588004

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1620
-0
lines changed

.github/workflows/build.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build
2+
3+
on:
4+
push: ~
5+
pull_request: ~
6+
release:
7+
types: [created]
8+
workflow_dispatch: ~
9+
10+
jobs:
11+
tests:
12+
runs-on: ubuntu-latest
13+
14+
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
php: ["8.3"]
20+
symfony: ["^6.4", "^7.3"]
21+
22+
env:
23+
APP_ENV: test
24+
25+
steps:
26+
-
27+
uses: actions/checkout@v4
28+
29+
-
30+
name: Setup PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: "${{ matrix.php }}"
34+
extensions: intl
35+
tools: symfony
36+
coverage: none
37+
38+
-
39+
name: Get Composer cache directory
40+
id: composer-cache
41+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
42+
43+
-
44+
name: Cache Composer
45+
uses: actions/cache@v4
46+
with:
47+
path: ${{ steps.composer-cache.outputs.dir }}
48+
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
49+
restore-keys: |
50+
${{ runner.os }}-php-${{ matrix.php }}-composer-
51+
52+
-
53+
name: Restrict Symfony version
54+
if: matrix.symfony != ''
55+
run: |
56+
composer global config --no-plugins allow-plugins.symfony/flex true
57+
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
58+
composer config --no-plugins allow-plugins.symfony/thanks true
59+
composer config extra.symfony.require "${{ matrix.symfony }}"
60+
61+
-
62+
name: Install PHP dependencies
63+
run: composer install --no-interaction
64+
65+
-
66+
name: Run ECS
67+
run: vendor/bin/ecs check
68+
69+
-
70+
name: Validate composer.json
71+
run: composer validate --ansi --strict
72+
73+
-
74+
name: Run PHPStan
75+
run: vendor/bin/phpstan analyse
76+
77+
# -
78+
# name: Run PHPUnit
79+
# run: vendor/bin/phpunit --colors=always

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/vendor/
2+
/node_modules/
3+
/composer.lock
4+
/drivers/
5+
6+
/etc/build/*
7+
!/etc/build/.gitignore
8+
9+
/tests/Application/yarn.lock
10+
11+
/.phpunit.result.cache
12+
/behat.yml
13+
/phpspec.yml
14+
/phpunit.xml

LICENSE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Copyright © 2019-present Sylius Sp. z o.o. All rights reserved.
2+
3+
Sylius B2B Kit is the proprietary software of Sylius, licensed under the commercial license. Its use requires Sylius' consent.
4+
In any case you may not copy, decompile, sell or otherwise distribute or use this software without Sylius' explicit consent granted in the License Agreement.
5+
If you have not concluded the agreement with Sylius, granting you the license to use Sylius Plus please remove this software from your devices.

LICENSE_OF_TRADEMARK_AND_LOGO

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
Encourage widespread and fair use of Sylius logo and brand identity.
2+
3+
This Trademarks and Logos use policy (the “Policy”) is based on the Ubuntu
4+
and Symfony trademark policy and published under the CC-BY-SA license. You
5+
are welcome to base your own project trademark policies off it, just let
6+
others use your changes and give credit to the Ubuntu and Symfony projects
7+
as the original source!
8+
9+
Version n°1. Published on April 5th 2019.
10+
11+
The objective of the Policy is to encourage widespread use of the Sylius
12+
trademarks by the Sylius community while controlling that use in order to
13+
avoid confusion on the part of Sylius users and the general public, to
14+
maintain the value of the image and reputation of the trademarks and to
15+
protect them from inappropriate or unauthorised use.
16+
17+
The sections below describe what is allowed, what isn’t allowed, and cases
18+
in which you should ask permission.
19+
If you have any doubt, please contact us and a member of our legal
20+
representative will be in touch with you shortly.
21+
If you are aware a breach or misuse of the Sylius trademarks in any
22+
way, we would appreciate you bringing this to our attention. Please
23+
contact us so that we can investigate this further.
24+
25+
The Trademarks and Logos
26+
Sylius sp. z o.o. owns the verbal trademark containing
27+
in whole or part of the word “Sylius”.
28+
29+
Any verbal mark starting with the letters “Sylius” is sufficiently
30+
similar to one or more of the trademarks that permission will be
31+
needed in order to use it.
32+
33+
All verbal trademarks of Sylius sp. z o.o., all distinctive signs used in
34+
commerce by Sylius sp. z o.o. to designate his products or services related
35+
to Sylius are collectively referred to as the “Trademarks”.
36+
37+
Permitted use of the Trademarks
38+
Certain usages of the Trademarks are fine and no specific permission
39+
from us is needed.
40+
41+
Community advocacy. Sylius is built by its community. We share access to
42+
the Trademarks with the entire community for the purposes of discussion,
43+
development and advocacy. We recognise that most of the open source discussion
44+
and development areas are for non-commercial purposes and will allow the
45+
use of the Trademarks in this context, provided:
46+
47+
the Trademark is used in a manner consistent with this Policy;
48+
there is no commercial intent behind the use;
49+
what you are referring to is in fact Sylius. If someone is confused into
50+
thinking that what isn’t Sylius is, in fact, Sylius, you are probably doing
51+
something wrong;
52+
there is no suggestion (through words or appearance) that your project is
53+
approved, sponsored, or affiliated with Sylius, Sylius sp. z o.o. or its
54+
related projects unless it actually has been approved by and is accountable
55+
to Sylius sp. z o.o. and the Sylius Project.
56+
Building on Sylius or for Sylius. If you are producing new software which is
57+
intended for use with or on Sylius, you may use the Trademark in a way which
58+
indicates the intent of your product. For example, if you are developing a
59+
system management tool for Sylius, acceptable project titles would be
60+
“System Management for Sylius” or “Sylius Based Systems Management”. We would
61+
strongly discourage, and likely would consider to be problematic, a name such
62+
as SyliusMan, Sylius Management, etc. Furthermore, you may not use the
63+
Trademarks in a way which implies an endorsement where that doesn’t exist,
64+
or which attempts to unfairly or confusingly capitalise on the goodwill
65+
or brand of the project.
66+
67+
Commentary and parody. The Trademarks and Logos are designed to cover use of
68+
a mark to imply origin or endorsement by the project. When a user downloads
69+
something called Sylius, they should know it comes from the Sylius project.
70+
This helps Sylius build a reputation that will not be damaged by confusion
71+
around what is, and isn’t, Sylius. Using the Trademarks in your discussion,
72+
commentary, criticism or parody, in ways that unequivocally do not imply
73+
endorsement, is permissible. Anyone is free to write articles, create
74+
websites, blog about, or talk about Sylius — as long as it’s clear to
75+
everyone — including people completely unfamiliar with Sylius — that they
76+
are simply referring to Sylius and in no way speaking for the Sylius
77+
project and/or for Sylius sp. z o.o.
78+
79+
We reserve the right to review all usage within the open source community,
80+
and to object to any usage that appears to overstep the bounds of discussion
81+
and good-faith non-commercial development. In any event, once a project has
82+
left the open source project phase or otherwise become a commercial project,
83+
this Policy does not authorise any use of the Trademarks in connection to
84+
that project.
85+
86+
Restricted use that requires a trademark licence
87+
Permission from us is necessary to use any of the Trademarks under any
88+
circumstances other than those specifically permitted above.
89+
90+
These include but are not limited to:
91+
92+
Any commercial use including for any services related to Sylius such as
93+
providing training services, conference services, or design services (should
94+
you wish to provide such services, please contact us beforehand to explore
95+
Sylius Solution Partner Program);
96+
Use on or in relation to a software product that includes or is built on top
97+
of a product supplied by us, if there is any commercial intent associated
98+
with that product;
99+
Use in a domain name or URL;
100+
Use for merchandising purposes, e.g. on t-shirts and the like.
101+
If you wish to have permission for any of the uses above or for any other use
102+
which is not specifically referred to in this Policy, please contact us and
103+
we’ll let you know as soon as possible if your proposed use is permissible.
104+
Permission may only be granted subject to certain conditions and these may
105+
include the requirement that you enter into an agreement with us to maintain
106+
the quality of the product and/or service which you intend to supply at a
107+
prescribed level.
108+
109+
While there may be exceptions, it is very unlikely that we will approve
110+
Trademark use in the following cases:
111+
112+
Use of a Trademark in a company name;
113+
Use of a Trademark in a domain name which has a commercial intent. The
114+
commercial intent can range from promotion of a company or product, to
115+
collecting revenue generated by advertising;
116+
The calling of any software or product by the name Sylius (or another
117+
related Trademark);
118+
Use in combination with any other marks or logos. This include use of
119+
a Trademark in a manner that creates a “combined mark,” or use that
120+
integrates other wording with the Trademark in a way that the public may
121+
think of the use as a new mark (for example Club Sylius or SyliusBooks, or
122+
in a way that by use of special fonts or presentation with nearby words or
123+
images conveys an impression that the two are tied in some way);
124+
Use in combination with any product or service which is presented as being
125+
Certified or Official or formally associated with us or our products or
126+
services;
127+
Use in a way which implies an endorsement where that doesn’t exist, or which
128+
attempts to unfairly or confusingly capitalise on the goodwill or brand of
129+
the project;
130+
Use of a Trademark in a manner that disparages Sylius, or Sylius sp. z o.o.;
131+
or its products and is not clearly third-party parody;
132+
Use of a Trademark on or in relation to a software product which constitutes
133+
a substantially modified version of a product supplied by the Sylius project,
134+
that is to say with material changes to the code, or services relating to
135+
such a product; and
136+
Use of a Trademark in a title or metatag of a web page whose sole intention or
137+
result is to influence search engine rankings or result listings (for example
138+
use as keyword for advertising purposes), rather than for discussion,
139+
development or advocacy of the Trademarks.
140+
Logo usage guidelines
141+
Except otherwise agreed, any use of Logos shall be expressly authorized by
142+
writing by Sylius sp. z o.o.. To get any authorization to use any Logo,
143+
please contact us and a member of our team will be in touch with you shortly.
144+
145+
Our logos are presented in multiple colours and it is important that their
146+
visual integrity be maintained.
147+
148+
Therefore, when use of Logos is authorized, it is therefore preferable that
149+
the logos only be used in their standard form but if you should feel the need
150+
to alter them in any way you should keep the following guidelines in mind.
151+
152+
It should also be borne in mind that the more you wish to vary our logos
153+
from their standard form the smaller is the chance that we will be able to
154+
approve your proposed use.
155+
156+
If presented in multiple colours, the logo should only use the “official”
157+
logo colours.
158+
You may use transparency and gradient/depth tools but should retain the
159+
“official” colours.
160+
Any scaling must retain the original proportions of the logo.
161+
In case of non-compliance with Trademarks and Logos’ Use Policy or
162+
applicable law, any use of the Trademarks and/or Logos will be prohibited.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# GridImportExportBundle

composer.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "sylius/grid-import-export-bundle",
3+
"description": "tbd",
4+
"type": "symfony-bundle",
5+
"license": "proprietary",
6+
"authors": [
7+
],
8+
"autoload": {
9+
"psr-4": {
10+
"Sylius\\GridImportExport\\": "src/"
11+
}
12+
},
13+
"require": {
14+
"php": "^8.2",
15+
"doctrine/orm": "^2.18 || ^3.3",
16+
"league/csv": "^9.24",
17+
"sylius/grid-bundle": "^1.13",
18+
"sylius/resource-bundle": "^1.13",
19+
"sylius/ui-bundle": "^2.0",
20+
"symfony/dependency-injection": "^6.4 || ^7.3",
21+
"symfony/framework-bundle": "^6.4 || ^7.3",
22+
"symfony/messenger": "^6.4 || ^7.3",
23+
"symfony/ux-live-component": "^2.12",
24+
"symfony/uid": "^6.4 || ^7.3"
25+
},
26+
"require-dev": {
27+
"phpunit/phpunit": "^10.5",
28+
"webmozart/assert": "^1.11",
29+
"sylius-labs/coding-standard": "^4.4",
30+
"phpstan/phpstan": "^1.12",
31+
"phpstan/phpstan-doctrine": "^1.5"
32+
},
33+
"extra": {
34+
"symfony": {
35+
"require": "^7.3"
36+
},
37+
"branch-alias": {
38+
"dev-main": "1.0-dev"
39+
}
40+
},
41+
"config": {
42+
"allow-plugins": {
43+
"dealerdirect/phpcodesniffer-composer-installer": true
44+
}
45+
}
46+
}

config/routes.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
sylius_import_export.admin.resource.export:
2+
path: /export/{grid}
3+
methods: [POST]
4+
defaults:
5+
_controller: sylius_import_export.controller.export_action
6+
_sylius:
7+
filterable: true
8+
9+
sylius_grid_import_export_admin_process:
10+
resource: |
11+
alias: sylius_grid_import_export.process
12+
section: admin
13+
templates: "@SyliusAdmin\\shared\\crud"
14+
except: ['show', 'create', 'update']
15+
redirect: index
16+
grid: sylius_grid_import_export_admin_process
17+
permission: true
18+
vars:
19+
all:
20+
hook_prefix: 'sylius_b2b.admin.import_export.process'
21+
type: sylius.resource
22+
23+
sylius_grid_import_export_admin_process_show:
24+
path: /import-export/processes/{id}
25+
methods: [ GET ]
26+
defaults:
27+
_controller: sylius_grid_import_export.controller.process::showAction
28+
_sylius:
29+
section: admin
30+
template: '@SyliusAdmin/shared/crud/show.html.twig'
31+
permission: true
32+
vars:
33+
hook_prefix: 'sylius_b2b.admin.import_export.process'

config/sylius_grid.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sylius_grid:
2+
templates:
3+
action:
4+
export: '@SyliusB2BKitPlugin\admin\import_export\grid\action\export.html.twig'
5+

config/sylius_resource.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sylius_resource:
2+
resources:
3+
sylius_grid_import_export.process:
4+
driver: doctrine/orm
5+
classes:
6+
model: Sylius\GridImportExport\Entity\Process
7+
interface: Sylius\GridImportExport\Entity\ProcessInterface

ecs.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
6+
use Symplify\EasyCodingStandard\Config\ECSConfig;
7+
8+
9+
return function (ECSConfig $ecsConfig): void {
10+
$ecsConfig->paths([
11+
__DIR__ . '/src',
12+
]);
13+
14+
$ecsConfig->import('vendor/sylius-labs/coding-standard/ecs.php');
15+
16+
$ecsConfig->ruleWithConfiguration(HeaderCommentFixer::class, [
17+
'location' => 'after_open',
18+
'header' =>
19+
'This file is part of the Sylius package.
20+
21+
(c) Sylius Sp. z o.o.
22+
23+
For the full copyright and license information, please view the LICENSE
24+
file that was distributed with this source code.',
25+
]);
26+
};

0 commit comments

Comments
 (0)