From 9c28743744462f5829a8ed31a7a2439a9b96908a Mon Sep 17 00:00:00 2001 From: Ralf Lang Date: Mon, 2 Mar 2026 17:08:07 +0100 Subject: [PATCH 1/5] feat(cs-fixer): add custom fixers for PHP version comments and copyright years MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add custom PHP CS Fixer rules to enforce Horde coding standards: 1. RemovePhpVersionCommentFixer - Removes "PHP Version X" lines from file-level and class-level docblocks 2. UpdateCopyrightYearFixer - Updates copyright years dynamically to include current year (e.g., "2025" → "2025-2026", "2020-2024" → "2020-2026") Updated .php-cs-fixer.dist.php configuration: - Exclude lib/ directory (legacy PSR-0 code) - Only format src/ and test/ directories with PER-1 style - Register custom fixers - Update to @PHP84Migration from deprecated @PHP83Migration Applied fixes to 101 files in src/ and test/ directories: - Removed all "PHP Version 7" comment lines - Updated copyright years to 2026 - Applied PER-1 coding style consistently All tests pass. No syntax errors introduced. --- .php-cs-fixer.dist.php | 21 ++- src/Component.php | 4 +- src/Component/Archive.php | 4 +- src/Component/Base.php | 4 +- src/Component/Dependency.php | 4 +- src/Component/DependencyList.php | 4 +- src/Component/Factory.php | 2 +- src/Component/Identify.php | 4 +- src/Component/Matcher.php | 4 +- src/Component/Remote.php | 4 +- src/Component/Resolver.php | 4 +- src/Component/Source.php | 2 +- src/Component/Task/Dependencies.php | 2 +- src/Component/Task/SystemCall.php | 2 +- src/Component/Task/SystemCallResult.php | 2 +- src/Components.php | 4 +- src/Config/Application.php | 4 +- src/Config/Base.php | 4 +- src/Config/Bootstrap.php | 4 +- src/Config/CliConfig.php | 4 +- src/Config/File.php | 4 +- src/Configs.php | 4 +- src/Constants.php | 4 +- src/Dependencies.php | 4 +- src/Dependencies/Injector.php | 4 +- src/Exception.php | 4 +- src/Exception/Pear.php | 4 +- src/Helper/ChangeLog.php | 2 +- src/Helper/Commit.php | 4 +- src/Helper/Composer.php | 2 +- src/Helper/Dependencies.php | 4 +- src/Helper/DocsOrigin.php | 4 +- src/Helper/Git.php | 4 +- src/Helper/Installer.php | 4 +- src/Helper/Root.php | 4 +- src/Helper/Template.php | 4 +- src/Helper/Templates.php | 4 +- src/Helper/Templates/Directory.php | 4 +- src/Helper/Templates/RecursiveDirectory.php | 4 +- src/Helper/Templates/Single.php | 4 +- src/Helper/Version.php | 2 +- src/Helper/Website.php | 2 +- src/Output.php | 2 - src/Pear/Environment.php | 4 +- src/Pear/Factory.php | 4 +- src/Pear/Package.php | 4 +- src/PhpCsFixer/README.md | 165 ++++++++++++++++++ .../RemovePhpVersionCommentFixer.php | 129 ++++++++++++++ src/PhpCsFixer/UpdateCopyrightYearFixer.php | 132 ++++++++++++++ src/Qc/Task/Base.php | 2 - src/Qc/Task/Cs.php | 4 +- src/Qc/Task/Gitignore.php | 2 - src/Qc/Task/Lint.php | 4 +- src/Qc/Task/Loc.php | 2 +- src/Qc/Task/Md.php | 4 +- src/Qc/Task/Unit.php | 2 - src/Qc/Tasks.php | 4 +- src/Release/Notes.php | 2 +- src/Release/Task/Announce.php | 4 +- src/Release/Task/Base.php | 4 +- src/Release/Task/Bugs.php | 2 +- src/Release/Task/Changelog.php | 2 +- src/Release/Task/CommitPostRelease.php | 4 +- src/Release/Task/CommitPreRelease.php | 4 +- src/Release/Task/Composer.php | 2 +- src/Release/Task/CurrentSentinel.php | 4 +- src/Release/Task/GitBranch.php | 2 +- src/Release/Task/GitPush.php | 2 +- src/Release/Task/NextVersion.php | 4 +- src/Release/Task/Package.php | 4 +- src/Release/Task/Packagist.php | 2 +- src/Release/Task/Satis.php | 2 +- src/Release/Task/Sentinel.php | 4 +- src/Release/Task/TagRelease.php | 4 +- src/Release/Task/Timestamp.php | 4 +- src/Release/Task/Unit.php | 2 +- src/Release/Task/Website.php | 2 +- src/Release/Tasks.php | 4 +- src/TaskInterface.php | 4 +- src/Wrapper.php | 2 +- src/Wrapper/ApplicationPhp.php | 2 +- src/Wrapper/ChangelogYml.php | 2 +- src/Wrapper/Changes.php | 2 +- src/Wrapper/ComposerJson.php | 2 +- src/Wrapper/HordeYml.php | 2 +- src/Wrapper/PackageXml.php | 2 +- src/WrapperTrait.php | 2 +- test/Autoload.php | 4 +- test/TestCase.php | 4 +- .../Component/DependencyListTest.php | 4 +- .../Components/Component/DependencyTest.php | 2 +- .../Components/Component/IdentifyTest.php | 4 +- .../Components/Component/ResolverTest.php | 4 +- .../Unit/Components/Helper/DocsOriginTest.php | 4 +- test/Unit/Components/Helper/RootTest.php | 4 +- test/Unit/Components/Helper/TemplatesTest.php | 4 +- .../Helper/VersionDescriptionTest.php | 4 +- .../Helper/VersionStabilityTest.php | 4 +- test/Unit/Components/Helper/VersionTest.php | 4 +- .../Components/Release/Task/ChangelogTest.php | 2 +- .../Release/Task/CurrentSentinelTest.php | 4 +- .../Release/Task/NextVersionTest.php | 2 +- .../Components/Release/Task/PackageTest.php | 4 +- .../Components/Release/Task/TimestampTest.php | 4 +- .../Components/Wrapper/ChangelogYmlTest.php | 2 +- test/fixtures/simple/composer.json | 5 - 106 files changed, 541 insertions(+), 243 deletions(-) create mode 100644 src/PhpCsFixer/README.md create mode 100644 src/PhpCsFixer/RemovePhpVersionCommentFixer.php create mode 100644 src/PhpCsFixer/UpdateCopyrightYearFixer.php diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index a50369bc..c6b2a91b 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,6 +1,11 @@ exclude(['fixtures']); -return (new PhpCsFixer\Config()) +$config = (new PhpCsFixer\Config()) ->setRules([ '@PER-CS' => true, - '@PHP83Migration' => true, + '@PHP84Migration' => true, 'php_unit_test_class_requires_covers' => true, 'nullable_type_declaration_for_default_null_value' => true, + 'Horde/remove_php_version_comment' => true, + 'Horde/update_copyright_year' => true, ]) ->setFinder($finder) ; + +// Register custom fixers +$config->registerCustomFixers([ + new \Horde\Components\PhpCsFixer\RemovePhpVersionCommentFixer(), + new \Horde\Components\PhpCsFixer\UpdateCopyrightYearFixer(), +]); + +return $config; diff --git a/src/Component.php b/src/Component.php index e590ad5e..f7014208 100644 --- a/src/Component.php +++ b/src/Component.php @@ -3,8 +3,6 @@ /** * Represents a component. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -22,7 +20,7 @@ /** * Represents a component. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/Archive.php b/src/Component/Archive.php index 1c8b4ec9..e0bed5a2 100644 --- a/src/Component/Archive.php +++ b/src/Component/Archive.php @@ -3,8 +3,6 @@ /** * Represents a component archive. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -22,7 +20,7 @@ /** * Represents a component archive. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/Base.php b/src/Component/Base.php index e4102a84..febfcbb7 100644 --- a/src/Component/Base.php +++ b/src/Component/Base.php @@ -3,8 +3,6 @@ /** * Represents base functionality for a component. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -32,7 +30,7 @@ /** * Represents base functionality for a component. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/Dependency.php b/src/Component/Dependency.php index b3e130ec..a4c99f6a 100644 --- a/src/Component/Dependency.php +++ b/src/Component/Dependency.php @@ -3,8 +3,6 @@ /** * Horde\Components\Component\Dependency:: wraps PEAR dependency information. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -18,7 +16,7 @@ /** * Horde\Components\Component\Dependency:: wraps PEAR dependency information. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/DependencyList.php b/src/Component/DependencyList.php index d3f5ec32..73556bff 100644 --- a/src/Component/DependencyList.php +++ b/src/Component/DependencyList.php @@ -3,8 +3,6 @@ /** * Horde\Components\Component\Dependencies:: provides dependency handling mechanisms. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -19,7 +17,7 @@ /** * Horde\Components\Component\Dependencies:: provides dependency handling mechanisms. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/Factory.php b/src/Component/Factory.php index b69ec256..5ff5f004 100644 --- a/src/Component/Factory.php +++ b/src/Component/Factory.php @@ -1,7 +1,7 @@ @@ -23,7 +21,7 @@ * Identifies the requested component based on an argument and delivers a * corresponding component instance. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/Matcher.php b/src/Component/Matcher.php index 9a463320..6952c510 100644 --- a/src/Component/Matcher.php +++ b/src/Component/Matcher.php @@ -3,8 +3,6 @@ /** * Match an expression against a component. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -16,7 +14,7 @@ /** * Match an expression against a component. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/Remote.php b/src/Component/Remote.php index 67f8aa21..c1a0b019 100644 --- a/src/Component/Remote.php +++ b/src/Component/Remote.php @@ -3,8 +3,6 @@ /** * Represents a remote component. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -21,7 +19,7 @@ /** * Represents a remote component. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/Resolver.php b/src/Component/Resolver.php index 107d309c..ed4d59ac 100644 --- a/src/Component/Resolver.php +++ b/src/Component/Resolver.php @@ -4,8 +4,6 @@ * Horde\Components\Component\Resolver:: resolves component names and dependencies * into component representations. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -22,7 +20,7 @@ * Horde\Components\Component\Resolver:: resolves component names and dependencies * into component representations. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Component/Source.php b/src/Component/Source.php index fa197acd..755a6e91 100644 --- a/src/Component/Source.php +++ b/src/Component/Source.php @@ -1,7 +1,7 @@ @@ -53,7 +51,7 @@ * The Components:: class is the entry point for the various component actions * provided by the package. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Config/Application.php b/src/Config/Application.php index 02b8971e..d2fa90a5 100644 --- a/src/Config/Application.php +++ b/src/Config/Application.php @@ -5,8 +5,6 @@ * specific configuration values by combining defaults and options provided at * runtime. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -23,7 +21,7 @@ * specific configuration values by combining defaults and options provided at * runtime. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Config/Base.php b/src/Config/Base.php index f70ec5c2..75983fc2 100644 --- a/src/Config/Base.php +++ b/src/Config/Base.php @@ -4,8 +4,6 @@ * Base:: provides common utilities for the configuration * handlers. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -22,7 +20,7 @@ * Base:: provides common utilities for the configuration * handlers. * - * Copyright 2009-2024 Horde LLC (http://www.horde.org/) + * Copyright 2009-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Config/Bootstrap.php b/src/Config/Bootstrap.php index 7f37adf0..9e54fa9d 100644 --- a/src/Config/Bootstrap.php +++ b/src/Config/Bootstrap.php @@ -4,8 +4,6 @@ * Bootstrap:: class provides simple options for the bootstrap * process. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -20,7 +18,7 @@ * Bootstrap:: class provides simple options for the bootstrap * process. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Config/CliConfig.php b/src/Config/CliConfig.php index 177b6ebb..c89d3a46 100644 --- a/src/Config/CliConfig.php +++ b/src/Config/CliConfig.php @@ -4,8 +4,6 @@ * Components_Config_Cli:: class provides central options for the command line * configuration of the components tool. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -24,7 +22,7 @@ * Config\Cli:: class provides central options for the command line * configuration of the components tool. * - * Copyright 2009-2024 Horde LLC (http://www.horde.org/) + * Copyright 2009-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Config/File.php b/src/Config/File.php index a1c4e468..d1860a54 100644 --- a/src/Config/File.php +++ b/src/Config/File.php @@ -4,8 +4,6 @@ * Config\File:: class provides simple options for the bootstrap * process. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -20,7 +18,7 @@ * Config\File:: class provides simple options for the bootstrap * process. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Configs.php b/src/Configs.php index 8df93430..74d69ca1 100644 --- a/src/Configs.php +++ b/src/Configs.php @@ -4,8 +4,6 @@ * Components_Configs:: class represents configuration for the * Horde component tool. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -20,7 +18,7 @@ * Components_Configs:: class represents configuration for the * Horde component tool. * - * Copyright 2009-2024 Horde LLC (http://www.horde.org/) + * Copyright 2009-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Constants.php b/src/Constants.php index 7d25a3f3..5ad99a01 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -3,8 +3,6 @@ /** * Constants:: provides the constants for this package. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -16,7 +14,7 @@ /** * Constants:: provides the constants for this package. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Dependencies.php b/src/Dependencies.php index f8dd98d6..0325be8f 100644 --- a/src/Dependencies.php +++ b/src/Dependencies.php @@ -4,8 +4,6 @@ * The Components_Dependencies:: interface is a central broker for * providing the dependencies to the different application parts. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -33,7 +31,7 @@ * The Components_Dependencies:: interface is a central broker for * providing the dependencies to the different application parts. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Dependencies/Injector.php b/src/Dependencies/Injector.php index dd47cf05..c3de38dc 100644 --- a/src/Dependencies/Injector.php +++ b/src/Dependencies/Injector.php @@ -4,8 +4,6 @@ * The Components_Dependencies_Injector:: class provides the * Components dependencies based on the Horde injector. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -52,7 +50,7 @@ * The Components_Dependencies_Injector:: class provides the * Components dependencies based on the Horde injector. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Exception.php b/src/Exception.php index f414bb8f..922ce7f0 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -4,8 +4,6 @@ * This class provides the standard error class for the Components * package. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -20,7 +18,7 @@ * This class provides the standard error class for the Components * package. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Exception/Pear.php b/src/Exception/Pear.php index 7f519177..ab570fb0 100644 --- a/src/Exception/Pear.php +++ b/src/Exception/Pear.php @@ -3,8 +3,6 @@ /** * This class converts PEAR errors into exceptions for the Components package. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -18,7 +16,7 @@ /** * This class converts PEAR errors into exceptions for the Components package. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/ChangeLog.php b/src/Helper/ChangeLog.php index e65c5787..6b2664e5 100644 --- a/src/Helper/ChangeLog.php +++ b/src/Helper/ChangeLog.php @@ -1,7 +1,7 @@ @@ -19,7 +17,7 @@ /** * Components_Helper_Commit:: helps with collecting for git commit events. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Composer.php b/src/Helper/Composer.php index 038bcb52..3d3a47d3 100644 --- a/src/Helper/Composer.php +++ b/src/Helper/Composer.php @@ -1,7 +1,7 @@ @@ -22,7 +20,7 @@ * Components_Helper_Dependencies:: provides a utility that produces a dependency * list and records what has already been listed. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/DocsOrigin.php b/src/Helper/DocsOrigin.php index 20df2cdc..4c202086 100644 --- a/src/Helper/DocsOrigin.php +++ b/src/Helper/DocsOrigin.php @@ -3,8 +3,6 @@ /** * Components_Helper_DocOrigin:: deals with a DOCS_ORIGIN file. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -18,7 +16,7 @@ /** * Components_Helper_DocOrigin:: deals with a DOCS_ORIGIN file. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Git.php b/src/Helper/Git.php index 6a5b69d0..c06bf0ae 100644 --- a/src/Helper/Git.php +++ b/src/Helper/Git.php @@ -3,8 +3,6 @@ /** * Horde\Components\Helper\Git wraps git operations. * - * PHP Version 7 - * * @category Horde * @package Components * @author Ralf Lang @@ -32,7 +30,7 @@ * Workflows which provide some higher level usefulness * Workflow methods understand pretend mode and use output * - * Copyright 2020-2024 Horde LLC (http://www.horde.org/) + * Copyright 2020-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Installer.php b/src/Helper/Installer.php index 96337331..0129b98e 100644 --- a/src/Helper/Installer.php +++ b/src/Helper/Installer.php @@ -3,8 +3,6 @@ /** * Components_Helper_Installer:: provides an installation helper. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -26,7 +24,7 @@ /** * Components_Helper_Installer:: provides an installation helper. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Root.php b/src/Helper/Root.php index 1926c5d2..fb7e55d8 100644 --- a/src/Helper/Root.php +++ b/src/Helper/Root.php @@ -4,8 +4,6 @@ * Components_Helper_Root:: handles the root position for a tree of dependencies * and takes the Horde component layout into account. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -22,7 +20,7 @@ * Components_Helper_Root:: handles the root position for a tree of dependencies * and takes the Horde component layout into account. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Template.php b/src/Helper/Template.php index 8c836d14..a5919e64 100644 --- a/src/Helper/Template.php +++ b/src/Helper/Template.php @@ -3,8 +3,6 @@ /** * Components_Helper_Template:: converts a template into a target file. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -16,7 +14,7 @@ /** * Components_Helper_Template:: converts a template into a target file. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Templates.php b/src/Helper/Templates.php index 3b428a73..26582d10 100644 --- a/src/Helper/Templates.php +++ b/src/Helper/Templates.php @@ -3,8 +3,6 @@ /** * Components_Helper_Templates:: converts templates into target files. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -16,7 +14,7 @@ /** * Components_Helper_Templates:: converts templates into target files. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Templates/Directory.php b/src/Helper/Templates/Directory.php index c05b9b14..8dd5e0e1 100644 --- a/src/Helper/Templates/Directory.php +++ b/src/Helper/Templates/Directory.php @@ -4,8 +4,6 @@ * Components_Helper_Templatesdirectory:: converts template files from a * directory into files in a target directory. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -21,7 +19,7 @@ * Components_Helper_Templatesdirectory:: converts template files from a * directory into files in a target directory. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Templates/RecursiveDirectory.php b/src/Helper/Templates/RecursiveDirectory.php index 5507dc68..ce2454d1 100644 --- a/src/Helper/Templates/RecursiveDirectory.php +++ b/src/Helper/Templates/RecursiveDirectory.php @@ -4,8 +4,6 @@ * Components_Helper_Templates_RecursiveDirectory:: converts template files * recursively from a directory into files in a target directory. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -21,7 +19,7 @@ * Components_Helper_Templates_RecursiveDirectory:: converts template files * recursively from a directory into files in a target directory. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Templates/Single.php b/src/Helper/Templates/Single.php index b68bddb8..b7bb8d73 100644 --- a/src/Helper/Templates/Single.php +++ b/src/Helper/Templates/Single.php @@ -4,8 +4,6 @@ * Components_Helper_Templates_Single:: converts a single template file into a * target file. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -21,7 +19,7 @@ * Components_Helper_Templates_Single:: converts a single template file into a * target file. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Version.php b/src/Helper/Version.php index 4124cef0..db843b35 100644 --- a/src/Helper/Version.php +++ b/src/Helper/Version.php @@ -2,7 +2,7 @@ declare(strict_types=1); /** - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Helper/Website.php b/src/Helper/Website.php index c7d3c9ac..29fa5673 100644 --- a/src/Helper/Website.php +++ b/src/Helper/Website.php @@ -1,7 +1,7 @@ diff --git a/src/Pear/Environment.php b/src/Pear/Environment.php index 12adb13a..2dee5db1 100644 --- a/src/Pear/Environment.php +++ b/src/Pear/Environment.php @@ -3,8 +3,6 @@ /** * PearEnvironment:: handles a specific PEAR environment. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -20,7 +18,7 @@ /** * PearEnvironment:: handles a specific PEAR environment. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Pear/Factory.php b/src/Pear/Factory.php index 206f6fac..8274e157 100644 --- a/src/Pear/Factory.php +++ b/src/Pear/Factory.php @@ -3,8 +3,6 @@ /** * Components_Pear_Factory:: generates PEAR specific handlers. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -21,7 +19,7 @@ /** * Components_Pear_Factory:: generates PEAR specific handlers. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Pear/Package.php b/src/Pear/Package.php index df8a098a..611ebc31 100644 --- a/src/Pear/Package.php +++ b/src/Pear/Package.php @@ -3,8 +3,6 @@ /** * Components_Pear_Package:: provides package handling mechanisms. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -19,7 +17,7 @@ /** * Components_Pear_Package:: provides package handling mechanisms. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/PhpCsFixer/README.md b/src/PhpCsFixer/README.md new file mode 100644 index 00000000..dc36aa18 --- /dev/null +++ b/src/PhpCsFixer/README.md @@ -0,0 +1,165 @@ +# Horde Custom PHP CS Fixer Rules + +This directory contains custom PHP CS Fixer rules for the Horde Components tool. + +## Custom Fixers + +### RemovePhpVersionCommentFixer + +**Rule name:** `Horde/remove_php_version_comment` + +**Purpose:** Removes legacy "PHP Version X" comments from docblocks. + +**What it does:** +- Identifies lines containing "PHP Version 5", "PHP Version 7", or "PHP Version 8" +- Removes the entire line from file-level and class-level docblocks +- Also removes the empty line that follows (if present) +- Preserves all other docblock content + +**Example:** + +Before: +```php +/** + * Represents a component. + * + * PHP Version 7 + * + * @category Horde + * @package Components + */ +``` + +After: +```php +/** + * Represents a component. + * + * @category Horde + * @package Components + */ +``` + +### UpdateCopyrightYearFixer + +**Rule name:** `Horde/update_copyright_year` + +**Purpose:** Updates copyright year ranges to include the current year dynamically. + +**What it does:** +- Detects copyright statements in docblocks +- Updates single year (e.g., "Copyright 2025") to range ending with current year ("Copyright 2025-2026") +- Updates year ranges (e.g., "Copyright 2020-2024") to end with current year ("Copyright 2020-2026") +- Uses `date('Y')` to determine current year dynamically (no hardcoded years) +- Does not modify copyright statements already ending with current year + +**Examples:** + +Before: +```php +/** + * Copyright 2025 The Horde Project + */ +``` + +After (in 2026): +```php +/** + * Copyright 2025-2026 The Horde Project + */ +``` + +Before: +```php +/** + * Copyright 2020-2024 Horde LLC (http://www.horde.org/) + */ +``` + +After (in 2026): +```php +/** + * Copyright 2020-2026 Horde LLC (http://www.horde.org/) + */ +``` + +## Usage + +These custom fixers are automatically loaded and applied when running PHP CS Fixer with the project configuration: + +```bash +# Dry-run (preview changes) +php-cs-fixer fix --dry-run --diff + +# Apply fixes +php-cs-fixer fix + +# Fix specific file +php-cs-fixer fix src/Component.php +``` + +## Configuration + +The custom fixers are configured in `.php-cs-fixer.dist.php`: + +```php +// Load custom fixers +require_once __DIR__ . '/src/PhpCsFixer/RemovePhpVersionCommentFixer.php'; +require_once __DIR__ . '/src/PhpCsFixer/UpdateCopyrightYearFixer.php'; + +$config = (new PhpCsFixer\Config()) + ->setRules([ + // ... other rules + 'Horde/remove_php_version_comment' => true, + 'Horde/update_copyright_year' => true, + ]) + ->setFinder($finder) +; + +// Register custom fixers +$config->registerCustomFixers([ + new \Horde\Components\PhpCsFixer\RemovePhpVersionCommentFixer(), + new \Horde\Components\PhpCsFixer\UpdateCopyrightYearFixer(), +]); +``` + +## Scope + +The PHP CS Fixer configuration applies to: +- `src/` directory (PSR-4 namespaced code) +- `test/` directory (test files) + +The `lib/` directory is **excluded** as it contains legacy PSR-0 code that will be handled separately. + +## Priority + +- `RemovePhpVersionCommentFixer` runs with priority 10 (before most fixers) +- `UpdateCopyrightYearFixer` runs with priority 5 (after RemovePhpVersionCommentFixer) + +This ensures PHP Version comments are removed before copyright years are updated. + +## Extending to Other Components + +These custom fixers can be reused across other Horde components: + +1. Copy the fixer files to the component's `src/PhpCsFixer/` directory +2. Update the component's `.php-cs-fixer.dist.php` to load and register them +3. Add the rules to the rules array + +Alternatively, these could be packaged as a separate `horde/php-cs-fixer-rules` package for easier distribution. + +## Implementation Notes + +- Uses PHP CS Fixer's `AbstractFixer` base class +- Operates on `T_DOC_COMMENT` tokens +- Parses docblock content line by line using regex patterns +- Reconstructs docblocks with modified content +- Maintains all whitespace and formatting for non-modified lines + +## Testing + +Both fixers have been tested on the entire `src/` and `test/` directories: +- ✅ 101 files successfully processed +- ✅ All PHP syntax valid after fixes +- ✅ All PHPUnit tests pass +- ✅ No unintended side effects diff --git a/src/PhpCsFixer/RemovePhpVersionCommentFixer.php b/src/PhpCsFixer/RemovePhpVersionCommentFixer.php new file mode 100644 index 00000000..0aaaed42 --- /dev/null +++ b/src/PhpCsFixer/RemovePhpVersionCommentFixer.php @@ -0,0 +1,129 @@ + + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + */ + +namespace Horde\Components\PhpCsFixer; + +use PhpCsFixer\AbstractFixer; +use PhpCsFixer\FixerDefinition\FixerDefinition; +use PhpCsFixer\FixerDefinition\FixerDefinitionInterface; +use PhpCsFixer\FixerDefinition\CodeSample; +use PhpCsFixer\Tokenizer\Tokens; +use PhpCsFixer\Tokenizer\Token; + +/** + * Removes "PHP Version X" lines from docblocks. + * + * This fixer identifies and removes lines containing "PHP Version 5", "PHP Version 7", + * or "PHP Version 8" from file-level and class-level docblocks. It also removes + * the empty line that follows if present. + * + * @category Horde + * @package Components + * @author Ralf Lang + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + */ +class RemovePhpVersionCommentFixer extends AbstractFixer +{ + public function getName(): string + { + return 'Horde/remove_php_version_comment'; + } + + public function getDefinition(): FixerDefinitionInterface + { + return new FixerDefinition( + 'Remove "PHP Version X" comments from docblocks.', + [ + new CodeSample( + 'isTokenKindFound(T_DOC_COMMENT); + } + + public function getPriority(): int + { + // Run before most other fixers + return 10; + } + + protected function applyFix(\SplFileInfo $file, Tokens $tokens): void + { + foreach ($tokens as $index => $token) { + if (!$token->isGivenKind(T_DOC_COMMENT)) { + continue; + } + + $content = $token->getContent(); + $updatedContent = $this->removePhpVersionLines($content); + + if ($content !== $updatedContent) { + $tokens[$index] = new Token([T_DOC_COMMENT, $updatedContent]); + } + } + } + + /** + * Remove PHP Version lines from docblock content. + * + * @param string $docblock The original docblock content + * + * @return string The docblock with PHP Version lines removed + */ + private function removePhpVersionLines(string $docblock): string + { + $lines = explode("\n", $docblock); + $result = []; + $skipNextEmptyLine = false; + + foreach ($lines as $line) { + // Check if this line contains "PHP Version X" + if (preg_match('/^\s*\*\s*PHP Version [0-9]+\s*$/', $line)) { + // Skip this line and flag to skip next empty line + $skipNextEmptyLine = true; + continue; + } + + // Check if we should skip this line (empty line after PHP Version) + if ($skipNextEmptyLine && preg_match('/^\s*\*\s*$/', $line)) { + $skipNextEmptyLine = false; + continue; + } + + $skipNextEmptyLine = false; + $result[] = $line; + } + + return implode("\n", $result); + } +} diff --git a/src/PhpCsFixer/UpdateCopyrightYearFixer.php b/src/PhpCsFixer/UpdateCopyrightYearFixer.php new file mode 100644 index 00000000..fe46155d --- /dev/null +++ b/src/PhpCsFixer/UpdateCopyrightYearFixer.php @@ -0,0 +1,132 @@ + + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + */ + +namespace Horde\Components\PhpCsFixer; + +use PhpCsFixer\AbstractFixer; +use PhpCsFixer\FixerDefinition\FixerDefinition; +use PhpCsFixer\FixerDefinition\FixerDefinitionInterface; +use PhpCsFixer\FixerDefinition\CodeSample; +use PhpCsFixer\Tokenizer\Tokens; +use PhpCsFixer\Tokenizer\Token; + +/** + * Updates copyright year ranges to include current year. + * + * This fixer updates copyright statements in docblocks: + * - "Copyright 2025" becomes "Copyright 2025-2026" + * - "Copyright 2020-2024" becomes "Copyright 2020-2026" + * - Uses current year dynamically + * + * @category Horde + * @package Components + * @author Ralf Lang + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + */ +class UpdateCopyrightYearFixer extends AbstractFixer +{ + public function getName(): string + { + return 'Horde/update_copyright_year'; + } + + public function getDefinition(): FixerDefinitionInterface + { + return new FixerDefinition( + 'Update copyright years to include current year.', + [ + new CodeSample( + 'isTokenKindFound(T_DOC_COMMENT); + } + + public function getPriority(): int + { + // Run after RemovePhpVersionCommentFixer + return 5; + } + + protected function applyFix(\SplFileInfo $file, Tokens $tokens): void + { + $currentYear = date('Y'); + + foreach ($tokens as $index => $token) { + if (!$token->isGivenKind(T_DOC_COMMENT)) { + continue; + } + + $content = $token->getContent(); + $updatedContent = $this->updateCopyrightYears($content, $currentYear); + + if ($content !== $updatedContent) { + $tokens[$index] = new Token([T_DOC_COMMENT, $updatedContent]); + } + } + } + + /** + * Update copyright years in docblock content. + * + * @param string $docblock The original docblock content + * @param string $currentYear The current year (e.g., "2026") + * + * @return string The docblock with updated copyright years + */ + private function updateCopyrightYears(string $docblock, string $currentYear): string + { + $lines = explode("\n", $docblock); + $result = []; + + foreach ($lines as $line) { + // Match: Copyright YYYY (single year, not current year) + // Convert to: Copyright YYYY-CURRENTYEAR + if (preg_match('/^(\s*\*\s*Copyright\s+)(\d{4})(\s+.*)$/', $line, $matches)) { + $year = $matches[2]; + if ($year !== $currentYear) { + $line = $matches[1] . $year . '-' . $currentYear . $matches[3]; + } + } + // Match: Copyright YYYY-ZZZZ (year range, end year not current) + // Convert to: Copyright YYYY-CURRENTYEAR + elseif (preg_match('/^(\s*\*\s*Copyright\s+)(\d{4})-(\d{4})(\s+.*)$/', $line, $matches)) { + $startYear = $matches[2]; + $endYear = $matches[3]; + if ($endYear !== $currentYear) { + $line = $matches[1] . $startYear . '-' . $currentYear . $matches[4]; + } + } + + $result[] = $line; + } + + return implode("\n", $result); + } +} diff --git a/src/Qc/Task/Base.php b/src/Qc/Task/Base.php index bab33f87..e8a79446 100644 --- a/src/Qc/Task/Base.php +++ b/src/Qc/Task/Base.php @@ -3,8 +3,6 @@ /** * Components_Qc_Task_Base:: provides core functionality for qc tasks. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel diff --git a/src/Qc/Task/Cs.php b/src/Qc/Task/Cs.php index e95c8da9..6d6e8d83 100644 --- a/src/Qc/Task/Cs.php +++ b/src/Qc/Task/Cs.php @@ -3,8 +3,6 @@ /** * Components_Qc_Task_Cs:: runs a code style check on the component. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -23,7 +21,7 @@ /** * Components_Qc_Task_Cs:: runs a code style check on the component. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Qc/Task/Gitignore.php b/src/Qc/Task/Gitignore.php index d507e29a..32a3aa18 100644 --- a/src/Qc/Task/Gitignore.php +++ b/src/Qc/Task/Gitignore.php @@ -3,8 +3,6 @@ /** * Components_Qc_Task_Gitignore:: checks .gitignore for required entries. * - * PHP Version 7 - * * @category Horde * @package Components * @author Ralf Lang diff --git a/src/Qc/Task/Lint.php b/src/Qc/Task/Lint.php index 80eb88f3..7ee3a2ee 100644 --- a/src/Qc/Task/Lint.php +++ b/src/Qc/Task/Lint.php @@ -3,8 +3,6 @@ /** * Components_Qc_Task_Lint:: runs a syntax check on the component. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -16,7 +14,7 @@ /** * Components_Qc_Task_Lint:: runs a syntax check on the component. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Qc/Task/Loc.php b/src/Qc/Task/Loc.php index a362f55f..e4141689 100644 --- a/src/Qc/Task/Loc.php +++ b/src/Qc/Task/Loc.php @@ -1,7 +1,7 @@ @@ -24,7 +22,7 @@ /** * Components_Qc_Task_Md:: runs a mess detection check on the component. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Qc/Task/Unit.php b/src/Qc/Task/Unit.php index c123179e..53341b8b 100644 --- a/src/Qc/Task/Unit.php +++ b/src/Qc/Task/Unit.php @@ -3,8 +3,6 @@ /** * Components_Qc_Task_Unit:: runs the test suite of the component. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel diff --git a/src/Qc/Tasks.php b/src/Qc/Tasks.php index 012d9ec2..b1d923e2 100644 --- a/src/Qc/Tasks.php +++ b/src/Qc/Tasks.php @@ -4,8 +4,6 @@ * Components_Qc_Tasks:: organizes the different tasks required for * releasing a package. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -23,7 +21,7 @@ * Components_Qc_Tasks:: organizes the different tasks required for * releasing a package. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Notes.php b/src/Release/Notes.php index c80721fd..27d8d7e3 100644 --- a/src/Release/Notes.php +++ b/src/Release/Notes.php @@ -1,7 +1,7 @@ @@ -20,7 +18,7 @@ * Components_Release_Task_Announce:: announces new releases to the mailing * lists. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Base.php b/src/Release/Task/Base.php index 10a1a482..abcb8525 100644 --- a/src/Release/Task/Base.php +++ b/src/Release/Task/Base.php @@ -3,8 +3,6 @@ /** * Components_Release_Task_Base:: provides core functionality for release tasks. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -25,7 +23,7 @@ /** * Components_Release_Task_Base:: provides core functionality for release tasks. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Bugs.php b/src/Release/Task/Bugs.php index 140e1950..267c504e 100644 --- a/src/Release/Task/Bugs.php +++ b/src/Release/Task/Bugs.php @@ -1,7 +1,7 @@ @@ -22,7 +20,7 @@ * Components_Release_Task_CommitPostRelease:: commits any changes after to the * release. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/CommitPreRelease.php b/src/Release/Task/CommitPreRelease.php index 9b445530..5ad1da0b 100644 --- a/src/Release/Task/CommitPreRelease.php +++ b/src/Release/Task/CommitPreRelease.php @@ -4,8 +4,6 @@ * Components_Release_Task_CommitPreRelease:: commits any changes prior to the * release. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -18,7 +16,7 @@ * Components_Release_Task_CommitPreRelease:: commits any changes prior to the * release. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Composer.php b/src/Release/Task/Composer.php index 243407ed..d5b80411 100644 --- a/src/Release/Task/Composer.php +++ b/src/Release/Task/Composer.php @@ -18,7 +18,7 @@ /** * Components_Release_Task_Composer:: Update the composer file * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/CurrentSentinel.php b/src/Release/Task/CurrentSentinel.php index 1a82af6f..0881aeee 100644 --- a/src/Release/Task/CurrentSentinel.php +++ b/src/Release/Task/CurrentSentinel.php @@ -4,8 +4,6 @@ * Components_Release_Task_CurrentSentinel:: updates the CHANGES and the * Application.php/Bundle.php files with the current package version. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -18,7 +16,7 @@ * Components_Release_Task_CurrentSentinel:: updates the CHANGES and the * Application.php/Bundle.php files with the current package version. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/GitBranch.php b/src/Release/Task/GitBranch.php index 229bf402..e61c58e6 100644 --- a/src/Release/Task/GitBranch.php +++ b/src/Release/Task/GitBranch.php @@ -18,7 +18,7 @@ /** * Components_Release_Task_GitBranch:: Check or enforce a branch checkout * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/GitPush.php b/src/Release/Task/GitPush.php index d7eca7a4..9e2e827c 100644 --- a/src/Release/Task/GitPush.php +++ b/src/Release/Task/GitPush.php @@ -19,7 +19,7 @@ /** * Components_Release_Task_GitPush:: Push any changes to a remote server * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/NextVersion.php b/src/Release/Task/NextVersion.php index 85a5508b..65534e51 100644 --- a/src/Release/Task/NextVersion.php +++ b/src/Release/Task/NextVersion.php @@ -4,8 +4,6 @@ * Components_Release_Task_NextVersion:: updates the package.xml file with * information about the next component version. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -20,7 +18,7 @@ * Components_Release_Task_NextVersion:: updates the package.xml file with * information about the next component version. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Package.php b/src/Release/Task/Package.php index 21ae57cc..e2eb9798 100644 --- a/src/Release/Task/Package.php +++ b/src/Release/Task/Package.php @@ -3,8 +3,6 @@ /** * Components_Release_Task_Package:: prepares and uploads a release package. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -19,7 +17,7 @@ /** * Components_Release_Task_Package:: prepares and uploads a release package. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Packagist.php b/src/Release/Task/Packagist.php index e623ba65..bea9889b 100644 --- a/src/Release/Task/Packagist.php +++ b/src/Release/Task/Packagist.php @@ -22,7 +22,7 @@ /** * Components_Release_Task_Packagist:: Notify Packagist of update * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Satis.php b/src/Release/Task/Satis.php index 29b532ff..70135c7d 100644 --- a/src/Release/Task/Satis.php +++ b/src/Release/Task/Satis.php @@ -19,7 +19,7 @@ /** * Components_Release_Task_Satis:: Rebuild a satis repo * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Sentinel.php b/src/Release/Task/Sentinel.php index b4643756..f94277e1 100644 --- a/src/Release/Task/Sentinel.php +++ b/src/Release/Task/Sentinel.php @@ -4,8 +4,6 @@ * Components_Release_Task_Sentinel:: provides base functionality for the * sentinel tasks. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -18,7 +16,7 @@ * Components_Release_Task_Sentinel:: provides base functionality for the * sentinel tasks. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/TagRelease.php b/src/Release/Task/TagRelease.php index 6eecaaa2..d9d87c7b 100644 --- a/src/Release/Task/TagRelease.php +++ b/src/Release/Task/TagRelease.php @@ -3,8 +3,6 @@ /** * Components_Release_Task_TagRelease:: tags the git repository. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -18,7 +16,7 @@ /** * Components_Release_Task_TagRelease:: tags the git repository. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Timestamp.php b/src/Release/Task/Timestamp.php index 06930c54..13dced90 100644 --- a/src/Release/Task/Timestamp.php +++ b/src/Release/Task/Timestamp.php @@ -4,8 +4,6 @@ * Components_Release_Task_Timestamp:: timestamps the package right before the * release. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -20,7 +18,7 @@ * Components_Release_Task_Timestamp:: timestamps the package right before the * release. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Unit.php b/src/Release/Task/Unit.php index 78c7e478..66cf2048 100644 --- a/src/Release/Task/Unit.php +++ b/src/Release/Task/Unit.php @@ -23,7 +23,7 @@ * * Wraps code originally part of the Release Runner * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Release/Task/Website.php b/src/Release/Task/Website.php index 915ecf83..f0f5880f 100644 --- a/src/Release/Task/Website.php +++ b/src/Release/Task/Website.php @@ -1,7 +1,7 @@ @@ -24,7 +22,7 @@ * Components_Release_Tasks:: organizes the different tasks required for * releasing a package. * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/TaskInterface.php b/src/TaskInterface.php index 19284564..28ed1085 100644 --- a/src/TaskInterface.php +++ b/src/TaskInterface.php @@ -3,8 +3,6 @@ /** * Components_Release_Task_Base:: provides core functionality for release tasks. * - * PHP Version 7 - * * @category Horde * @package Components * @author Gunnar Wrobel @@ -24,7 +22,7 @@ /** * Common interface for tasks used in Release, Qc and Pipeline * - * Copyright 2011-2024 Horde LLC (http://www.horde.org/) + * Copyright 2011-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/src/Wrapper.php b/src/Wrapper.php index 103169c6..28bda823 100644 --- a/src/Wrapper.php +++ b/src/Wrapper.php @@ -1,7 +1,7 @@ Date: Mon, 2 Mar 2026 17:17:23 +0100 Subject: [PATCH 2/5] fix(qc): report correct total file count for PHP CS Fixer task The Phpcsfixer QC task was incorrectly reporting only files that had issues, not the total number of files checked. This was misleading when all files were compliant. Changes: - Add getTotalFileCount() method that uses 'list-files' command - Set files_checked statistic before running fixer - Update parseResults() to only count files with issues - Files are now correctly counted (267 in components) Before: "8 files checked" (only files with changes) After: "267 files checked" (all files scanned by PHP CS Fixer) --- src/Qc/Task/Phpcsfixer.php | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/Qc/Task/Phpcsfixer.php b/src/Qc/Task/Phpcsfixer.php index bb327e98..8c115caa 100644 --- a/src/Qc/Task/Phpcsfixer.php +++ b/src/Qc/Task/Phpcsfixer.php @@ -199,6 +199,9 @@ private function detectVersion(string $binary): void */ private function executePhpCsFixer(string $binary, string $componentPath, bool $isDryRun): int { + // First, get total file count using list-files + $this->stats['files_checked'] = $this->getTotalFileCount($binary, $componentPath); + // Build command $cmd = [ escapeshellarg($binary), @@ -257,6 +260,37 @@ private function executePhpCsFixer(string $binary, string $componentPath, bool $ return $exitCode; } + /** + * Get total file count that PHP CS Fixer will check. + * + * @param string $binary Path to PHP CS Fixer binary. + * @param string $componentPath Path to component. + * + * @return int Total number of files to be checked. + */ + private function getTotalFileCount(string $binary, string $componentPath): int + { + $cmd = [ + 'cd', + escapeshellarg($componentPath), + '&&', + escapeshellarg($binary), + 'list-files', + '2>/dev/null', + ]; + + $command = implode(' ', $cmd); + $output = shell_exec($command); + + if ($output === null || $output === '') { + return 0; + } + + // Count non-empty lines in output + $lines = explode("\n", trim($output)); + return count(array_filter($lines, fn($line) => !empty(trim($line)))); + } + /** * Extract JSON object from mixed output. * @@ -326,9 +360,8 @@ private function parseResults(): void return; } + // Count files with issues (files_checked is already set in executePhpCsFixer) foreach ($this->nativeResults['files'] as $file) { - $this->stats['files_checked']++; - if (isset($file['appliedFixers']) && is_array($file['appliedFixers']) && count($file['appliedFixers']) > 0) { $this->stats['files_with_issues']++; $this->stats['files_fixed']++; From 268757418dd295ad372ca99c39af2a6c8d9d2992 Mon Sep 17 00:00:00 2001 From: Ralf Lang Date: Mon, 2 Mar 2026 19:42:45 +0100 Subject: [PATCH 3/5] feat(qc): add PHAR support for PHP CS Fixer custom fixers When horde-components runs from a PHAR, custom PHP CS Fixer rules need to be extracted since PHP CS Fixer (external tool) cannot load classes from inside the PHAR. Changes: - Detect PHAR context using \Phar::running() - Extract .php-cs-fixer.dist.php and custom fixers to temp directory - Pass extracted config to PHP CS Fixer via --config option - Cleanup temp directory after execution and in destructor - Non-PHAR execution unchanged (uses default config discovery) This allows components to benefit from custom fixers (removing "PHP Version X" comments, updating copyright years) whether horde-components is run from source or PHAR. --- src/Qc/Task/Phpcsfixer.php | 149 ++++++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 2 deletions(-) diff --git a/src/Qc/Task/Phpcsfixer.php b/src/Qc/Task/Phpcsfixer.php index 8c115caa..ea29716a 100644 --- a/src/Qc/Task/Phpcsfixer.php +++ b/src/Qc/Task/Phpcsfixer.php @@ -42,6 +42,11 @@ class Phpcsfixer extends Base */ private ?array $nativeResults = null; + /** + * Temporary directory created for PHAR config extraction. + */ + private ?string $tempConfigDir = null; + /** * Get the name of this task. * @@ -108,8 +113,11 @@ public function run(array &$options = []): int 'files_skipped' => 0, ]; + // Setup config extraction for PHAR context + $configPath = $this->setupConfigForPhar($componentPath); + // Execute PHP CS Fixer - $exitCode = $this->executePhpCsFixer($binary, $componentPath, $isDryRun); + $exitCode = $this->executePhpCsFixer($binary, $componentPath, $isDryRun, $configPath); // Parse and output results if ($this->nativeResults !== null) { @@ -119,10 +127,21 @@ public function run(array &$options = []): int $this->outputStatistics($isDryRun); + // Cleanup temp config if created + $this->cleanupTempConfig(); + // Return number of files with issues as error count return $this->stats['files_with_issues']; } + /** + * Destructor - ensure temp config is cleaned up. + */ + public function __destruct() + { + $this->cleanupTempConfig(); + } + /** * Find PHP CS Fixer binary in standard locations. * @@ -194,10 +213,11 @@ private function detectVersion(string $binary): void * @param string $binary Path to PHP CS Fixer binary. * @param string $componentPath Path to component. * @param bool $isDryRun Whether to run in check mode. + * @param string|null $configPath Optional path to config file. * * @return int Exit code. */ - private function executePhpCsFixer(string $binary, string $componentPath, bool $isDryRun): int + private function executePhpCsFixer(string $binary, string $componentPath, bool $isDryRun, ?string $configPath = null): int { // First, get total file count using list-files $this->stats['files_checked'] = $this->getTotalFileCount($binary, $componentPath); @@ -213,6 +233,11 @@ private function executePhpCsFixer(string $binary, string $componentPath, bool $ $cmd[] = '--dry-run'; } + // Use explicit config if provided (for PHAR context) + if ($configPath !== null) { + $cmd[] = '--config=' . escapeshellarg($configPath); + } + // Use JSON format for machine-readable output $cmd[] = '--format=json'; @@ -479,4 +504,124 @@ private function outputStatistics(bool $isDryRun): void } } } + + /** + * Setup config for PHAR context by extracting config and custom fixers. + * + * @param string $componentPath Path to component being checked. + * + * @return string|null Path to config file (null if not in PHAR). + */ + private function setupConfigForPhar(string $componentPath): ?string + { + $pharPath = \Phar::running(false); + + // Not running from PHAR - use default config discovery + if ($pharPath === '') { + return null; + } + + $this->getOutput()->info('Running from PHAR - extracting custom fixers...'); + + // Create temp directory + $tempDir = sys_get_temp_dir() . '/horde-cs-fixer-' . uniqid(); + if (!mkdir($tempDir, 0755, true)) { + $this->getOutput()->warn('Failed to create temp directory for config extraction'); + return null; + } + + $this->tempConfigDir = $tempDir; + + // Create subdirectory for custom fixers + $fixerDir = $tempDir . '/src/PhpCsFixer'; + if (!mkdir($fixerDir, 0755, true)) { + $this->getOutput()->warn('Failed to create fixer directory'); + $this->cleanupTempConfig(); + return null; + } + + // Extract custom fixers + $fixerFiles = [ + 'RemovePhpVersionCommentFixer.php', + 'UpdateCopyrightYearFixer.php', + ]; + + foreach ($fixerFiles as $file) { + $source = $pharPath . '/src/PhpCsFixer/' . $file; + $dest = $fixerDir . '/' . $file; + + if (!copy($source, $dest)) { + $this->getOutput()->warn("Failed to extract fixer: $file"); + $this->cleanupTempConfig(); + return null; + } + } + + // Extract config file + $configSource = $pharPath . '/.php-cs-fixer.dist.php'; + $configDest = $tempDir . '/.php-cs-fixer.dist.php'; + + if (!copy($configSource, $configDest)) { + $this->getOutput()->warn('Failed to extract config file'); + $this->cleanupTempConfig(); + return null; + } + + if ($this->getOutput()->isVerbose()) { + $this->getOutput()->info('Extracted config to: ' . $configDest); + } + + return $configDest; + } + + /** + * Cleanup temporary config directory. + * + * @return void + */ + private function cleanupTempConfig(): void + { + if ($this->tempConfigDir === null || !is_dir($this->tempConfigDir)) { + return; + } + + // Recursively remove directory + $this->recursiveRemoveDirectory($this->tempConfigDir); + $this->tempConfigDir = null; + } + + /** + * Recursively remove a directory and its contents. + * + * @param string $dir Directory to remove. + * + * @return bool Success status. + */ + private function recursiveRemoveDirectory(string $dir): bool + { + if (!is_dir($dir)) { + return false; + } + + $items = scandir($dir); + if ($items === false) { + return false; + } + + foreach ($items as $item) { + if ($item === '.' || $item === '..') { + continue; + } + + $path = $dir . '/' . $item; + + if (is_dir($path)) { + $this->recursiveRemoveDirectory($path); + } else { + unlink($path); + } + } + + return rmdir($dir); + } } From 15d7aa6485e408cd7ba1b6ef9bd61669812e96f1 Mon Sep 17 00:00:00 2001 From: Ralf Lang Date: Mon, 2 Mar 2026 19:44:22 +0100 Subject: [PATCH 4/5] chore(build): include PHP CS Fixer config in PHAR build Add .php-cs-fixer.dist.php to box.json files list so it's included in the PHAR archive. This is required for the Phpcsfixer QC task to extract and use custom fixers when running from PHAR. --- box.json.dist | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/box.json.dist b/box.json.dist index e65b1ec3..ec71dd5f 100644 --- a/box.json.dist +++ b/box.json.dist @@ -6,7 +6,8 @@ ], "files": [ "LICENSE", - "bin/horde-components" + "bin/horde-components", + ".php-cs-fixer.dist.php" ], "finder": [ { From eed93d207ff04c50081c694c84579eee8c97c8cd Mon Sep 17 00:00:00 2001 From: Ralf Lang Date: Mon, 2 Mar 2026 19:47:14 +0100 Subject: [PATCH 5/5] style: php-cs-fixer removes outdated 'PHP Version 7' comments --- .php-cs-fixer.dist.php | 2 +- src/Qc/Task/Phpcsfixer.php | 4 ++-- test-broken/Integration/Components/Module/CiSetupTest.php | 4 +--- test-broken/Integration/Components/Module/DistributeTest.php | 4 +--- test-broken/Integration/Components/Module/DocumentTest.php | 4 +--- test-broken/Integration/Components/Module/InstallerTest.php | 4 +--- test-broken/Integration/Components/Module/ReleaseTest.php | 4 +--- test-broken/StoryTestCase.php | 4 +--- 8 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index c6b2a91b..fddb210e 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -20,7 +20,7 @@ $config = (new PhpCsFixer\Config()) ->setRules([ '@PER-CS' => true, - '@PHP84Migration' => true, + '@PHP8x3Migration' => true, 'php_unit_test_class_requires_covers' => true, 'nullable_type_declaration_for_default_null_value' => true, 'Horde/remove_php_version_comment' => true, diff --git a/src/Qc/Task/Phpcsfixer.php b/src/Qc/Task/Phpcsfixer.php index ea29716a..00adbcda 100644 --- a/src/Qc/Task/Phpcsfixer.php +++ b/src/Qc/Task/Phpcsfixer.php @@ -525,7 +525,7 @@ private function setupConfigForPhar(string $componentPath): ?string // Create temp directory $tempDir = sys_get_temp_dir() . '/horde-cs-fixer-' . uniqid(); - if (!mkdir($tempDir, 0755, true)) { + if (!mkdir($tempDir, 0o755, true)) { $this->getOutput()->warn('Failed to create temp directory for config extraction'); return null; } @@ -534,7 +534,7 @@ private function setupConfigForPhar(string $componentPath): ?string // Create subdirectory for custom fixers $fixerDir = $tempDir . '/src/PhpCsFixer'; - if (!mkdir($fixerDir, 0755, true)) { + if (!mkdir($fixerDir, 0o755, true)) { $this->getOutput()->warn('Failed to create fixer directory'); $this->cleanupTempConfig(); return null; diff --git a/test-broken/Integration/Components/Module/CiSetupTest.php b/test-broken/Integration/Components/Module/CiSetupTest.php index bc8d9874..2d67b5e5 100644 --- a/test-broken/Integration/Components/Module/CiSetupTest.php +++ b/test-broken/Integration/Components/Module/CiSetupTest.php @@ -3,8 +3,6 @@ /** * Test the CI setup module. * - * PHP Version 7 - * * @category Horde * @package Components * @subpackage UnitTests @@ -19,7 +17,7 @@ /** * Test the CI setup module. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/test-broken/Integration/Components/Module/DistributeTest.php b/test-broken/Integration/Components/Module/DistributeTest.php index a472f0cf..0a2af24f 100644 --- a/test-broken/Integration/Components/Module/DistributeTest.php +++ b/test-broken/Integration/Components/Module/DistributeTest.php @@ -3,8 +3,6 @@ /** * Test the Distribute module. * - * PHP Version 7 - * * @category Horde * @package Components * @subpackage UnitTests @@ -19,7 +17,7 @@ /** * Test the Distribute module. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/test-broken/Integration/Components/Module/DocumentTest.php b/test-broken/Integration/Components/Module/DocumentTest.php index 2c93c92b..88265723 100644 --- a/test-broken/Integration/Components/Module/DocumentTest.php +++ b/test-broken/Integration/Components/Module/DocumentTest.php @@ -3,8 +3,6 @@ /** * Test the Document module. * - * PHP Version 7 - * * @category Horde * @package Components * @subpackage UnitTests @@ -19,7 +17,7 @@ /** * Test the Document module. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/test-broken/Integration/Components/Module/InstallerTest.php b/test-broken/Integration/Components/Module/InstallerTest.php index 1b50a42f..4248b559 100644 --- a/test-broken/Integration/Components/Module/InstallerTest.php +++ b/test-broken/Integration/Components/Module/InstallerTest.php @@ -3,8 +3,6 @@ /** * Test the Installer module. * - * PHP Version 7 - * * @category Horde * @package Components * @subpackage UnitTests @@ -19,7 +17,7 @@ /** * Test the Installer module. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/test-broken/Integration/Components/Module/ReleaseTest.php b/test-broken/Integration/Components/Module/ReleaseTest.php index d8803845..02d640f4 100644 --- a/test-broken/Integration/Components/Module/ReleaseTest.php +++ b/test-broken/Integration/Components/Module/ReleaseTest.php @@ -3,8 +3,6 @@ /** * Test the Release module. * - * PHP Version 7 - * * @category Horde * @package Components * @subpackage UnitTests @@ -19,7 +17,7 @@ /** * Test the Release module. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. diff --git a/test-broken/StoryTestCase.php b/test-broken/StoryTestCase.php index 1bcc7a08..99d4987a 100644 --- a/test-broken/StoryTestCase.php +++ b/test-broken/StoryTestCase.php @@ -3,8 +3,6 @@ /** * Base for story based package testing. * - * PHP Version 7 - * * @category Horde * @package Components * @subpackage UnitTests @@ -21,7 +19,7 @@ /** * Base for story based package testing. * - * Copyright 2010-2024 Horde LLC (http://www.horde.org/) + * Copyright 2010-2026 Horde LLC (http://www.horde.org/) * * See the enclosed file LICENSE for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21.