sclable/xml-lint
Composer 安装命令:
composer require sclable/xml-lint
包简介
A php cli tool to lint and validate xml files.
关键字:
README 文档
README
A php tool to lint and validate xml files from the commandline.
XML Lint checks the syntax of any xml files and validates the file against the XSD schema defined in the file.
Usage
Installation with Composer
If you'd like to include this library in your project with composer, simply run:
composer require "sclable/xml-lint"
Command Line Usage
To lint a single xml file:
vendor/bin/xmllint path/to/file.xml
To lint a directory and all its subdirectories:
vendor/bin/xmllint path/to/dir
Help
xmllint has built in cli help screen:
vendor/bin/xmllint --help
Options
-vbe verbose, display the filename of the current file to lint-r 0don't search recursive (if the argument is a directory)-e nameexclude files or directories containing 'name'-sskip the xsd validation
Development
Run tests
# check code style php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run -v # run tests php vendor/bin/phpunit php vendor/bin/behat
Using docker:
# Example docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" . # PHP_VERSION: choose between 8.1, 8.2, 8.3 and 8.4 docker build -t xml-lint:php-8.1 --build-arg=PHP_VERSION="8.1" . docker build -t xml-lint:php-8.2 --build-arg=PHP_VERSION="8.2" . docker build -t xml-lint:php-8.3 --build-arg=PHP_VERSION="8.3" . docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" . # Run with code style check docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" --build-arg=PHP_CS_FIXER=true . # Use this image to run xml-lint: cd tests/functional/_testdata docker run -it --rm -v "$PWD":/var/src -w /var/src xml-lint:php-8.4 -r -v -- ./
Changelog
For the changelog see the CHANGELOG file
License
For the license and copyright see the LICENSE file
sclable/xml-lint 适用场景与选型建议
sclable/xml-lint 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 653.82k 次下载、GitHub Stars 达 23, 最近一次更新时间为 2015 年 10 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「xml」 「cli」 「xsd」 「lint」 「xml schema」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sclable/xml-lint 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sclable/xml-lint 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sclable/xml-lint 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Load DOM document safety
Convert XSD (XML Schema) definitions into PHP classes
XSD schema validation constraint for PHPUnit
Added a method to Laravel response for handling xml response and also converting Eloquent return to XML.
Convert PHP to XML and viceversa using XML Schema definition as encoding style
This Bundle provides handlers to work with xml and xsd files.
统计信息
- 总下载量: 653.82k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 24
- 点击次数: 25
- 依赖项目数: 20
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-19