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

[update] allow php version 8.3 #31

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: PHP Setup
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3

- name: Validate composer.json
run: composer validate --strict
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
dependencies: "highest" # Pimcore 11.*
- php-version: "8.2"
dependencies: "highest" # Pimcore 11.*
- php-version: "8.3"
dependencies: "highest" # Pimcore 11.*

steps:
- name: Git Checkout
Expand Down
6 changes: 3 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
database:
image: mariadb:10.11.4
image: mariadb:10.11.10
command: ["mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
Expand All @@ -16,11 +16,11 @@ services:
timeout: 10s

php:
image: pimcore/pimcore:php8.2-latest
image: pimcore/pimcore:php8.3-latest
volumes:
- ./:/var/www/html/
environment:
MYSQL_SERVER_VERSION: mariadb-10.11.4
MYSQL_SERVER_VERSION: 10.11.10-MariaDB
depends_on:
database:
condition: service_healthy
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"require": {
"php": "~8.1.0 || ~8.2.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"pimcore/pimcore": "^10.5 || ^11.0",
"symfony/config": "^5.3 || ^6.0",
"symfony/console": "^5.3 || ^6.0",
Expand All @@ -36,7 +36,7 @@
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-symfony": "^1.2",
"phpunit/phpunit": "^9.5",
"teamneusta/pimcore-testing-framework": "^0.11.0"
"teamneusta/pimcore-testing-framework": "^0.12.0"
},
"conflict": {
"presta/sitemap-bundle": "<3.1",
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ parameters:

bootstrapFiles:
- vendor/pimcore/pimcore/stubs/dynamic-constants.php

checkGenericClassInNonGenericObjectType: false
8 changes: 7 additions & 1 deletion src/Controller/PresentationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Neusta\Pimcore\PresentationBundle\Renderer\PresentationRenderer;
use Pimcore\Controller\FrontendController;
use Pimcore\Model\Document\PageSnippet;
use Symfony\Component\HttpFoundation\Response;

class PresentationController extends FrontendController
Expand All @@ -14,8 +15,13 @@ public function __construct(private readonly PresentationRenderer $presentationR

public function presentationAction(): Response
{
$slidesMarkup = '';
if ($this->document instanceof PageSnippet) {
$slidesMarkup = $this->presentationRenderer->renderPresentation($this->document);
}

return $this->render('@NeustaPimcorePresentation/Presentation/presentation.html.twig', [
'slidesMarkup' => $this->presentationRenderer->renderPresentation($this->document),
'slidesMarkup' => $slidesMarkup,
]);
}
}
2 changes: 1 addition & 1 deletion tests/Twig/PresentationExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function getThemeReturnsThemeOfParentDocumentIfAvailable(): void
self::assertSame('theme filename of parent document', $presentationExtension->getThemeFile($context));
}

private function createDocumentWithEditableMock(?Document\Editable $themeEditable, Document\PageSnippet $parent = null): Document\PageSnippet
private function createDocumentWithEditableMock(?Document\Editable $themeEditable, ?Document\PageSnippet $parent = null): Document\PageSnippet
{
$document = $this->prophesize(Document\PageSnippet::class);
$document
Expand Down
Loading