Skip to content
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

Files list migration #14864

Merged
merged 54 commits into from Oct 10, 2019
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
cfb29e7
PRES-189 File list migration wip
RaimondasSapola Jul 23, 2019
72bc28b
PRES-189 File -> Attachment renaming, working js
RaimondasSapola Jul 24, 2019
7691463
Delete single row and dynamic delete confirmation message and refacto…
RaimondasSapola Jul 24, 2019
eaebc14
Bulk delete functionality, alert with dynamic messages added product …
RaimondasSapola Jul 25, 2019
fd14eee
CR fixes, added File size converter test
RaimondasSapola Jul 25, 2019
35e56d9
rebuilt attachment assets
RaimondasSapola Jul 25, 2019
ac80e81
File download action
RaimondasSapola Jul 25, 2019
094eb87
CR fixes
RaimondasSapola Jul 25, 2019
d2d0ff3
CR fixes
RaimondasSapola Jul 25, 2019
c8dad93
More CR fixes
RaimondasSapola Jul 25, 2019
deb2313
GetAttachmentPathHandler final class
RaimondasSapola Jul 26, 2019
48cda2e
Legacy links commented out
RaimondasSapola Jul 26, 2019
20aa3c5
CR fixes
RaimondasSapola Jul 26, 2019
4ac93af
Applied cs fix
RaimondasSapola Jul 26, 2019
fe7e838
CR fixes
RaimondasSapola Aug 6, 2019
fa7dba1
File size unit change CR
RaimondasSapola Aug 6, 2019
fae8f8a
Unit test updated
RaimondasSapola Aug 6, 2019
b4d89ba
php docblock fixes
RaimondasSapola Aug 6, 2019
2a21a6e
cs fix
RaimondasSapola Aug 6, 2019
eecaa39
removed annotations for unthrowen exceptions
RaimondasSapola Aug 6, 2019
ba07f5f
Error messages in controller
RaimondasSapola Aug 6, 2019
a8752a5
Translation fix ad added missing type hints
RaimondasSapola Aug 8, 2019
17e928e
service name fix
RaimondasSapola Aug 12, 2019
0941a7b
Minor CR fixes
RaimondasSapola Aug 16, 2019
b1e16a5
Removed unneeded dependencies
RaimondasSapola Aug 16, 2019
fb25a04
CR fixes regarding bulk delete action and file exists check
RaimondasSapola Aug 21, 2019
53a8429
CS fix
RaimondasSapola Aug 21, 2019
bf43bac
Changed logic in passing original exception parameter to getErrorMess…
RaimondasSapola Aug 23, 2019
e6436a3
code style
RaimondasSapola Aug 23, 2019
7fc0678
null is a possibile value fix
RaimondasSapola Aug 23, 2019
f0a9a83
PRES-189 File list migration wip
RaimondasSapola Jul 23, 2019
30dc818
PRES-189 File -> Attachment renaming, working js
RaimondasSapola Jul 24, 2019
525db35
Delete single row and dynamic delete confirmation message and refacto…
RaimondasSapola Jul 24, 2019
a22c897
Bulk delete functionality, alert with dynamic messages added product …
RaimondasSapola Jul 25, 2019
6e4f035
CR fixes, added File size converter test
RaimondasSapola Jul 25, 2019
74de930
File download action
RaimondasSapola Jul 25, 2019
e13e221
CR fixes
RaimondasSapola Jul 25, 2019
dc5bb33
More CR fixes
RaimondasSapola Jul 25, 2019
8a4e2e5
GetAttachmentPathHandler final class
RaimondasSapola Jul 26, 2019
63b9455
Legacy links commented out
RaimondasSapola Jul 26, 2019
3cd0315
CR fixes
RaimondasSapola Jul 26, 2019
16b9c81
Applied cs fix
RaimondasSapola Jul 26, 2019
833689e
CR fixes
RaimondasSapola Aug 6, 2019
a4ecf3b
php docblock fixes
RaimondasSapola Aug 6, 2019
99947d5
removed annotations for unthrowen exceptions
RaimondasSapola Aug 6, 2019
e75e413
Removed unneeded dependencies
RaimondasSapola Aug 16, 2019
8f48ea7
Missing CR fix added
RaimondasSapola Sep 2, 2019
000faf3
CR fixes
RaimondasSapola Sep 19, 2019
d1b880f
Catch all exceptions in controller
RaimondasSapola Sep 19, 2019
5875270
CS fixer issues fixed
RaimondasSapola Sep 19, 2019
5508800
null is a possibile value fix
RaimondasSapola Aug 23, 2019
b51b063
Catch all exceptions in controller
RaimondasSapola Sep 19, 2019
6bc5671
Missed conflict resolving error fix
RaimondasSapola Sep 23, 2019
9917dbf
rebuilt assets
RaimondasSapola Sep 23, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

