Skip to content

Commit

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

Co-authored-by: Shyim <[email protected]>
Co-authored-by: tinect <[email protected]>
  • Loading branch information
3 people authored Jan 26, 2024
1 parent bee7c9f commit 17763c0
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 151 deletions.
3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

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
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
vendor
phpstan.neon
frosh-lazy-sizes.css
frosh-lazy-sizes.js
node_modules
/.idea
/.php-cs-fixer.cache
/composer.lock
src/Resources/app/storefront/dist/storefront/js/
src/Resources/public
src/Resources/app/storefront/node_modules/
3 changes: 3 additions & 0 deletions .shopware-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ build:
assets:
enable_es_build_for_admin: true
enable_es_build_for_storefront: true

changelog:
enabled: true
28 changes: 0 additions & 28 deletions CHANGELOG_en-GB.md

This file was deleted.

3 changes: 0 additions & 3 deletions bin/fix-cs.sh

This file was deleted.

13 changes: 0 additions & 13 deletions bin/static-analyze.sh

This file was deleted.

7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"thumbnail"
],
"description": "Automatically calculate the best thumbnail size. This means you don't have to worry about the \"sizes\" attribute for the images. Additionally, you gain a score.",
"version": "2.0.4",
"version": "2.0.5",
"type": "shopware-platform-plugin",
"license": "mit",
"authors": [
Expand All @@ -16,7 +16,7 @@
}
],
"require": {
"shopware/core": "~6.5.0"
"shopware/core": "~6.5.0||~6.6.0"
},
"extra": {
"shopware-plugin-class": "Frosh\\LazySizes\\FroshLazySizes",
Expand Down Expand Up @@ -47,5 +47,8 @@
"allow-plugins": {
"symfony/runtime": true
}
},
"scripts": {
"cs-fix": "docker run --rm -v $(pwd):$(pwd) -w $(pwd) oskarstark/php-cs-fixer-ga --rules @PER-CS2.0,@PER-CS2.0:risky --allow-risky=yes ."
}
}
16 changes: 7 additions & 9 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
parameters:
level: 7
reportUnmatchedIgnoredErrors: false
inferPrivatePropertyTypeFromConstructor: true
checkMissingIterableValueType: false
symfony:
constant_hassers: false

excludes_analyse:
- bin/phpstan-config-generator.php
level: 8
paths:
- src
type_coverage:
return_type: 100
param_type: 98
property_type: 100
59 changes: 0 additions & 59 deletions psalm.xml

This file was deleted.

7 changes: 0 additions & 7 deletions renovate.json

This file was deleted.

8 changes: 4 additions & 4 deletions src/FroshLazySizes.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Frosh\LazySizes;

use Shopware\Core\Framework\Plugin;

class FroshLazySizes extends Plugin
{
}
class FroshLazySizes extends Plugin {}
13 changes: 0 additions & 13 deletions src/Resources/app/storefront/package-lock.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/Resources/app/storefront/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "FroshLazySizes-storefront-packages",
"name": "frosh-lazy-sizes-storefront-packages",
"version": "1.0.0",
"private": true,
"dependencies": {
Expand Down
5 changes: 2 additions & 3 deletions src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="Frosh\LazySizes\Storefront\Framework\Twig\Extension\UrlEncodingTwigFilter" public="false">
<tag name="twig.extension"/>
</service>
<defaults autowire="true" autoconfigure="true" />
<prototype namespace="Frosh\LazySizes\" resource="../../" exclude="../../{FroshLazySizes.php}" />
</services>
</container>
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Frosh\LazySizes\Storefront\Framework\Twig\Extension;

use Shopware\Core\Content\Media\MediaEntity;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;

#[AutoconfigureTag('twig.extension')]
class UrlEncodingTwigFilter extends AbstractExtension
{
/**
Expand Down

0 comments on commit 17763c0

Please sign in to comment.