{"id":34938946,"url":"https://github.com/phpnomad/mutator","last_synced_at":"2026-05-19T21:34:35.240Z","repository":{"id":244274158,"uuid":"713654355","full_name":"phpnomad/mutator","owner":"phpnomad","description":"Mutation strategy interfaces for transforming data through composable adapters","archived":false,"fork":false,"pushed_at":"2026-04-10T02:10:21.000Z","size":82,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-10T02:36:10.018Z","etag":null,"topics":["framework","mutator","php","phpnomad","platform-agnostic","transformation"],"latest_commit_sha":null,"homepage":"https://phpnomad.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpnomad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-03T00:53:18.000Z","updated_at":"2026-04-10T02:10:25.000Z","dependencies_parsed_at":"2024-06-13T19:56:13.861Z","dependency_job_id":"f39484fc-22a6-4c0a-b2b0-0343be03fefc","html_url":"https://github.com/phpnomad/mutator","commit_stats":null,"previous_names":["phpnomad/mutator"],"tags_count":1,"template":false,"template_full_name":"phpnomad/repository-template","purl":"pkg:github/phpnomad/mutator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Fmutator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Fmutator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Fmutator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Fmutator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpnomad","download_url":"https://codeload.github.com/phpnomad/mutator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpnomad%2Fmutator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33233740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"ssl_error","status_checked_at":"2026-05-19T15:49:22.917Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framework","mutator","php","phpnomad","platform-agnostic","transformation"],"created_at":"2025-12-26T18:49:11.652Z","updated_at":"2026-05-19T21:34:35.234Z","avatar_url":"https://github.com/phpnomad.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phpnomad/mutator\n\n[![Latest Version](https://img.shields.io/packagist/v/phpnomad/mutator.svg)](https://packagist.org/packages/phpnomad/mutator)\n[![Total Downloads](https://img.shields.io/packagist/dt/phpnomad/mutator.svg)](https://packagist.org/packages/phpnomad/mutator)\n[![PHP Version](https://img.shields.io/packagist/php-v/phpnomad/mutator.svg)](https://packagist.org/packages/phpnomad/mutator)\n[![License](https://img.shields.io/packagist/l/phpnomad/mutator.svg)](https://packagist.org/packages/phpnomad/mutator)\n\n`phpnomad/mutator` provides interfaces and a trait for structured data transformation. Instead of scattering one-off transformation helpers across your codebase, you define mutators that follow a consistent contract and route input through them via adapters. The package has no runtime dependencies and is used by other PHPNomad packages, including `phpnomad/loader`, to handle transformation steps in a testable, composable way.\n\n## Installation\n\n```bash\ncomposer require phpnomad/mutator\n```\n\n## Overview\n\nThe package exports five interfaces and one trait:\n\n- `Mutator` is the stateful transformation contract. An implementation holds input in its own state and exposes a single `mutate(): void` call that produces a result internally.\n- `MutatorHandler` is the functional counterpart. Its `mutate(...$args)` takes arguments and returns a result directly, with no instance state to manage.\n- `MutationAdapter` handles bidirectional conversion between raw data and `Mutator` instances, keeping data marshaling separate from transformation logic.\n- `MutationStrategy` attaches handler factories to named actions, enabling dynamic dispatch and deferred instantiation through a `callable():MutatorHandler` getter.\n- `HasMutations` lets an object advertise the mutations it supports via `getMutations(): array`, which is useful when you want capabilities to be discoverable at runtime.\n- `CanMutateFromAdapter` is a trait that runs the full convert, mutate, convert workflow in a single `mutate(...$args)` call on any class that holds a `MutationAdapter` property.\n\n## Documentation\n\nFull package documentation, including individual interface references and the adapter workflow walkthrough, lives at [phpnomad.com](https://phpnomad.com).\n\n## License\n\nMIT. See [LICENSE.txt](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpnomad%2Fmutator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpnomad%2Fmutator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpnomad%2Fmutator/lists"}