Skip to content

Commit 557c793

Browse files
Merge pull request #13 from alma/develop
Release 2.0.0
2 parents b1fc4b9 + 64aec5c commit 557c793

Some content is hidden

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

60 files changed

+921
-55
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
4+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
### Reason for change
2+
3+
<!-- Describe here the reason for change, and provide a link to the corresponding ClickUp task or Sentry issue. -->
4+
5+
[ClickUp task](https://app.clickup.com/20427503/v/b/4-32476982-2/CLICKUP_ISSUE_ID)
6+
7+
### Code changes
8+
9+
<!-- Describe here the code changes at a high level. Anything that can help reviewers review your PR. -->
10+
11+
### How to test
12+
13+
_As a reviewer, you are encouraged to test the PR locally._
14+
15+
<!-- Describe here how to test your changes, if applicable. Insert UI screenshots when relevant -->
16+
17+
### Checklist for authors and reviewers
18+
19+
<!-- Move to the next section the non applicable items -->
20+
21+
- [ ] The title of the PR uses business wording, not technical jargon, for the changelog readers to understand it
22+
- [ ] The PR implements the changes asked in the referenced task / issue
23+
- [ ] The automated tests are compliant with the [testing strategy](https://www.notion.so/almapay/Backend-testing-strategy-06c642cec1bf47b9b8feca3a91ea8d4a)
24+
- [ ] The tests are relevant, and cover the corner/error cases, not only the happy path
25+
- [ ] You understand the impact of this PR on existing code/features
26+
- [ ] The changes include adequate logging and Datadog traces
27+
- [ ] Documentation is updated (API, developer documentation, ADR, Notion...)
28+
29+
### Non applicable
30+
31+
<!-- Move here non applicable items of the checklist, if any -->

.github/workflows/php.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [main,develop]
6+
pull_request:
7+
branches: [main,develop]
8+
workflow_dispatch: ~
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-20.04
13+
defaults:
14+
run:
15+
working-directory: .
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: 8.0
24+
25+
- name: Validate composer.json and composer.lock
26+
run: composer validate
27+
28+
- name: Install dependencies
29+
run: composer install --prefer-dist --no-progress --no-suggest
30+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/vendor/
22
/node_modules/
33
/composer.lock
4-
4+
.idea/*
55
/etc/build/*
66
!/etc/build/.gitignore
77

@@ -11,3 +11,4 @@
1111
/behat.yml
1212
/phpspec.yml
1313
/phpunit.xml
14+
/crowdin.yaml

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
v2.0.0
4+
------
5+
6+
- Fix: Compatibility Sylius 1.12
7+
- Feat: Add installment P10/12X
8+
- Feat: Display installment's plan in checkout page
9+
310
v1.3.0
411
------
512

README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src="https://getalma.eu/static/website/new/img/logo.png" alt="logo alma" />
2+
<img src="src/Resources/public/img/alma-logo.svg" alt="logo alma" height="75" style="margin-right:30px" />
33
<img src="https://demo.sylius.com/assets/shop/img/logo.png" height="75" />
44
</p>
55

@@ -10,26 +10,54 @@
1010
## Documentation
1111

1212
### Installation
13-
Use Composer to install the plugin:
13+
1. Use Composer to install the plugin:
1414

1515
```
1616
$ composer require alma/sylius-payment-plugin
1717
```
1818

19-
Update your shop's translation catalogs:
19+
2. Import routes:
20+
21+
```
22+
# config/routes/sylius_shop.yaml
23+
24+
sylius_alma:
25+
resource: "@AlmaSyliusPaymentPlugin/Resources/config/shop_routing.yaml"
26+
prefix: /{_locale}
27+
requirements:
28+
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$
29+
```
30+
31+
3. Override Sylius' templates:
32+
33+
```
34+
cp -R vendor/alma/sylius-payment-plugin/src/Resources/views/bundles/* templates/bundles/
35+
```
36+
37+
4. Export assets:
38+
39+
```
40+
bin/console sylius:install:asset
41+
```
42+
43+
5. Update your shop's translation catalogs:
2044

2145
```
2246
$ php bin/console translation:update --dump-messages fr AlmaSyliusPaymentPlugin
2347
$ php bin/console translation:update --dump-messages en AlmaSyliusPaymentPlugin
2448
```
2549

26-
Finally, clear your cache:
50+
6. Finally, clear your cache:
2751

2852
```
2953
$ php bin/console cache:clear
3054
```
3155

3256
### Requirements
57+
58+
- PHP version >= 7.3
59+
- Sylius version >= 1.9.0
60+
3361
Alma currently accepts Euros only; make sure you activate your payment method on channels that use that currency, else
3462
you won't see it at checkout.
3563

behat.yml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default:
66
extensions:
77
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
88

9-
Lakion\Behat\MinkDebugExtension:
9+
FriendsOfBehat\MinkDebugExtension:
1010
directory: etc/build
1111
clean_start: false
1212
screenshot: true

composer.json

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"description": "Payment plugin to integrate Alma installments and pay later payments with your Sylius shop",
1414
"license": "MIT",
1515
"require": {
16-
"php": ">=7.1",
17-
"alma/alma-php-client": "^1.11.1",
18-
"sylius/sylius": ">=1.6.9",
16+
"php": "~7.3 || ~7.4 || ~8.0 || ~8.1 || ~8.2",
17+
"alma/alma-php-client": ">=1.11.2",
18+
"sylius/sylius": ">=v1.9.0",
1919
"ext-json": "*"
2020
},
2121
"require-dev": {
@@ -30,23 +30,23 @@
3030
"friends-of-behat/suite-settings-extension": "^1.0",
3131
"friends-of-behat/symfony-extension": "^2.1",
3232
"friends-of-behat/variadic-extension": "^1.3",
33-
"friends-of-behat/mink-debug-extension": "^2.1.0",
34-
"phpspec/phpspec": "^6.1|^7.0",
33+
"friendsofsymfony/oauth-server-bundle": "^1.6 || >2.0.0-alpha.0 ^2.0@dev",
34+
"lakion/mink-debug-extension": "^2.0.0",
35+
"phpspec/phpspec": "^7.0",
3536
"phpstan/extension-installer": "^1.0",
36-
"phpstan/phpstan": "1.10.29",
37-
"phpstan/phpstan-doctrine": "^1.3.42",
38-
"phpstan/phpstan-strict-rules": "^1.5.1",
39-
"phpstan/phpstan-webmozart-assert": "^1.2.4",
40-
"phpunit/phpunit": "^8.5",
37+
"phpstan/phpstan": "0.12.88",
38+
"phpstan/phpstan-doctrine": "0.12.37",
39+
"phpstan/phpstan-strict-rules": "^0.12.0",
40+
"phpstan/phpstan-webmozart-assert": "0.12.12",
41+
"phpunit/phpunit": "^9.5",
4142
"sensiolabs/security-checker": "^6.0",
42-
"sylius-labs/coding-standard": "^4.3.1",
43-
"symfony/browser-kit": "^4.4",
44-
"symfony/debug-bundle": "^4.4|^5.0",
45-
"symfony/dotenv": "^4.4|^5.0",
46-
"symfony/intl": "^4.4|^5.0",
47-
"symfony/web-profiler-bundle": "^4.4|^5.0",
48-
"symfony/web-server-bundle": "^4.4|^5.0",
49-
"vimeo/psalm": "3.11.4"
43+
"sylius-labs/coding-standard": "^3.1",
44+
"symfony/browser-kit": "^4.4 || ^5.2",
45+
"symfony/debug-bundle": "^4.4 || ^5.2",
46+
"symfony/dotenv": "^4.4 || ^5.2",
47+
"symfony/intl": "^4.4 || ^5.2",
48+
"symfony/web-profiler-bundle": "^4.4 || ^5.2",
49+
"vimeo/psalm": "4.6.4"
5050
},
5151
"autoload": {
5252
"psr-4": {
@@ -62,12 +62,19 @@
6262
"Tests\\Alma\\SyliusPaymentPlugin\\": "tests/"
6363
}
6464
},
65+
"authors": [
66+
{
67+
"name": "Alma",
68+
"email": "[email protected]"
69+
}
70+
],
6571
"config": {
6672
"sort-packages": true,
6773
"allow-plugins": {
6874
"symfony/thanks": true,
6975
"dealerdirect/phpcodesniffer-composer-installer": true,
70-
"phpstan/extension-installer": true
76+
"phpstan/extension-installer": true,
77+
"symfony/flex": true
7178
}
7279
}
7380
}

crowdin.example.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"project_id" : "35"
2+
"api_token" : "MY_API_TOKEN"
3+
"base_path" : "src/"
4+
"base_url" : "https://mycompany.crowdin.com"
5+
"preserve_hierarchy": true
6+
7+
files:
8+
-
9+
source: Resources/translations/messages.en.yml
10+
translation: Resources/translations/messages.%two_letters_code%.yml
11+
-
12+
source: Resources/translations/flashes.en.yml
13+
translation: Resources/translations/flashes.%two_letters_code%.yml

phpstan.neon

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)