Glob-like file and pattern matching utility.

Overview

Splat

Join our Community Become a Sponsor One-time Donation
Latest Stable Version Total Downloads License GitHub branch checks state


Glob-like file and pattern matching utility.

Requirements

Installation

Install Splat with Composer.

composer require phlak/splat

Then import the Glob or Pattern classes as needed.

use PHLAK\Splat\Glob;
use PHLAK\Splat\Pattern;

Patterns

Glob methods accept a $pattern as the first parameter. This can be a string or an instance of \PHLAK\Splat\Pattern.

$pattern = new Pattern(...);
$pattern = Pattern::make(...);

A pattern string may contain one or more of the following special matching expressions.

Matching Expressions

  • ? matches any single character
  • * matches zero or more characters excluding / (\ on Windows)
  • ** matches zero or more characters including / (\ on Windows)
  • [abc] matches a single character from the set (i.e. a, b or c)
  • [a-c] matches a single character in the range (i.e. a, b or c)
  • [^abc] matches any character not in the set (i.e. not a, b or c)
  • [^a-c] matches any character not in the range (i.e. not a, b or c)
  • {foo,bar,baz} matches any pattern in the set (i.e. foo, bar or baz)
    • Sets may contain other matching patterns (i.e. {foo,ba[rz]})

Assertions

The following assertions can be use to assert that a string is followed by, or not followed by, another pattern.

  • (=foo) matches any string that also contains foo
  • (!foo) matches any string that does not also contain foo

For example, a pattern of *.tar(!.{gz,xz}) will match a string ending with .tar or .tar.bz but not tar.gz or tar.xz.

Converting Patterns To Regular Expressions

Glob patterns can be converted to a regular expression pattern.

Pattern::make('foo')->toRegex(); // Returns '#^foo$#'
Pattern::make('foo/bar.txt')->toRegex(); // Returns '#^foo/bar\.txt$#'
Pattern::make('file.{yml,yaml}')->toRegex(); // Returns '#^file\.(yml|yaml)$#'

You can control regular expression line anchors via the $options parameter.

Pattern::make('foo')->toRegex(Glob::NO_ANCHORS); // Returns '#foo#'
Pattern::make('foo')->toRegex(Glob::START_ANCHOR); // Returns '#^foo#'
Pattern::make('foo')->toRegex(Glob::END_ANCHOR); // Returns '#foo$#'
Pattern::make('foo')->toRegex(Glob::BOTH_ANCHORS); // Returns '#^foo$#'
Pattern::make('foo')->toRegex(Glob::START_ANCHOR | Glob::END_ANCHOR); // Returns '#^foo$#'

Pattern Character Escaping

Sometimes you may have characters in a string that shouldn't be treated as matching expression characters. In those situations you can escape any character by preceeding it with a backslash (\).

Pattern::make('What is happening\?');
Pattern::make('Wall-E \[2008\].mp4');

You may also escape glob pattern characters from a string programmatically with the Pattern::escape() method.

Pattern::escape('What is happening?'); // Returns 'What is happening\?'
Pattern::escape('*.{yml,yaml}'); // Returns '\*.\{yml\,yaml\}'
Pattern::escape('[Ss]pl*t.txt'); // Returns '\[Ss\]pl\*t.txt'

Methods

Files In

Get a list of files in a directory matching a glob pattern.

Glob::in('**.txt', 'some/file/path');

Returns a Symfony Finder Component containing the files matching the glob pattern within the specified directory (e.g. foo.txt, foo/bar.txt, foo/bar/baz.txt, etc.).


Exact Match

Test if a string matches a glob pattern.

Glob::match('*.txt', 'foo.txt'); // true
Glob::match('*.txt', 'foo.log'); // false

Match Start

Test if a string starts with a glob pattern.

Glob::matchStart('foo/*', 'foo/bar.txt'); // true
Glob::matchStart('foo/*', 'bar/foo.txt'); // false

Match End

Test if a string ends with a glob pattern.

Glob::matchEnd('**.txt', 'foo/bar.txt'); // true
Glob::matchEnd('**.txt', 'foo/bar.log'); // false

