Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/.idea
/vendor
.php_cs.cache
/composer.lock
/composer.lock.php-cs-fixer.cache
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ This plugin allows you to save products as favorite in OroCommerce

| | Version |
| :--- |:--------|
| PHP | 8.4 |
| OroCommerce | 6.1.* |
| PHP | 8.5 |
| OroCommerce | 7.0.* |

## Installation

Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"exclude-from-classmap": ["/Tests/"]
},
"require": {
"php": "~8.4.0",
"oro/commerce": "6.1.*"
"php": "~8.5.0",
"oro/commerce": "7.0.*"
},
"repositories": {
"oro": {
Expand All @@ -32,12 +32,11 @@
"prefer-stable": true,
"require-dev": {
"enlightn/security-checker": "^1.9",
"friendsofphp/php-cs-fixer": "~3.57.2",
"friendsofphp/php-cs-fixer": "^3.57",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpmd/phpmd": "~2.15.0",
"phpro/grumphp": "^1.5",
"phpspec/phpspec": "^7.2",
"phpstan/phpstan": "^1.5"
"phpro/grumphp": "^2.10.0",
"phpstan/phpstan": "^2.0"
},
"config": {
"sort-packages": true,
Expand Down
4 changes: 2 additions & 2 deletions ruleset/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
level: 4
reportUnmatchedIgnoredErrors: false
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
- identifier: phpDoc.parseError
bootstrapFiles:
- ../vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
use Oro\Bundle\SecurityBundle\Authentication\TokenAccessorInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Synolia\Bundle\FavoriteBundle\Handler\FavoriteButtonAjaxHandler;

#[Route('/ajax', options: ["expose"=>true])]

#[Route(options: ["expose"=>true])]
class FavoriteButtonAjaxController extends AbstractController
{
#[Route('/update/{id}', name: 'synolia_favorite_button_ajax_update', requirements: ['id' => '\d+'], methods: ['POST'])]
#[Route('/ajax/update/{id}', name: 'synolia_favorite_button_ajax_update', requirements: ['id' => '\d+'], methods: ['POST'])]
public function updateAction(
Product $product,
TokenAccessorInterface $tokenAccessor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Oro\Bundle\LayoutBundle\Attribute\Layout;
use Oro\Bundle\SecurityBundle\Attribute\Acl;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
use Synolia\Bundle\FavoriteBundle\Entity\Favorite;

class FavoriteController extends AbstractController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public function onBuildAfter(BuildAfter $event): void
return;
}

/** @var FavoriteRepository $repo */
$repo = $this->entityManager->getRepository(Favorite::class);
$user = $this->tokenAccessor->getUser();
$organization = $this->tokenAccessor->getOrganization();
$favProductIds = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use Oro\Bundle\DataGridBundle\Event\BuildBefore;
use Oro\Bundle\DataGridBundle\Extension\Formatter\Property\PropertyInterface;
use Oro\Bundle\OrganizationBundle\Entity\Organization;
use Oro\Bundle\SecurityBundle\Authentication\TokenAccessorInterface;
use Oro\Bundle\SearchBundle\Datagrid\Event\SearchResultAfter;
use Oro\Bundle\SecurityBundle\Authentication\TokenAccessorInterface;
use Oro\Bundle\SecurityBundle\ORM\Walker\AclHelper;
use Synolia\Bundle\FavoriteBundle\Entity\Favorite;
use Synolia\Bundle\FavoriteBundle\Entity\Repository\FavoriteRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AddSerializeDataColumn implements Migration
public function up(Schema $schema, QueryBag $queries): void
{
$table = $schema->getTable('synolia_favorite');
if($table->hasColumn('serialize_data')) {
if ($table->hasColumn('serialize_data')) {
return;
}
$table->addColumn('serialized_data', Types::JSON, ['notnull' => false]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
synolia_ajax_button_favorite:
resource: '@SynoliaFavoriteBundle/Controller/Frontend/FavoriteButtonAjaxController.php'
type: annotation
type: attribute
prefix: /favorite
options:
frontend: true

synolia_favorite_index:
resource: '@SynoliaFavoriteBundle/Controller/Frontend/FavoriteController.php'
type: annotation
type: attribute
prefix: /customer/favorite
options:
frontend: true
Loading