Skip to content

Commit 287cba1

Browse files
authored
Merge pull request #60 from webmozarts/feature/remove-path-util-dependency
Replaced `webmozart/path-util` dependency with `@internal` `Path::isAbsolute()`
2 parents 539b5db + 4b355c9 commit 287cba1

File tree

8 files changed

+519
-336
lines changed

8 files changed

+519
-336
lines changed

.github/workflows/phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- "7.3"
2121
- "7.4"
2222
- "8.0"
23-
- "8.1-rc"
23+
- "8.1"
2424
operating-system:
2525
- "ubuntu-latest"
2626
- "windows-latest"

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,13 @@ $iterator = new GlobFilterIterator(
114114

115115
Relative globs such as `*.css` are not supported. Usually, such globs refer to
116116
paths relative to the current working directory. This utility, however, does not
117-
want to make such assumptions. Hence you should always pass absolute globs.
118-
119-
If you want to allow users to pass relative globs, I recommend to turn the globs
120-
into absolute globs using the [Webmozart Path Utility]:
117+
want to make such assumptions. Hence you should always pass absolute globs, so
118+
usage of `__DIR__` is encouraged:
121119

122120
```php
123121
use Webmozart\Glob\Glob;
124-
use Webmozart\PathUtil\Path;
125122

126-
// If $glob is absolute, that glob is used without modification.
127-
// If $glob is relative, it is turned into an absolute path based on the current
128-
// working directory.
129-
$paths = Glob::glob(Path::makeAbsolute($glob, getcwd());
123+
$paths = Glob::glob(__DIR__ . '/*');
130124
```
131125

132126
### Windows Compatibility

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.3 || ^8.0.0",
13-
"webmozart/path-util": "^2.2"
12+
"php": "^7.3 || ^8.0.0"
1413
},
1514
"require-dev": {
1615
"symfony/filesystem": "^5.3",

0 commit comments

Comments
 (0)