-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OP-267/Sylius 1.12 and 1.13 support #27
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
877a733
Remove old config files
marekrzytki e7676a8
Update packages
marekrzytki 272b54a
Update changes:
marekrzytki 44f7c03
Fix tests
marekrzytki 245b001
Fix typo
marekrzytki 274cba2
Update coding standard packages version
marekrzytki 4c3092f
Upgrade PHP version to 8.2
marekrzytki c294c2f
PHP stan fix
marekrzytki 18c9900
Fix php version in CI
marekrzytki 64608ce
Remove conflicts from composer
marekrzytki 3a30353
Remove php stan package, update BitBag coding standard
marekrzytki 536b8cd
Php stan fixes
marekrzytki f62205c
Ecs fixes
marekrzytki d1a939b
Remove psalm package, change friendsofsymfony/oauth-server-bundle ver…
marekrzytki 946ccaf
Fix build typo
marekrzytki cfe2559
Add mailhog docker
marekrzytki c5855d0
Adjust behat tests to Sylius 1.13
marekrzytki db5761b
Coding standard fixes
marekrzytki ec11a89
Remove oauth symfony bundle
marekrzytki 728da89
Remove sensiolabs security checker package
marekrzytki 77033c7
Symfony upgrade configuration property
marekrzytki d8e146d
Add php stan ignore
marekrzytki 288b352
Symfony upgrade changes
marekrzytki cccbdfc
Replace incorrect class
marekrzytki 7e3aaa9
Increase js wait time in behat
marekrzytki 8561a72
Use getContainer method
marekrzytki 2e5f594
Add doctrine annotations package
marekrzytki 5aebc60
Add more php versions support
marekrzytki b12ee94
Add documentation about docker image
marekrzytki aee3fb1
Increase wait time in randomly failing behat scenario
marekrzytki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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 @@ | ||
version: '3.4' | ||
|
||
services: | ||
mailhog: | ||
# do not use in production! | ||
image: mailhog/mailhog:latest | ||
environment: | ||
- MH_STORAGE=maildir | ||
# volumes: | ||
# - ./docker/mailhog/maildir:/maildir:rw,delegated | ||
ports: | ||
- "8025:8025" # UI | ||
- "1025:1025" |
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 |
---|---|---|
@@ -1,20 +1,13 @@ | ||
<?php | ||
|
||
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
use Symplify\EasyCodingStandard\ValueObject\Option; | ||
declare(strict_types=1); | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
$containerConfigurator->import('vendor/bitbag/coding-standard/ecs.php'); | ||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
|
||
$parameters = $containerConfigurator->parameters(); | ||
$parameters->set(Option::PATHS, [ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
__DIR__ . '/spec', | ||
]); | ||
$parameters->set(Option::SKIP, [ | ||
__DIR__ . '/tests/Application', | ||
VisibilityRequiredFixer::class => ['*Spec.php'], | ||
]); | ||
return static function (ECSConfig $config): void { | ||
|
||
putenv('ALLOW_BITBAG_OS_HEADER=1'); | ||
|
||
$config->import('vendor/bitbag/coding-standard/ecs.php'); | ||
$config->paths(['src', 'spec', 'tests/Repository', 'tests/Behat']); | ||
}; |
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ Feature: Receiving confirmation email after finalizing checkout | |
|
||
@ui @email | ||
Scenario: Receiving a custom confirmation email after finalizing checkout | ||
Given there is mail template with "order_confirmation" type and "Order confirmation" name and "Congratulations, you have bought new gun" subject and "Pif paf </br> {{order.number}}" content | ||
Given there is mail template with "order_confirmation" type and "Order confirmation" name and "Congratulations, you have bought new gun" subject and "Pif paf {{order.number}}" content | ||
And I have product "Sig Sauer P226" in the cart | ||
And I have completed addressing step with email "[email protected]" and "United States" based billing address | ||
And I have proceeded order with "Free" shipping method and "Offline" payment | ||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ Feature: Receiving set of welcoming emails after registration | |
|
||
@ui @email | ||
Scenario: Receiving a custom welcoming email after registration | ||
Given there is mail template with "user_registration" type and "User registration" name and "Welcome to our shop!" subject and "Enjoy our stuff!" content | ||
Given there is mail template with "verification_token" type and "User registration" name and "Welcome to our shop!" subject and "Enjoy our stuff!" content | ||
When I register with email "[email protected]" and password "suitsarelife" | ||
Then a welcoming email should have been sent to "[email protected]" | ||
|
||
|
@@ -24,7 +24,7 @@ Feature: Receiving set of welcoming emails after registration | |
When I register with email "[email protected]" and password "suitsarelife" | ||
Then I should be notified that my account has been created and the verification email has been sent | ||
And a default account verification email should have been sent to "[email protected]" | ||
And 2 emails should be sent to "[email protected]" | ||
And emails should be sent to "[email protected]" depending on Sylius version | ||
But I should not be able to log in as "[email protected]" with "suitsarelife" password | ||
|
||
@ui @email | ||
|
@@ -33,5 +33,5 @@ Feature: Receiving set of welcoming emails after registration | |
When I register with email "[email protected]" and password "suitsarelife" | ||
Then I should be notified that my account has been created and the verification email has been sent | ||
And a custom account verification email should have been sent to "[email protected]" | ||
And 2 emails should be sent to "[email protected]" | ||
And emails should be sent to "[email protected]" depending on Sylius version | ||
But I should not be able to log in as "[email protected]" with "suitsarelife" password |
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
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 |
---|---|---|
@@ -1,17 +1,9 @@ | ||
includes: | ||
- vendor/bitbag/coding-standard/phpstan.neon | ||
parameters: | ||
level: 8 | ||
reportUnmatchedIgnoredErrors: false | ||
checkMissingIterableValueType: false | ||
checkGenericClassInNonGenericObjectType: false | ||
|
||
excludes_analyse: | ||
# Makes PHPStan crash | ||
- 'src/DependencyInjection/Configuration.php' | ||
|
||
# Test dependencies | ||
- 'tests/Application/*' | ||
|
||
# ECS Fixer dependency | ||
- 'src/Fixer' | ||
ignoreErrors: | ||
- '/Parameter #1 \$configuration of method Symfony\\Component\\DependencyInjection\\Extension\\Extension::processConfiguration\(\) expects Symfony\\Component\\Config\\Definition\\ConfigurationInterface, Symfony\\Component\\Config\\Definition\\ConfigurationInterface\|null given\./' | ||
excludePaths: | ||
- tests/Repository | ||
paths: | ||
- src | ||
- tests |
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
@@ -41,14 +42,14 @@ function it_is_initializable( | |
SenderAdapterInterface $senderAdapter, | ||
EmailProviderInterface $provider, | ||
DefaultSettingsProviderInterface $defaultSettingsProvider, | ||
EmailTemplateTranslationRepositoryInterface $templateTranslationRepository | ||
EmailTemplateTranslationRepositoryInterface $templateTranslationRepository, | ||
): void { | ||
$this->beConstructedWith( | ||
$rendererAdapter, | ||
$senderAdapter, | ||
$provider, | ||
$defaultSettingsProvider, | ||
$templateTranslationRepository | ||
$templateTranslationRepository, | ||
); | ||
$this->shouldHaveType(Sender::class); | ||
} | ||
|
@@ -60,7 +61,7 @@ function it_should_send_email( | |
DefaultSettingsProviderInterface $defaultSettingsProvider, | ||
EmailTemplateTranslationRepositoryInterface $templateTranslationRepository, | ||
EmailInterface $email, | ||
RenderedEmail $renderedEmail | ||
RenderedEmail $renderedEmail, | ||
): void { | ||
$this->beConstructedWith( | ||
$rendererAdapter, | ||
|
@@ -102,7 +103,7 @@ function it_should_set_custom_email_template_if_found( | |
DefaultSettingsProviderInterface $defaultSettingsProvider, | ||
EmailTemplateTranslationRepositoryInterface $templateTranslationRepository, | ||
EmailInterface $email, | ||
RenderedEmail $renderedEmail | ||
RenderedEmail $renderedEmail, | ||
): void { | ||
$this->beConstructedWith( | ||
$rendererAdapter, | ||
|
@@ -122,7 +123,7 @@ function it_should_set_custom_email_template_if_found( | |
$emailTemplateTranslation = new EmailTemplateTranslation(); | ||
$templateTranslationRepository->findOneByLocaleCodeAndType( | ||
self::LOCALE, | ||
self::EMAIL_TYPE | ||
self::EMAIL_TYPE, | ||
)->willReturn($emailTemplateTranslation); | ||
|
||
$rendererAdapter->render($email, Argument::type('array'))->willReturn($renderedEmail); | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would write in README.md or similar, how to test the e-mails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the
docker-compose -f DIR/docker-compose.mailhog.yaml up
command and the ports mapping information.