drupol / launcher
2.2.3
2020-11-11 19:21 UTC
Requires
- php: >= 7.1.3
- drupol/phposinfo: ^1.6
- symfony/process: ^4.3 || ^4.4 || ^5
Requires (Dev)
- drupol/php-conventions: ^2.0.2
- drupol/phpspec-annotation: ^1.2.0
- drupol/phpspec-requires: ^1.1
- friends-of-phpspec/phpspec-code-coverage: ^4.3.2
- friends-of-phpspec/phpspec-requires: ^1.1
- phpspec/phpspec: ^6.3
- phptaskman/changelog: ^1.0
This package is auto-updated.
Last update: 2024-07-21 12:28:53 UTC
README
操作系统启动器
描述
允许您使用默认操作系统应用程序启动文件或资源。
要求
- PHP >= 7.1
安装
composer require loophp/launcher
使用
<?php declare(strict_types = 1); include 'vendor/autoload.php'; use loophp\launcher\Launcher; // Open the default browser. Launcher::open('https://github.com/loophp/launcher'); // Open the default file manager. Launcher::open('/tmp'); // Open the default file manager. Launcher::open('C:\Windows'); // The parameter $resource is variadic. // Open multiple resources. Launcher::open('https://google.com', 'https://github.com');
代码质量、测试和基准
每次将更改引入到库中时,Github CI 都会运行测试和基准。
该库使用 PHPSpec 编写了测试。您可以在 spec
目录中自由检查它们。运行 composer phpspec
来触发测试。
在每次提交之前,使用 GrumPHP 执行一些检查,手动运行 ./vendor/bin/grumphp run
来检查。
贡献
请随时通过发送 Github pull requests 来为此库做出贡献。我非常积极回应 :-)