diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..187eb38 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,24 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.yaml] +indent_size = 2 + +[*.yml] +indent_size = 2 + +[*.http] +end_of_line = crlf + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index a8999b5..a950c5c 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -1,76 +1,33 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see - \ No newline at end of file +# Code of Conduct + +

+ Testo community +

+ +We're engineers, and we're here for the code. Testo is a project by and for PHP developers who take the craft seriously. The one thing we ask of everyone taking part is **professional respect**. + +## What we expect + +- **Respect people; argue with ideas.** Critique code, designs, and decisions as hard as you like — never the person behind them. +- **Stay professional and on-topic.** Keep the conversation about engineering: code, design, trade-offs. Assume competence and good faith. +- **Give and take criticism on merit.** Review is how the code gets better — receive it without taking it personally, and give it without making it personal. +- **Humor is welcome, in reason.** A project should be enjoyable to work on. Just not at someone's expense: no jokes that belittle a person or their dignity, and no getting personal. + +## What has no place here + +- Personal attacks, insults, or harassment — public or private. +- Dragging politics or ideological conflict into the project. This is a place to build software, not to fight those battles. +- Sexualized language or imagery, or unwelcome advances. +- Publishing someone's private information without their permission. +- Anything illegal under the laws you're subject to — the project is not a venue for it. +- Anything you wouldn't do in a professional engineering team. + +## Scope + +This applies everywhere the project lives — issues, pull requests, discussions, chat — and whenever you represent Testo in public. + +## Enforcement + +Maintainers may edit, remove, or reject any contribution that doesn't meet this bar, and may warn, temporarily suspend, or permanently ban anyone who repeatedly or seriously breaks it. + +We might not be watching every thread. If something clearly out of line has gone unaddressed, chances are we simply didn't see it — don't hesitate to @-tag a maintainer when something needs attention. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..b9d08df --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Contributing to Testo + +Thanks for your interest in improving Testo. This guide covers what we expect from a contribution +to any repository of the [php-testo](https://github.com/php-testo) organization. +A repository may ship its own `CONTRIBUTING.md` with setup steps and codebase rules — read it too. + +Most packages are developed in the [php-testo/testo](https://github.com/php-testo/testo) monorepo: +report bugs, request features and open pull requests there. +The documentation lives at [php-testo.github.io](https://php-testo.github.io). + +Please follow the [Code of Conduct](https://github.com/php-testo/.github/blob/1.x/.github/CODE_OF_CONDUCT.md). Report vulnerabilities privately as described +in the [Security Policy](https://github.com/php-testo/.github/blob/1.x/.github/SECURITY.md), never in public issues. + +## Before you open a PR + +- **Understand the issue first.** Read it in full, and if anything is unclear, ask in the issue _before_ implementing — not after. +- **Signal your intent.** If you seriously plan to resolve an issue, say so in a comment first — even with no questions. Someone may already be working on it, it may be a draft that isn't meant to be built yet, or there may be discussion elsewhere you can't see. A one-line heads-up saves everyone the duplicate work — and it's often best to wait for a maintainer to confirm the approach before you start, rather than rework a finished PR. +- **Carry prior feedback forward.** If an earlier review of your PRs raised something, apply it to the next one. A mistake once is fine; repeating a fix that was already explained is not. + +## Working with AI assistants + +You are the author of the change and own every line of it — exactly as if you had written it yourself. Reviewing it is your job, not the maintainer's; handing raw agent output to review shifts your responsibility onto someone else. + +Using AI is not forbidden here — it's genuinely welcome when it raises the quality of your work. We build with it too. When AI helped on a change, feel free to credit it with an `Assisted-By:` commit trailer. + +What isn't welcome is **raw AI output opened as a PR without a human review pass**: it's dismissive of the reviewer's time, and a maintainer can run an agent over the open issues just as easily. The value you add is the human review the agent can't do. + +Before you publish, review the generated code yourself — read it, run it, and confirm it's correct. If the agent produced something you don't fully understand, don't submit it — understand it first, or ask. + +When you work through an agent, point it at the repository's `AGENTS.md` if there is one. + +## What we look for + +- Focused scope and a clear description of the change. +- Tests for new behavior. +- Green CI — tests, code style, and static analysis. +- Public API or behavior changes reflected in the docs. +- [Conventional Commits](https://www.conventionalcommits.org) titles — the changelog is built from them. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 0c47a2f..9a33510 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -2,4 +2,4 @@ # These are supported funding model platforms -patreon: roxblnfk +custom: https://boosty.to/roxblnfk diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..ee33cba --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,37 @@ +name: 🐛 Bug report +description: Something doesn't work as expected. +labels: [bug] +body: + - type: textarea + id: description + attributes: + label: What happened? + description: What you did, what you expected, and what happened instead. + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: How to reproduce + description: A minimal test, config or command that shows the problem. + render: php + - type: input + id: version + attributes: + label: Package version + placeholder: e.g. testo/testo 0.9.0 + validations: + required: true + - type: input + id: php + attributes: + label: PHP version + placeholder: e.g. 8.4.10 + validations: + required: true + - type: textarea + id: logs + attributes: + label: Output + description: Relevant output or stack trace. + render: shell diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..144e3a5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +blank_issues_enabled: true + +contact_links: + - name: 📖 Documentation + url: https://php-testo.github.io + about: Read the Testo documentation. + - name: 🐞 Testo issues + url: https://github.com/php-testo/testo/issues + about: Most Testo packages are developed in the php-testo/testo monorepo — report issues there. diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 0000000..462813d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,16 @@ +name: 📖 Documentation +description: Something in the docs is wrong, unclear or missing. +labels: [documentation] +body: + - type: input + id: page + attributes: + label: Page + description: Link to the page or file, if any. + placeholder: https://php-testo.github.io/... + - type: textarea + id: description + attributes: + label: What should change? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..ccc58f2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,21 @@ +name: 💡 Feature request +description: Suggest an idea or an improvement. +labels: [enhancement] +body: + - type: textarea + id: problem + attributes: + label: Problem + description: What are you trying to do, and what stops you? + validations: + required: true + - type: textarea + id: solution + attributes: + label: Proposed solution + description: How it could work — an API sketch or an example test helps. + - type: textarea + id: alternatives + attributes: + label: Alternatives + description: Workarounds or other approaches you considered. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 99aab41..ebaba8d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,6 +4,8 @@ +See commit history for details. + ## Why? diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..91655f3 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,11 @@ +# Security Policy + +If you found something which shouldn't be there or a bug which opens a security +hole, please report it privately via GitHub Private Vulnerability Reporting: +open the **Security** tab of the affected repository and click +**Report a vulnerability** +(`https://github.com/php-testo//security/advisories/new`). + +The report is visible only to the maintainers until an advisory is published. + +DO NOT PUBLISH SECURITY REPORTS PUBLICLY (e.g. in issues or pull requests). diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..285fa86 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/.*/ +!/.phive/ +!/.github/ +!/.phar/ diff --git a/profile/README.md b/profile/README.md index baad6f4..c6c5820 100644 --- a/profile/README.md +++ b/profile/README.md @@ -1,37 +1,42 @@ -# PHP Internal +

