Skip to content

Commit

Permalink
feat: shopware 6.6 compatibility (#67)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: tinect <[email protected]>
  • Loading branch information
stefanpoensgen and tinect authored Feb 8, 2024
1 parent 6d2d6c3 commit 981e6b3
Show file tree
Hide file tree
Showing 44 changed files with 233 additions and 449 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Code Style
on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
cs:
if: github.event_name != 'schedule'
uses: shopware/github-actions/.github/workflows/cs-fixer.yml@main
phpstan:
uses: shopware/github-actions/.github/workflows/phpstan.yml@main
with:
extensionName: FroshTools
shopwareVersion: v6.6.0.0-rc1
35 changes: 0 additions & 35 deletions .github/workflows/test.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ frosh-platform-mail-archive.js
/vendor/
/src/Resources/public/
/composer.lock
.php-cs-fixer.cache
68 changes: 0 additions & 68 deletions CHANGELOG_en-GB.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description

This plugins adds an MailArchive to your Shopware-Administration stored in Database.
This plugin adds an MailArchive to your Shopware-Administration stored in Database.

### Features

Expand Down
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frosh/mail-platform-archive",
"version": "2.0.6",
"version": "3.0.0",
"description": "Mail Archive",
"type": "shopware-platform-plugin",
"license": "MIT",
Expand Down Expand Up @@ -40,15 +40,12 @@
}
},
"require": {

Check warning on line 42 in composer.json

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Security advisories for Composer packages

\[EA\] Please add roave/security-advisories:dev-latest into require-dev as a firewall for vulnerable components.
"shopware/core": "~6.5.0",
"shopware/core": "~6.6.0",
"zbateson/mail-mime-parser": "^2.4"
},
"config": {
"allow-plugins": {
"symfony/runtime": true
}
},
"require-dev": {
"phpstan/phpstan": "^1.10"
}
}
6 changes: 0 additions & 6 deletions phpstan.neon

This file was deleted.

8 changes: 8 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
parameters:
level: max
paths:
- src
type_coverage:
return_type: 100
param_type: 98
property_type: 100
75 changes: 0 additions & 75 deletions src/Command/MigrateMailCommand.php

This file was deleted.

4 changes: 3 additions & 1 deletion src/Content/MailArchive/MailArchiveAttachmentDefinition.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Frosh\MailArchive\Content\MailArchive;

Expand Down
4 changes: 3 additions & 1 deletion src/Content/MailArchive/MailArchiveAttachmentEntity.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Frosh\MailArchive\Content\MailArchive;

Expand Down
18 changes: 0 additions & 18 deletions src/Content/MailArchive/MailArchiveCollection.php

This file was deleted.

5 changes: 3 additions & 2 deletions src/Content/MailArchive/MailArchiveDefinition.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Frosh\MailArchive\Content\MailArchive;

Expand Down Expand Up @@ -44,7 +46,6 @@ protected function defineFields(): FieldCollection
(new StringField('subject', 'subject'))->addFlags(new Required())->addFlags(new SearchRanking(SearchRanking::HIGH_SEARCH_RANKING)),

Check warning on line 46 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'Required'

Check warning on line 46 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'StringField'

Check warning on line 46 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'SearchRanking'

Check warning on line 46 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'SearchRanking'
(new LongTextField('plainText', 'plainText'))->addFlags(new AllowHtml()),

Check warning on line 47 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'LongTextField'

Check warning on line 47 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'AllowHtml'
(new LongTextField('htmlText', 'htmlText'))->addFlags(new AllowHtml(), new SearchRanking(SearchRanking::LOW_SEARCH_RANKING)),

Check warning on line 48 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'LongTextField'

Check warning on line 48 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'SearchRanking'

Check warning on line 48 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'SearchRanking'

Check warning on line 48 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'AllowHtml'
(new LongTextField('eml', 'eml'))->addFlags(new AllowHtml()),
(new StringField('eml_path', 'emlPath', 2048)),

Check warning on line 49 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'StringField'
(new StringField('transport_state', 'transportState'))->addFlags(new Required()),

Check warning on line 50 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'StringField'

Check warning on line 50 in src/Content/MailArchive/MailArchiveDefinition.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'Required'

Expand Down
44 changes: 18 additions & 26 deletions src/Content/MailArchive/MailArchiveEntity.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Frosh\MailArchive\Content\MailArchive;

Expand Down Expand Up @@ -26,11 +28,6 @@ class MailArchiveEntity extends Entity

protected ?string $transportState;

/**
* @deprecated will not be filled anyone. Use emlPath instead
*/
protected ?string $eml;

protected ?string $emlPath;

protected ?string $salesChannelId;
Expand All @@ -41,14 +38,19 @@ class MailArchiveEntity extends Entity

protected ?CustomerEntity $customer;

Check warning on line 39 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'CustomerEntity'

/** @var EntityCollection<MailArchiveAttachmentEntity>|null $attachments */
/**
* @var EntityCollection<MailArchiveAttachmentEntity>|null

Check warning on line 42 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'EntityCollection'
*/
protected ?EntityCollection $attachments = null;

Check warning on line 44 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'EntityCollection'

protected ?string $sourceMailId;

protected ?MailArchiveEntity $sourceMail;

protected ?MailArchiveCollection $sourceMails = null;
/**
* @var EntityCollection<MailArchiveEntity>|null

Check warning on line 51 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'EntityCollection'
*/
protected ?EntityCollection $sourceMails = null;

Check warning on line 53 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'EntityCollection'


/**
Expand Down Expand Up @@ -113,22 +115,6 @@ public function setHtmlText(?string $htmlText): void
$this->htmlText = $htmlText;
}

/**
* @deprecated Will not be filled anyone. Use emlPath instead
*/
public function getEml(): ?string
{
return $this->eml;
}

/**
* @deprecated should not be filled anyone. Save on disk and use emlPath instead
*/
public function setEml(?string $eml): void
{
$this->eml = $eml;
}

public function getEmlPath(): ?string
{
return $this->emlPath;
Expand Down Expand Up @@ -225,12 +211,18 @@ public function setTransportState(string $transportState): void
$this->transportState = $transportState;
}

public function getSourceMails(): ?MailArchiveCollection
/**
* @return EntityCollection<MailArchiveEntity>|null

Check warning on line 215 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'EntityCollection'
*/
public function getSourceMails(): ?EntityCollection

Check warning on line 217 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'EntityCollection'
{
return $this->sourceMails;
}

public function setSourceMails(MailArchiveCollection $sourceMails): void
/**
* @param EntityCollection<MailArchiveEntity> $sourceMails

Check warning on line 223 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'EntityCollection'
*/
public function setSourceMails(EntityCollection $sourceMails): void

Check warning on line 225 in src/Content/MailArchive/MailArchiveEntity.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'EntityCollection'
{
$this->sourceMails = $sourceMails;
}
Expand Down
Loading

0 comments on commit 981e6b3

Please sign in to comment.