Skip to content
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
44 changes: 38 additions & 6 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
strategy:
matrix:
php:
- '8.1'
- '8.3'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand All @@ -32,7 +32,41 @@ jobs:

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr


rector:
name: Run rector
runs-on: "ubuntu-22.04"
strategy:
matrix:
php:
- '8.3'
steps:
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: 'pdo_sqlite, gd'
tools: cs2pr

- name: Add composer keys for private packagist
run: |
composer config http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN
composer config github-oauth.github.com $TRAVIS_GITHUB_TOKEN
env:
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }}

- uses: ramsey/composer-install@v3
with:
dependency-versions: highest

- name: Run rector
run: vendor/bin/rector process --dry-run --ansi

deptrac:
name: Deptrac
runs-on: ubuntu-latest
Expand All @@ -50,9 +84,7 @@ jobs:
fail-fast: false
matrix:
php:
- '7.4'
- '8.1'
- '8.2'
- '8.3'

steps:
- uses: actions/checkout@v2
Expand Down
27 changes: 15 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@
"name": "ibexa/twig-components",
"license": "(GPL-2.0-only or proprietary)",
"type": "ibexa-bundle",
"minimum-stability": "dev",
"prefer-stable": true,
"keywords": [
"ibexa-dxp"
],
"require": {
"php": "^7.4 || ^8.0",
"ibexa/core": "~4.6.x-dev",
"symfony/config": "^5.4",
"symfony/dependency-injection": "^5.4",
"symfony/event-dispatcher": "^5.4",
"php": ">=8.3",
"ibexa/core": "~5.0.x-dev",
"symfony/config": "^6.4",
"symfony/dependency-injection": "^6.4",
"symfony/event-dispatcher": "^6.4",
"symfony/event-dispatcher-contracts": "^2.2",
"symfony/http-foundation": "^5.4",
"symfony/http-kernel": "^5.4",
"symfony/yaml": "^5.4"
"symfony/http-foundation": "^6.4",
"symfony/http-kernel": "^6.4",
"symfony/yaml": "^6.4"
},
"require-dev": {
"ibexa/behat": "~4.6.x-dev",
"ibexa/behat": "~5.0.x-dev",
"ibexa/code-style": "~2.0.0",
"ibexa/doctrine-schema": "~4.6.x-dev",
"ibexa/phpstan": "~4.6.x-dev",
"ibexa/doctrine-schema": "~5.0.x-dev",
"ibexa/phpstan": "~5.0.x-dev",
"ibexa/rector": "~5.0.x-dev",
"matthiasnoback/symfony-config-test": "^4.3.0 || ^5.1",
"matthiasnoback/symfony-dependency-injection-test": "^4.3.1 || ^5.0",
"phpstan/phpstan": "^2.0",
Expand Down Expand Up @@ -59,7 +62,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "4.6.x-dev"
"dev-main": "5.0.x-dev"
}
},
"config": {
Expand Down
25 changes: 25 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

use Ibexa\Contracts\Rector\Sets\IbexaSetList;
use Rector\Config\RectorConfig;
use Rector\Symfony\Set\SymfonySetList;

return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withSets([
IbexaSetList::IBEXA_50->value,
SymfonySetList::SYMFONY_60,
SymfonySetList::SYMFONY_61,
SymfonySetList::SYMFONY_62,
SymfonySetList::SYMFONY_63,
SymfonySetList::SYMFONY_64,
]);
4 changes: 2 additions & 2 deletions src/bundle/Templating/Twig/ComponentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public function getFunctions(): array
return [
new TwigFunction(
'ibexa_twig_component_group',
[$this, 'renderComponentGroup'],
$this->renderComponentGroup(...),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just two cents, but at first glance this looks worse then previous syntax.

['is_safe' => ['html']]
),
new TwigFunction(
'ibexa_twig_component',
[$this, 'renderComponent'],
$this->renderComponent(...),
['is_safe' => ['html']]
),
];
Expand Down
Loading