+ TESTO +

-Essential utilities for PHP development workflow optimization and runtime management. +
-## What We Build +[![Documentation](https://img.shields.io/badge/Documentation-blue?style=for-the-badge&logo=gitbook&logoColor=white)](https://php-testo.github.io/) +[![Support on Boosty](https://img.shields.io/static/v1?style=for-the-badge&label=&message=Sponsorship&logo=Boosty&logoColor=white&color=%23F15F2C)](https://boosty.to/roxblnfk) -**Core utilities** that solve common PHP development challenges: -- **Dependency & binary management** - Automated tool distribution, version control, and package workflows -- **Memory control** - Detection and analysis of memory leaks, utilites for long-running applications -- **Testing infrastructure** - PHPUnit interceptors and debugging tools +
-## Current Projects +
-### [DLoad](https://github.com/php-internal/dload) -Smart binary downloader that automates tool distribution. Download platform-specific binaries like RoadRunner, Temporal, or custom tools with cross-platform compatibility. +**Testo** (pronounced [test-oh], meaning "dough" in East and South Slavic languages) — is an extensible testing framework for PHP. +Built for scenarios requiring complete customization of the testing process: SDKs, framework tools, complex integrations. -### [Promise](https://github.com/php-internal/promise) -A lightweight PHP implementation of CommonJS Promises/A with PHP 8.1+ support, strict type declarations, and enhanced type annotations. This fork of ReactPHP's promise library provides improved rejection handling and better developer experience while maintaining full API compatibility. +Unlike other testing frameworks, Testo provides all at once: familiar and convenient PHP syntax, +unprecedented extensibility and customizability, +and a simple yet powerful architecture based on a minimal core and middleware system. -### [Destroy](https://github.com/php-internal/destroy) +```php +#[Test(description: 'Start Temporal workflow via API and ensure no memory leaks occur during the process')] +#[RetryPolicy(maxAttempts: 2, markFlaky: false)] +function acceptanceTest( + RouterInterface $router, +): void { + $request = new Request('POST', '/api/start-workflow'); -Explicit resource management library for PHP applications that eliminates memory leaks caused by circular references. -Provides the `Destroyable` interface for deterministic cleanup when `__destruct()` fails, particularly in complex object graphs and long-running processes. -Essential for daemon applications, event systems, and any scenario requiring reliable resource deallocation beyond PHP's garbage collector capabilities. + $response = $router->process($request); + # Assert that there are no memory leaks + Assert::leaks(request: $request, response: $response); + Assert::same(200, $response->getStatusCode()); +} +``` +Like dough, you can mold and shape it into any testing infrastructure you need. -## Useful Tools - -**[Buggregator Trap](https://github.com/buggregator/trap)** - Local debug server with enhanced Symfony VarDumper integration. Supports multiple protocols (Monolog, Sentry, SMTP, HTTP dumps) and provides rich debugging capabilities for PHP applications. - -**[Unpoly](https://github.com/roxblnfk/unpoly)** - Remove unnecessary PHP polyfills based on your PHP version to optimize dependencies and reduce bloat. - -Built for teams that value automation, consistency, and efficient development workflows. - -> [!NOTE] -> This organization is not affiliated with "PHP Internals". +We believe developers should have full control over their testing environment, and Testo delivers exactly that. diff --git a/resources/coc.jpg b/resources/coc.jpg new file mode 100644 index 0000000..ccb5614 Binary files /dev/null and b/resources/coc.jpg differ diff --git a/resources/logo-full.svg b/resources/logo-full.svg new file mode 100644 index 0000000..03cc732 --- /dev/null +++ b/resources/logo-full.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/logo-square.svg b/resources/logo-square.svg new file mode 100644 index 0000000..ad74e3f --- /dev/null +++ b/resources/logo-square.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +