diff --git a/.github/workflows/upmerge_pr.yaml b/.github/workflows/upmerge_pr.yaml new file mode 100644 index 00000000..f7082033 --- /dev/null +++ b/.github/workflows/upmerge_pr.yaml @@ -0,0 +1,63 @@ +name: Upmerge PR + +on: + schedule: + - + cron: "0 2 * * *" + workflow_dispatch: ~ + +permissions: + contents: write + pull-requests: write + +jobs: + upmerge: + runs-on: ubuntu-latest + if: github.repository == 'Sylius/InvoicingPlugin' + name: "Upmerge PR" + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + include: + - + base_branch: "1.0" + target_branch: "2.0" + + steps: + - + uses: actions/checkout@v4 + with: + ref: ${{ matrix.target_branch }} + + - + name: Reset upmerge branch + run: | + git fetch origin ${{ matrix.base_branch }}:${{ matrix.base_branch }} + git reset --hard ${{ matrix.base_branch }} + + - + name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.SYLIUS_BOT_PAT }} + title: '[UPMERGE] ${{ matrix.base_branch }} -> ${{ matrix.target_branch }}' + body: | + This PR has been generated automatically. + For more details see [upmerge_pr.yaml](/Sylius/InvoicingPlugin/blob/1.0/.github/workflows/upmerge_pr.yaml). + + **Remember!** The upmerge should always be merged with using `Merge pull request` button. + + In case of conflicts, please resolve them manually with usign the following commands: + ``` + git fetch upstream + gh pr checkout + git merge upstream/${{ matrix.target_branch }} -m "Resolve conflicts between ${{ matrix.base_branch }} and ${{ matrix.target_branch }}" + ``` + + If you use other name for the upstream remote, please replace `upstream` with the name of your remote pointing to the `Sylius/InvoicingPlugin` repository. + + Once the conflicts are resolved, please run `git merge --continue` and push the changes to this PR. + branch: "upmerge/${{ matrix.base_branch }}_${{ matrix.target_branch }}" + delete-branch: true + base: ${{ matrix.target_branch }} diff --git a/tests/Application/config/routes/sylius_invoicing_plugin.yaml b/config/routes.yaml similarity index 54% rename from tests/Application/config/routes/sylius_invoicing_plugin.yaml rename to config/routes.yaml index 44b42e1c..fd8b5240 100644 --- a/tests/Application/config/routes/sylius_invoicing_plugin.yaml +++ b/config/routes.yaml @@ -1,9 +1,9 @@ sylius_invoicing_admin: - resource: "@SyliusInvoicingPlugin/config/admin_routes.yaml" + resource: "@SyliusInvoicingPlugin/config/routes/admin.yaml" prefix: /admin sylius_invoicing_shop: - resource: "@SyliusInvoicingPlugin/config/shop_routes.yaml" + resource: "@SyliusInvoicingPlugin/config/routes/shop.yaml" prefix: /{_locale} requirements: _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ diff --git a/config/admin_routes.yaml b/config/routes/admin.yaml similarity index 100% rename from config/admin_routes.yaml rename to config/routes/admin.yaml diff --git a/config/shop_routes.yaml b/config/routes/shop.yaml similarity index 100% rename from config/shop_routes.yaml rename to config/routes/shop.yaml diff --git a/docs/legacy_installation.md b/docs/legacy_installation.md index a71370d1..44171663 100644 --- a/docs/legacy_installation.md +++ b/docs/legacy_installation.md @@ -22,18 +22,11 @@ - { resource: '@SyliusInvoicingPlugin/config/config.yaml' } ``` -1. Import routing: +1. Import routes: ```yaml - sylius_invoicing_admin: - resource: '@SyliusInvoicingPlugin/config/admin_routes.yaml' - prefix: '/%sylius_admin.path_name%' - - sylius_invoicing_shop: - resource: '@SyliusInvoicingPlugin/config/shop_routes.yaml' - prefix: /{_locale} - requirements: - _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ + sylius_refund: + resource: "@SyliusInvoicingPlugin/config/routes.yaml" ``` 1. Check if you have `wkhtmltopdf` binary. If not, you can download it [here](https://wkhtmltopdf.org/downloads.html). diff --git a/src/SyliusInvoicingPlugin.php b/src/SyliusInvoicingPlugin.php index 603ab19e..63ff7b63 100644 --- a/src/SyliusInvoicingPlugin.php +++ b/src/SyliusInvoicingPlugin.php @@ -16,7 +16,6 @@ use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait; use Symfony\Component\HttpKernel\Bundle\Bundle; -/** @internal */ final class SyliusInvoicingPlugin extends Bundle { use SyliusPluginTrait; diff --git a/tests/Application/config/packages/sylius_invoicing.yaml b/tests/Application/config/packages/sylius_invoicing.yaml deleted file mode 100644 index 93b2ba94..00000000 --- a/tests/Application/config/packages/sylius_invoicing.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "@SyliusInvoicingPlugin/config/config.yaml" } diff --git a/tests/Application/config/routes.yaml b/tests/Application/config/routes.yaml index e69de29b..912e9ac3 100644 --- a/tests/Application/config/routes.yaml +++ b/tests/Application/config/routes.yaml @@ -0,0 +1,2 @@ +sylius_invoicing: + resource: "@SyliusInvoicingPlugin/config/routes.yaml"