slothsoft/core
Composer 安装命令:
composer require slothsoft/core
包简介
Core stuff.
关键字:
README 文档
README
Shared utility package for slothsoft PHP packages.
This is one of the oldest slothsoft packages. It contains actively used infrastructure, older but still supported utility APIs, and historical compatibility code. The package is kept installable for existing consumers, but not every namespace is recommended for new code.
Compatibility Policy
Semantic versioning is in effect. Public classes are public API, including public constructors, methods, constants, and properties. Public signatures must remain backward-compatible unless an API-breaking change is specifically requested for a major release.
All code in this package must remain syntactically valid on PHP 7.4 and behaviorally compatible with every PHP version covered by CI. Newer PHP runtimes may be used locally, but PHP 8-only syntax is not allowed.
Bug fixes are allowed in every area of the package, including deprecated and historical APIs. Deprecated APIs should not be used for new code, but they are still expected to keep working for existing consumers, including compatibility fixes for newer PHP versions.
Adding dependencies is acceptable when the dependency is justified by the change and remains compatible with this package's supported PHP versions.
Current / Supported Areas
These parts are suitable for use in new or maintained slothsoft code:
Slothsoft\Core\IO\Writable- Writer interfaces for string, file, DOM, stream, and chunk based data.
- Adapter, decorator, delegate, and merger implementations.
Slothsoft\Core\IO\Psr7- PSR-7 stream helpers and stream implementations.
- Lazy writer streams, generator streams, process streams, chunked streams, and zlib filtered streams.
Slothsoft\Core\StreamWrapper- Stream wrapper abstractions for files, resources, and PSR-7 streams.
Slothsoft\Core\StreamFilter- PHP stream filter abstractions and implementations for identity, chunked encoding, gzip, and deflate.
Slothsoft\Core\XSLT- XSLT input and adapter layer for PHP/libxml, CLI processors, Saxon, and Saxon/C.
Slothsoft\Core\IO\Sanitizer- Small sanitizers for strings, arrays, integers, tokens, and filenames.
Slothsoft\Core\MimeTypeDictionary- MIME type and extension lookup helpers.
Slothsoft\Core\CacheDirectoryStorage- File-system based ephemeral cache storage.
Supported Legacy Areas
These APIs are older and may be redesigned later, but they are still intended to be usable and supported:
Slothsoft\Core\DOMHelper- DOM parsing, XPath namespace registration, serialization, and XSLT helpers.
Slothsoft\Core\FileSystem- Large static file-system helper with old media/archive conventions.
Slothsoft\Core\ServerEnvironment- Static process-wide directory and host configuration.
Slothsoft\Core\Configuration- Mutable configuration fields used by older static APIs.
Slothsoft\Core\Calendar- Small date/time and duration helpers.
Slothsoft\Core\CLI- Process execution helper.
scripts/bootstrap.php- Global helper functions loaded through Composer.
Slothsoft\Core\DBMS- mysqli wrapper layer.
Historical / Deprecated / Out Of Support
These components are included for historical reasons only. Do not use them for new code. Prefer maintained libraries or package-local implementations instead.
Slothsoft\Core\Storage- Old cache and remote loading facade built around
XMLHttpRequest, DBMS fallback, and static configuration.
- Old cache and remote loading facade built around
Slothsoft\Core\XMLHttpRequest- Browser-style HTTP client abstraction over cURL.
Slothsoft\Core\CloudFlareScraper- Old Cloudflare challenge workaround.
Slothsoft\Core\WebCrawler- Small legacy crawler built on
Storage.
- Small legacy crawler built on
Slothsoft\Core\ImageandSlothsoft\Core\ImageHelper- Old image helpers depending on optional GD/Imagick behavior.
Slothsoft\Core\IO\HTTPFileandSlothsoft\Core\IO\HTTPStream- Legacy HTTP-backed file/stream helpers.
Slothsoft\Core\RCon- Legacy remote console helper.
Slothsoft\Core\Game- Dice, name, and prime helpers retained for old consumers.
Slothsoft\Core\InterExec- Legacy execution helper.
Development Notes
Some APIs use global or static process state, especially ServerEnvironment, Configuration, Storage, and file-system/cache helpers. Tests that exercise stateful behavior should isolate side effects with @runInSeparateProcess.
Tests may create temporary files through temp_file, temp_dir, or Slothsoft\Core\IO\FileInfoFactory::createTempFile; those helpers do not require manual cleanup. Files in test-files/ are canonical fixtures.
The local development environment should provide the Composer development extensions. If an optional extension or platform feature is unavailable, affected tests may be skipped or impossible to run locally. Skipped tests should be treated as intentionally skipped unless the task is specifically about test skipping.
Use .editorconfig for coding style. Additional formatter or static-analysis tooling may be added later, but none is required right now.
Installation
composer require slothsoft/core
Requirements
See composer.json for required PHP extensions and optional development extensions.
slothsoft/core 适用场景与选型建议
slothsoft/core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 26.1k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 12 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「docs」 「slothsoft」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 slothsoft/core 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 slothsoft/core 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 slothsoft/core 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting
Files and Resources and Hypertext: A content management system.
A Farah module for editing arbitrary savegame files.
Api documentation generator for Laravel 5
Replacement for Swagger. It is built for Laravel
A Farah module for server-sent events.
统计信息
- 总下载量: 26.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 15
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-12-28