Match Within

Test if a string contains a glob pattern.

Glob::matchWithin('bar', 'foo/bar/baz.txt'); // true
Glob::matchWithin('bar', 'foo/baz/qux.txt'); // false

Filter an Array (of Strings)

Filter an array of strings to values matching a glob pattern.

Glob::filter('**.txt', [
    'foo', 'foo.txt', 'bar.zip', 'foo/bar.png', 'foo/bar.txt',
]);

// Returns ['foo.txt', 'foo/bar.txt']

Reject an Array (of Strings)

Filter an array of strings to values not matching a glob pattern.

Glob::reject('**.txt', [
    'foo', 'foo.txt', 'bar.zip', 'foo/bar.png', 'foo/bar.txt',
]);

// Returns ['foo', 'bar.zip', 'foo/bar.png']

Changelog

A list of changes can be found on the GitHub Releases page.

Troubleshooting

For general help and support join our GitHub Discussion or reach out on Twitter.

Please report bugs to the GitHub Issue Tracker.

Copyright

This project is licensed under the MIT License.

You might also like...
The Pantheon CLI — a standalone utility for performing operations on the Pantheon Platform

terminus : Pantheon's Command-Line Interface Status About Terminus is Pantheon's Command Line Interface (CLI), providing at least equivalent functiona

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

this starter kite inspired by laravel & Geo and mvc pattern. it's wrap for Wordpress built in classes.

WordpressStarterKite Introduction Built With Prerequisite Directory Structure Guidelines Getting Started Authors Introduction this starter kite inspir

YL MVC Structure (PHP MVC) is a pattern made in PHP used to implement user interfaces, data, and controlling logic.

YL MVC Structure (PHP MVC) is a pattern made in PHP used to implement user interfaces, data, and controlling logic. It is built based on the combination of ideas from the Yii framework and Laravel framework (yl).

PHP implementation of circuit breaker pattern.

What is php-circuit-breaker A component helping you gracefully handle outages and timeouts of external services (usually remote, 3rd party services).

Simple repository pattern for laravel, with services!

With repository and service you can separate business logic and query logic, slim controller and DRY. Simple generate repository and service with artisan command, automatically bind interface with repository

Easy Repository pattern for PHP Phalcon framework.

Phalcon Repositories Introduction Phalcon Repositories lets you easily build repositories for your Phalcon models, for both SQL and Mongo drivers. PHP

Design Pattern Examples in PHP

Design Patterns in PHP This repository is part of the Refactoring.Guru project. It contains PHP examples for all classic GoF design patterns. Each pat

Implementação do Composite Pattern Utilizando PHP
Implementação do Composite Pattern Utilizando PHP

Composite Pattern - PHP Implementação do Composite Pattern Utilizando PHP Descrição O Composite Pattern é um padrão de projeto estrutural que permite