CR fixes

  • Loading branch information
RaimondasSapola committed Jul 25, 2019
commit e13e221eece5401b6d14561a09e5285912f49022
@@ -28,13 +28,13 @@
use PrestaShop\PrestaShop\Adapter\Attachment\AbstractAttachmentHandler;
use PrestaShop\PrestaShop\Core\Domain\Attachment\Query\AttachmentPath;
use PrestaShop\PrestaShop\Core\Domain\Attachment\QueryHandler\AttachmentPathProviderInterface;
use PrestaShop\PrestaShop\Core\Domain\Attachment\QueryResult\DownloadableAttachment;
use PrestaShop\PrestaShop\Core\Domain\Attachment\QueryHandler\GetAttachmentPathHandlerInterface;
use PrestaShop\PrestaShop\Core\Domain\Attachment\QueryResult\Attachment;
/**
* Class AttachmentPathProvider provides path and original file name of attachment
*/
class AttachmentPathProvider extends AbstractAttachmentHandler implements AttachmentPathProviderInterface
class GetAttachmentPathHandler extends AbstractAttachmentHandler implements GetAttachmentPathHandlerInterface
{
/**
* {@inheritdoc}
@@ -43,7 +43,7 @@ public function handle(AttachmentPath $query)
{
$attachment = $this->getAttachment($query->getAttachmentId());
return new DownloadableAttachment(
return new Attachment(
_PS_DOWNLOAD_DIR_ . $attachment->file,
$attachment->file_name
);
@@ -27,17 +27,17 @@
namespace PrestaShop\PrestaShop\Core\Domain\Attachment\QueryHandler;
use PrestaShop\PrestaShop\Core\Domain\Attachment\Query\AttachmentPath;
use PrestaShop\PrestaShop\Core\Domain\Attachment\QueryResult\DownloadableAttachment;
use PrestaShop\PrestaShop\Core\Domain\Attachment\QueryResult\Attachment;
/**
* Defines contract for AttachmentPathProvider
*/
interface AttachmentPathProviderInterface
interface GetAttachmentPathHandlerInterface

This comment has been minimized.

Copy link
@rokaszygmantas

rokaszygmantas Jul 26, 2019

Contributor

since you are handling GetAttachment query, maybe the handler should be named GetAttachmentHandler as well, for consistency

{
/**
* @param AttachmentPath $query
*
* @return DownloadableAttachment
* @return Attachment
*/
public function handle(AttachmentPath $query);
public function handle(AttachmentPath $query): Attachment;
}
@@ -27,7 +27,7 @@
namespace PrestaShop\PrestaShop\Core\Domain\Attachment\QueryResult;
/**
* Stores attachment path and original name information.
* Class Attachment stores attachment path and original name information.
*/
class Attachment
{
@@ -44,6 +44,7 @@ class Attachment
/**
* @param string $path
* @param string $name
*
*/
public function __construct(string $path, string $name)
{

This file was deleted.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.