From 1d3535bbc09a6186fee6622fe1ef367b8f232536 Mon Sep 17 00:00:00 2001 From: Klaas Johan Kooistra Date: Fri, 31 Jul 2026 15:46:59 +0200 Subject: [PATCH] fix: Pimcore select option enums not analyzed Causing trait.unused errors when custom traits are configured. Added commented example path to phpstan.neon template. --- CHANGELOG.md | 4 ++++ templates/files/pimcore/phpstan.neon | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 199fba5..63482a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Added +- A commented Pimcore select option example path to phpstan.neon template, which can be enabled to avoid `trait.unused` errors. + ## [3.2.3] ### Fixed - Allow newer versions of GrumPHP to be installed. In version 3.0.3 of this library we had to restrict version 2.18 or diff --git a/templates/files/pimcore/phpstan.neon b/templates/files/pimcore/phpstan.neon index ba6cf88..9db7c3e 100644 --- a/templates/files/pimcore/phpstan.neon +++ b/templates/files/pimcore/phpstan.neon @@ -10,6 +10,9 @@ parameters: paths: - src + # Analyze select options in case they use traits + # - var/classes/DataObject/SelectOptions + # Uncomment when your project has unit tests: # - tests