Comments
  • Update psy/psysh requirement from ^0.10 to ^0.10 || ^0.11

    Update psy/psysh requirement from ^0.10 to ^0.10 || ^0.11

    Updates the requirements on psy/psysh to permit the latest version.

    Release notes

    Sourced from psy/psysh's releases.

    PsySH v0.11.0

    Kinda big:

    • Drop support for PHP 5.x and HHVM.
    • Add support for Symfony 6.
    • Bump minimum versions of Symfony and PHP-Parser to merely "ancient" and not "prehistoric".

    All the small things:

    • Drop function call and constant fetch input validation (PHP can now recover from these at runtime, so we'll just handle the error!)
    • Fix bracketed paste support dectection issue for some readline implementations (MinGWEditLine?).
    • Add supportsBracketedPaste to the Readline interface.
    • All the param types and return types.
    • Add @dev and lowest-version dependency testing to CI.

    In case you missed it above, PsySH v0.11.0 drops support for PHP 5.x and HHVM.

    Please. It's almost 2022. If you're not using PHP 8 already, make that your New Year's resolution.

    Commits
    • c9a85cd Merge branch 'release/0.11.0'
    • f10e238 Bump to v0.11.0
    • c527e7d Dropped super old deps (#693)
    • 40dcc21 Composer 2.2 PHP bin proxy compatibility.
    • 9a3a3ed Move supportsBracketedPaste into the readline interface.
    • 8ca8ba3 Fix bracketed paste detection issue for some readline implementations (MinGWE...
    • 6668952 Update legacy compat phar names in PHP 7.0 smoke test.
    • bbe1721 Fix return type fors manual DB configuration.
    • 5ab2aab Fix non-interactive mode.
    • 73d7abf 👋 bye Symfony2.
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update friendsofphp/php-cs-fixer requirement from ^2.10 to ^2.10 || ^3.0

    Update friendsofphp/php-cs-fixer requirement from ^2.10 to ^2.10 || ^3.0

    Updates the requirements on friendsofphp/php-cs-fixer to permit the latest version.

    Release notes

    Sourced from friendsofphp/php-cs-fixer's releases.

    v3.0.0 Constitution

    The easiest way to update from v2.x is:

    • install v2.19 and run in verbose mode (php-cs-fixer fix -v) or in future mode (PHP_CS_FIXER_FUTURE_MODE=1 php-cs-fixer fix) to identify and fix deprecations
    • install v3.0 and follow upgrade guide

    • bug #5164 Differ - surround file name with double quotes if it contains spacing. (SpacePossum)
    • bug #5560 PSR2: require visibility only for properties and methods (kubawerlos)
    • bug #5576 ClassAttributesSeparationFixer: do not allow using v2 config (kubawerlos)
    • feature #4979 Pass file to differ (paulhenri-l, SpacePossum)
    • minor #3374 show-progress option: drop run-in and estimating, rename estimating-max to dots (keradus)
    • minor #3375 Fixers - stop exposing extra properties/consts (keradus)
    • minor #3376 Tokenizer - remove deprecations and legacy mode (keradus)
    • minor #3377 rules - change default options (keradus)
    • minor #3378 SKIP_LINT_TEST_CASES - drop env (keradus)
    • minor #3379 MethodArgumentSpaceFixer - fixSpace is now private (keradus)
    • minor #3380 rules - drop rootless configurations (keradus)
    • minor #3381 rules - drop deprecated configurations (keradus)
    • minor #3382 DefinedFixerInterface - incorporate into FixerInterface (keradus)
    • minor #3383 FixerDefinitionInterface - drop getConfigurationDescription and getDefaultConfiguration (keradus)
    • minor #3384 diff-format option: drop sbd diff, use udiffer by default, drop SebastianBergmannDiffer and SebastianBergmannShortDiffer classes (keradus)
    • minor #3385 ConfigurableFixerInterface::configure - param is now not nullable and not optional (keradus)
    • minor #3386 ConfigurationDefinitionFixerInterface - incorporate into ConfigurableFixerInterface (keradus)
    • minor #3387 FixCommand - forbid passing 'config' and 'rules' options together (keradus)
    • minor #3388 Remove Helpers (keradus)
    • minor #3389 AccessibleObject - drop class (keradus)
    • minor #3390 Drop deprecated rules: blank_line_before_return, hash_to_slash_comment, method_separation, no_extra_consecutive_blank_lines, no_multiline_whitespace_before_semicolons and pre_increment (keradus)
    • minor #3456 AutoReview - drop references to removed rule (keradus)
    • minor #3659 use php-cs-fixer/diff ^2.0 (SpacePossum)
    • minor #3681 CiIntegrationTest - fix incompatibility from 2.x line (keradus)
    • minor #3740 NoUnusedImportsFixer - remove SF exception (SpacePossum)
    • minor #3771 UX: always set error_reporting in entry file, not Application (keradus)
    • minor #3922 Make some more classes final (ntzm, SpacePossum)
    • minor #3995 Change default config of native_function_invocation (dunglas, SpacePossum)
    • minor #4432 DX: remove empty sets from RuleSet (kubawerlos)
    • minor #4489 Fix ruleset @​PHPUnit50Migration:risky (kubawerlos)
    • minor #4620 DX: cleanup additional, not used parameters (keradus)
    • minor #4666 Remove deprecated rules: lowercase_constants, php_unit_ordered_covers, silenced_deprecation_error (keradus)
    • minor #4697 Remove deprecated no_short_echo_tag rule (julienfalque)
    • minor #4851 fix phpstan on 3.0 (SpacePossum)
    • minor #4901 Fix SCA (SpacePossum)
    • minor #5069 Fixed failing tests on 3.0 due to unused import after merge (GrahamCampbell)
    • minor #5096 NativeFunctionInvocationFixer - BacktickToShellExecFixer - fix integration test (SpacePossum)
    • minor #5171 Fix test (SpacePossum)
    • minor #5245 Fix CI for 3.0 line (keradus)
    • minor #5351 clean ups (SpacePossum)
    • minor #5364 DX: Do not display runtime twice on 3.0 line (keradus)
    • minor #5412 3.0 - cleanup (SpacePossum, keradus)
    • minor #5417 Further BC cleanup for 3.0 (keradus)

    ... (truncated)

    Changelog

    Sourced from friendsofphp/php-cs-fixer's changelog.

    Changelog for v3.0.0

    • bug #5164 Differ - surround file name with double quotes if it contains spacing. (SpacePossum)
    • bug #5560 PSR2: require visibility only for properties and methods (kubawerlos)
    • bug #5576 ClassAttributesSeparationFixer: do not allow using v2 config (kubawerlos)
    • feature #4979 Pass file to differ (paulhenri-l, SpacePossum)
    • minor #3374 show-progress option: drop run-in and estimating, rename estimating-max to dots (keradus)
    • minor #3375 Fixers - stop exposing extra properties/consts (keradus)
    • minor #3376 Tokenizer - remove deprecations and legacy mode (keradus)
    • minor #3377 rules - change default options (keradus)
    • minor #3378 SKIP_LINT_TEST_CASES - drop env (keradus)
    • minor #3379 MethodArgumentSpaceFixer - fixSpace is now private (keradus)
    • minor #3380 rules - drop rootless configurations (keradus)
    • minor #3381 rules - drop deprecated configurations (keradus)
    • minor #3382 DefinedFixerInterface - incorporate into FixerInterface (keradus)
    • minor #3383 FixerDefinitionInterface - drop getConfigurationDescription and getDefaultConfiguration (keradus)
    • minor #3384 diff-format option: drop sbd diff, use udiffer by default, drop SebastianBergmannDiffer and SebastianBergmannShortDiffer classes (keradus)
    • minor #3385 ConfigurableFixerInterface::configure - param is now not nullable and not optional (keradus)
    • minor #3386 ConfigurationDefinitionFixerInterface - incorporate into ConfigurableFixerInterface (keradus)
    • minor #3387 FixCommand - forbid passing 'config' and 'rules' options together (keradus)
    • minor #3388 Remove Helpers (keradus)
    • minor #3389 AccessibleObject - drop class (keradus)
    • minor #3390 Drop deprecated rules: blank_line_before_return, hash_to_slash_comment, method_separation, no_extra_consecutive_blank_lines, no_multiline_whitespace_before_semicolons and pre_increment (keradus)
    • minor #3456 AutoReview - drop references to removed rule (keradus)
    • minor #3659 use php-cs-fixer/diff ^2.0 (SpacePossum)
    • minor #3681 CiIntegrationTest - fix incompatibility from 2.x line (keradus)
    • minor #3740 NoUnusedImportsFixer - remove SF exception (SpacePossum)
    • minor #3771 UX: always set error_reporting in entry file, not Application (keradus)
    • minor #3922 Make some more classes final (ntzm, SpacePossum)
    • minor #3995 Change default config of native_function_invocation (dunglas, SpacePossum)
    • minor #4432 DX: remove empty sets from RuleSet (kubawerlos)
    • minor #4489 Fix ruleset @​PHPUnit50Migration:risky (kubawerlos)
    • minor #4620 DX: cleanup additional, not used parameters (keradus)
    • minor #4666 Remove deprecated rules: lowercase_constants, php_unit_ordered_covers, silenced_deprecation_error (keradus)
    • minor #4697 Remove deprecated no_short_echo_tag rule (julienfalque)
    • minor #4851 fix phpstan on 3.0 (SpacePossum)
    • minor #4901 Fix SCA (SpacePossum)
    • minor #5069 Fixed failing tests on 3.0 due to unused import after merge (GrahamCampbell)
    • minor #5096 NativeFunctionInvocationFixer - BacktickToShellExecFixer - fix integration test (SpacePossum)
    • minor #5171 Fix test (SpacePossum)
    • minor #5245 Fix CI for 3.0 line (keradus)
    • minor #5351 clean ups (SpacePossum)
    • minor #5364 DX: Do not display runtime twice on 3.0 line (keradus)
    • minor #5412 3.0 - cleanup (SpacePossum, keradus)
    • minor #5417 Further BC cleanup for 3.0 (keradus)
    • minor #5418 Drop src/Test namespace (keradus)
    • minor #5436 Drop mapping of strings to boolean option other than yes/no (keradus)
    • minor #5440 Change default ruleset to PSR-12 (keradus)
    • minor #5477 Drop diff-format (keradus)

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update vimeo/psalm requirement from ^3.8 to ^3.8 || ^4.0

    Update vimeo/psalm requirement from ^3.8 to ^3.8 || ^4.0

    Updates the requirements on vimeo/psalm to permit the latest version.

    Release notes

    Sourced from vimeo/psalm's releases.

    Support PHP 8 Attributes

    Features

    This adds basic support for PHP 8 attributes (#4367). Psalm checks attribute arguments, and also emits a UndefinedAttributeClass issue if the attribute cannot be found.

    This version of Psalm can also be installed when using PHP 8.

    Bugfixes

    • class getIterator calls are used inside loops (#3625)
    • allow Psalm to understand more assignments when evaluating implicit else (#4374)
    • promoted properties are always used in the constructor (#4386)
    • arraylike-object should be Countable too (#4398)
    • signature types (return & param types) weren't being invalidated when their use changed, now they are
    • allow multiple @psalm-assert-if-true on a single variable (#4414)
    • uses better path normalisation when resolveFromConfig="true" so that existing baselines need only small adjustments (#4410)
    • @BenMorel improved some ext-ds stubs (#4415)
    • allow implicit null->offsetGet() inside an isset call (#4397)
    • fix try analysis on assigned vars when they're typed to mixed (#4418)
    • any class with a __toString method in PHP 8 is assumed to implement Stringable (#4429)
    • fix crash when encountering no-argument str_replace, DOMNode::appendChild, crypt, get_class_methods, iterator_to_array, get_object_vars calls
    • prevent unused variable false-positive when (bool) or (float) casts are used (#4435)
    • @enumag improved ext-ds stubs with immutable data structures (#4425)
    Commits
    • 8929bde Add psalm-mutation-free to ext-ds (#4425)
    • 4bb675e Pass CodeLocation to FunctionParamsProviderInterface interface (#4444)
    • 82f35c1 Ensure Stringable is always available to tests that need it
    • 438bcc6 Use softer return
    • 2e95d1f Use more robust check for Stringable stub
    • 5c784dc Fix #4435 - ensure casts are always flow-sensitive
    • fce5c26 Remove subpar test
    • dab1aac Protect more calls
    • f43dba8 Use more accurate comparison for non-empty-lists
    • 083102a Fix count call
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Create Dependabot config file

    Create Dependabot config file

    :wave: Dependabot is moving natively into GitHub! This pull request migrates your configuration from Dependabot.com to a config file, using the new syntax. When you merge this pull request, we'll swap out dependabot-preview (me) for a new dependabot app, and you'll be all set!

    With this change, you'll now use the Dependabot page in GitHub, rather than the Dependabot dashboard, to monitor your version updates. Dependabot is now configured exclusively using config files.

    Your account is using config variables to access private registries. GitHub-native Dependabot will support private registries before Dependabot Preview is shut down. For now, we recommend leaving Dependabot Preview active.

    If you've got any questions or feedback for us, please let us know by creating an issue in the dependabot/dependabot-core repository.

    Learn more about the relaunch of Dependabot

    Please note that regular @dependabot commands do not work on this pull request.

    :robot::yellow_heart:

    dependencies 
    opened by dependabot-preview[bot] 0
Releases(4.0.1)
  • 4.0.1(Dec 14, 2021)

  • 4.0.0(May 17, 2021)

    Changed

    • Refactored Glob to use static methods
    • Introduced the Pattern class

    Detailed changelog: https://github.com/PHLAK/Glob/compare/3.1.0...4.0.0

    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Oct 10, 2020)

  • 3.0.0(May 15, 2020)

    Changed

    • Renamed library to "Splat" (phlak/splat)
    • Explicitly bumped minimum PHP version to 7.2 (this was already required by symfony/finder)

    Detailed changelog: https://github.com/PHLAK/Splat/compare/2.1.0...3.0.0

    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(May 11, 2020)

    Changed

    • Internally cache Glob::toRegex() method (improves performance when calling the same Glob object)

    Detailed changelog: https://github.com/PHLAK/Glob/compare/2.0.0...2.1.0

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(May 7, 2020)

    Added

    • Added Glob::in() method for retrieving a list of files in a directory matching a pattern
    • Added Glob::filter() and Glob::rejecet() methods for filtering arrays of strings by a glob pattern
    • Added Glob::escape() method for escaping glob pattern characters in a string
    • Added Glob::directorySeparator() method for overriding the directory separator

    Changed

    • Use the OS configured directory separator for matching * and **
      • Forward slash (/) on Mac/Linux
      • Back slash (\) on Windows

    Detailed changelog: https://github.com/PHLAK/Glob/compare/1.0.0...2.0.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(May 11, 2020)

  • 0.1.0(Apr 30, 2020)

Owner
Chris Kankiewicz
Passionate PHP developer, Linux junkie, gamer and coffee aficionado. Dedicated husband and father of two.
Chris Kankiewicz
[READ-ONLY] CakePHP Utility classes such as Inflector, Text, Hash, Security and Xml. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

CakePHP Utility Classes This library provides a range of utility classes that are used throughout the CakePHP framework What's in the toolbox? Hash A

CakePHP 112 Feb 15, 2022
Small utility library that handles metadata minification and expansion.

composer/metadata-minifier Small utility library that handles metadata minification and expansion.

Composer 134 Dec 26, 2022
m4b-tool is a command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b

m4b-tool m4b-tool is a is a wrapper for ffmpeg and mp4v2 to merge, split or and manipulate audiobook files with chapters. Although m4b-tool is designe

Andreas 798 Jan 8, 2023
An utility component for XML usage and best practices in PHP

An utility component for XML usage and best practices in PHP

Laminas Project 13 Nov 26, 2022
Easy to use utility functions for everyday PHP projects. This is a port of the Lodash JS library to PHP

Lodash-PHP Lodash-PHP is a port of the Lodash JS library to PHP. It is a set of easy to use utility functions for everyday PHP projects. Lodash-PHP tr

Lodash PHP 474 Dec 31, 2022
Utility that helps you switch git configurations with ease.

git-profile Utility that helps you switch git configurations with ease Preface It is possible that you have multiple git configurations. For example:

Zeeshan Ahmad 240 Jul 18, 2022
A utility package that helps inspect functions in PHP.

A utility package that helps inspect functions in PHP. This package provides some utilities for inspecting functions (callables) in PHP. You can use i

Ryan Chandler 14 May 24, 2022
Php-timer - Utility class for timing

phpunit/php-timer Utility class for timing things, factored out of PHPUnit into a stand-alone component. Installation You can add this library as a lo

Sebastian Bergmann 7.4k Jan 5, 2023
Xr - Lightweight debug server utility built on ReactPHP.

XR ?? Subscribe to the newsletter to don't miss any update regarding Chevere. XR is a dump server utility built on top of ReactPHP. Features ✨ Dump si

Chevere 195 Dec 17, 2022
Warden is a CLI utility for orchestrating Docker based developer environments

Warden Warden is a CLI utility for orchestrating Docker based developer environments, and enables multiple local environments to run simultaneously wi

David Alger 314 Dec 2, 2022