Skip to content

Commit

Permalink
Update with build-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Aug 6, 2024
1 parent d5c3a3b commit 57344d1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 34 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: CI

on:
push: ~
pull_request: ~

permissions: read-all

jobs:
ci:
uses: 'terminal42/contao-build-tools/.github/workflows/build-tools.yml@main'
21 changes: 16 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
"description": "Extension to list the supporters of Contao CMS",
"license": "MIT",
"require": {
"php": "^7.4 || ^8.0",
"contao/core-bundle":"^4.13 || ^5.0"
"php": "^8.1",
"contao/core-bundle":"^5.3",
"symfony/config": "^6 || ^7",
"symfony/dependency-injection": "^6 || ^7",
"symfony/http-client-contracts": "^6 || ^7",
"symfony/http-foundation": "^6 || ^7",
"symfony/http-kernel": "^6 || ^7"
},
"require-dev": {
"contao/manager-plugin": "^2.0"
"contao/manager-plugin": "^2.0",
"terminal42/contao-build-tools": "@dev"
},
"conflict": {
"contao/manager-plugin": "<2.0 || >=3.0"
Expand All @@ -21,7 +27,12 @@
"extra": {
"contao-manager-plugin": "ContaoAssociation\\SupporterFeedBundle\\ContaoManager\\Plugin"
},
"scripts": {
"cs-fixer": "tools/ecs/vendor/bin/ecs check src/ --fix --ansi"
"config": {
"allow-plugins": {
"contao-components/installer": false,
"contao/manager-plugin": false,
"php-http/discovery": false,
"terminal42/contao-build-tools": true
}
}
}
21 changes: 0 additions & 21 deletions ecs.php

This file was deleted.

11 changes: 3 additions & 8 deletions src/Controller/SupporterFeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,17 @@

use Contao\ContentModel;
use Contao\CoreBundle\Controller\ContentElement\AbstractContentElementController;
use Contao\CoreBundle\ServiceAnnotation\ContentElement;
use Contao\CoreBundle\DependencyInjection\Attribute\AsContentElement;
use Contao\Template;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
* @ContentElement(category="includes", renderer="esi")
*/
#[AsContentElement(category: 'includes', renderer: 'esi')]
class SupporterFeedController extends AbstractContentElementController
{
private HttpClientInterface $httpClient;

public function __construct(HttpClientInterface $httpClient)
public function __construct(private readonly HttpClientInterface $httpClient)
{
$this->httpClient = $httpClient;
}

protected function getResponse(Template $template, ContentModel $model, Request $request): Response
Expand Down

0 comments on commit 57344d1

Please sign in to comment.