fix:repo cleanup

This commit is contained in:
2025-11-08 20:09:07 +00:00
parent f1da93791d
commit dedcc73567
1204 changed files with 121800 additions and 16971 deletions
+7
View File
@@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
## [6.0.0] - 2025-02-07
### Removed
* This component is no longer supported on PHP 8.2
## [5.1.0] - 2024-08-27
### Added
@@ -168,6 +174,7 @@ No changes
* [#23](https://github.com/sebastianbergmann/php-file-iterator/pull/23): Added support for wildcards (glob) in exclude
[6.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.1...6.0.0
[5.1.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.0.1...5.1.0
[5.0.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.0.0...5.0.1
[5.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/4.1...5.0.0
+1 -1
View File
@@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2009-2024, Sebastian Bergmann
Copyright (c) 2009-2025, Sebastian Bergmann
All rights reserved.
Redistribution and use in source and binary forms, with or without
+4 -4
View File
@@ -21,17 +21,17 @@
},
"config": {
"platform": {
"php": "8.2.0"
"php": "8.3.0"
},
"optimize-autoloader": true,
"sort-packages": true
},
"prefer-stable": true,
"require": {
"php": ">=8.2"
"php": ">=8.3"
},
"require-dev": {
"phpunit/phpunit": "^11.0"
"phpunit/phpunit": "^12.0"
},
"autoload": {
"classmap": [
@@ -40,7 +40,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "5.0-dev"
"dev-main": "6.0-dev"
}
}
}
+9 -6
View File
@@ -37,6 +37,8 @@ final class Factory
* @param list<non-empty-string>|string $suffixes
* @param list<non-empty-string>|string $prefixes
* @param list<non-empty-string> $exclude
*
* @phpstan-ignore missingType.generics
*/
public function getFileIterator(array|string $paths, array|string $suffixes = '', array|string $prefixes = '', array $exclude = []): AppendIterator
{
@@ -113,7 +115,7 @@ final class Factory
*
* @return list<string>
*/
private function globstar(string $pattern)
private function globstar(string $pattern): array
{
if (stripos($pattern, '**') === false) {
$files = glob($pattern, GLOB_ONLYDIR);
@@ -125,23 +127,24 @@ final class Factory
$patterns = [$rootPattern . $restPattern];
$rootPattern .= '/*';
while ($dirs = glob($rootPattern, GLOB_ONLYDIR)) {
while ($directories = glob($rootPattern, GLOB_ONLYDIR)) {
$rootPattern .= '/*';
foreach ($dirs as $dir) {
$patterns[] = $dir . $restPattern;
foreach ($directories as $directory) {
$patterns[] = $directory . $restPattern;
}
}
$files = [];
foreach ($patterns as $pat) {
$files = array_merge($files, $this->globstar($pat));
foreach ($patterns as $_pattern) {
$files = array_merge($files, $this->globstar($_pattern));
}
}
if ($files !== false) {
$files = array_unique($files);
sort($files);
return $files;
+2 -5
View File
@@ -9,7 +9,6 @@
*/
namespace SebastianBergmann\FileIterator;
use function assert;
use function preg_match;
use function realpath;
use function str_ends_with;
@@ -25,8 +24,8 @@ use SplFileInfo;
*/
final class Iterator extends FilterIterator
{
public const PREFIX = 0;
public const SUFFIX = 1;
public const int PREFIX = 0;
public const int SUFFIX = 1;
private false|string $basePath;
/**
@@ -56,8 +55,6 @@ final class Iterator extends FilterIterator
{
$current = $this->getInnerIterator()->current();
assert($current instanceof SplFileInfo);
$filename = $current->getFilename();
$realPath = $current->getRealPath();