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

Op 231 global fixes #14

Merged
merged 4 commits into from
Feb 23, 2024
Merged
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
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ jobs:
name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/

# -
# name: Run Psalm
# run: vendor/bin/psalm

-
name: Run PHPSpec
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/coding_standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Coding standard

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~

jobs:
tests:
runs-on: ubuntu-latest

name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"

strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1"]
symfony: ["5.4.*", "^6.0"]
sylius: ["^1.12.13"]
node: ["14.x"]
mysql: ["8.0"]

env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}"

steps:
-
uses: actions/checkout@v2
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
extensions: intl
tools: symfony
coverage: none
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: Restrict Sylius version
if: matrix.sylius != ''
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction

-
name: Install PHP dependencies
run: composer install --no-interaction

-
name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l 9 src/

- name: Run ECS
run: vendor/bin/ecs

- name: Failed build Slack notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }}
env:
SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_MESSAGE: ':x:'
SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}
1 change: 1 addition & 0 deletions config/routing/shop_routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bitbag_render_sulu_page:
_controller: bitbag.sylius_sulu_plugin.controller.action.render_page_action
_sylius:
permission: false

bitbag_render_sulu_sub_page:
path: /{locale}/page/{slug}/{second_slug}
methods: [GET]
Expand Down
1 change: 0 additions & 1 deletion config/services/strategy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>

<service class="BitBag\SyliusSuluPlugin\Renderer\Block\SuluBlockRendererStrategy"
id="bitbag.sylius_sulu_plugin.renderer.block.sulu_block_renderer_strategy"
>
Expand Down
1 change: 0 additions & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
VisibilityRequiredFixer::class => ['*Spec.php'],
]);
};

1 change: 0 additions & 1 deletion features/caching_sulu_request.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Feature: Caching sulu page request
And Sulu has defined page "blog_page_with_blocks_and_links" in locale "en_US"
And Cache for sulu not exists


@ui
Scenario: See the featured pages on homepage
When I visit this channel's homepage
Expand Down
68 changes: 0 additions & 68 deletions spec/ApiClient/SuluApiClientSpec.php

This file was deleted.

6 changes: 6 additions & 0 deletions src/ApiClient/SuluApiClient.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\ApiClient;
Expand Down
6 changes: 6 additions & 0 deletions src/ApiClient/SuluApiClientInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\ApiClient;
Expand Down
6 changes: 6 additions & 0 deletions src/BitBagSyliusSuluPlugin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin;
Expand Down
6 changes: 6 additions & 0 deletions src/Controller/Action/PurgeSuluCacheAction.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Controller\Action;
Expand Down
6 changes: 6 additions & 0 deletions src/Controller/Action/RenderPageAction.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Controller\Action;
Expand Down
6 changes: 6 additions & 0 deletions src/DependencyInjection/BitBagSyliusSuluExtension.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\DependencyInjection;
Expand Down
6 changes: 6 additions & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\DependencyInjection;
Expand Down
6 changes: 6 additions & 0 deletions src/Entity/ChannelInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Entity;
Expand Down
6 changes: 6 additions & 0 deletions src/Entity/SuluChannelConfigurationTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Entity;
Expand Down
6 changes: 6 additions & 0 deletions src/Form/Extension/ChannelTypeExtension.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Form\Extension;
Expand Down
6 changes: 6 additions & 0 deletions src/Renderer/Block/SuluBlockRenderStrategyInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Renderer\Block;
Expand Down
6 changes: 6 additions & 0 deletions src/Renderer/Block/SuluBlockRendererStrategy.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Renderer\Block;
Expand Down
6 changes: 6 additions & 0 deletions src/Renderer/Block/SuluBlockRendererStrategyInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Renderer\Block;
Expand Down
6 changes: 6 additions & 0 deletions src/Renderer/Page/SuluPageRenderStrategyInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Renderer\Page;
Expand Down
6 changes: 6 additions & 0 deletions src/Renderer/Page/SuluPageRendererStrategy.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Renderer\Page;
Expand Down
6 changes: 6 additions & 0 deletions src/Renderer/Page/SuluPageRendererStrategyInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?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
*/

declare(strict_types=1);

namespace BitBag\SyliusSuluPlugin\Renderer\Page;
Expand Down
Loading
Loading