{"id":15529113,"url":"https://github.com/marcinorlowski/lombok-php","last_synced_at":"2026-01-08T12:09:40.392Z","repository":{"id":42033678,"uuid":"481758765","full_name":"MarcinOrlowski/lombok-php","owner":"MarcinOrlowski","description":"Put your PHP8+ project on a diet by reducing total number of boilerplate code.","archived":false,"fork":false,"pushed_at":"2023-12-01T08:50:23.000Z","size":233,"stargazers_count":32,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T08:02:22.709Z","etag":null,"topics":["lombok","lombok-php","php-attributes","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcinOrlowski.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-14T21:49:24.000Z","updated_at":"2025-03-14T16:20:08.000Z","dependencies_parsed_at":"2023-01-29T19:30:40.095Z","dependency_job_id":null,"html_url":"https://github.com/MarcinOrlowski/lombok-php","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinOrlowski%2Flombok-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinOrlowski%2Flombok-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinOrlowski%2Flombok-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcinOrlowski%2Flombok-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcinOrlowski","download_url":"https://codeload.github.com/MarcinOrlowski/lombok-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246385451,"owners_count":20768668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["lombok","lombok-php","php-attributes","php8"],"created_at":"2024-10-02T11:16:23.824Z","updated_at":"2026-01-08T12:09:40.380Z","avatar_url":"https://github.com/MarcinOrlowski.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Lombok PHP - write less code!](artwork/lombok-php-logo.png)\n\n---\n\n[![Latest Stable Version](https://poser.pugx.org/marcin-orlowski/lombok-php/v)](https://packagist.org/packages/marcin-orlowski/lombok-php)\n[![codecov](https://codecov.io/gh/MarcinOrlowski/lombok-php/branch/master/graph/badge.svg?token=MDOSOPKZ8C)](https://codecov.io/gh/MarcinOrlowski/lombok-php)\n[![License](https://poser.pugx.org/marcin-orlowski/lombok-php/license)](https://packagist.org/packages/marcin-orlowski/lombok-php)\n\n---\n\n# Table of contents #\n\n* [Introduction](#introduction)\n* [Why should I use it?](#benefits)\n* [Usage examples](#examples)\n* [Documentation](docs/README.md)\n* [License](#license)\n* [Changelog](CHANGES.md)\n\n---\n\n## Introduction ##\n\n`Lombok PHP` is a package offering a growing set\nof [PHP attributes](https://www.php.net/manual/en/language.attributes.php) (a\nfeature [introduced in PHP 8.0](https://www.php.net/releases/8.0/)) designed to help reduce\nboilerplate code in your project by providing commonly used functionality that can be easily\napplied.\n\nThe main goal is to provide all the functionality **at runtime**, without any intermediate steps\nneeded and **without generating any additional code files**.\n\nAnd yes, the project name is shamelessly borrowed from the beloved\nJava's [Project Lombok](https://projectlombok.org/). However, it is not affiliated in any way; it's\nmerely a nod to the scope and (target) functionality.\n\n## Benefits ##\n\n* Less code to write and maintain,\n* No more repetitive boilerplate code,\n* Can coexist with other attributes (i.e., [Doctrine](https://www.doctrine-project.org/), etc.),\n* No code generation (all handled on-the-fly),\n* No additional dependencies,\n* Supports object cloning,\n* Production ready.\n\n## Examples ##\n\nVanilla PHP:\n\n```php\nclass Entity {\n    protected int    $id;\n    protected string $name;\n    protected ?int   $age;\n\n    public function getId(): int\n    {\n      return $this-\u003eid;\n    }\n\n    public function getName(): string\n    {\n        return $this-\u003ename;\n    }\n    public function setName(string $name): static\n    {\n        $this-\u003ename = $name;\n        return $this;\n    }\n\n    public function getAge(): ?int\n    {\n        return $this-\u003eage;\n    }\n    public function setAge(?int $age): static\n    {\n        $this-\u003eage = $age;\n        return $this;\n    }\n}\n```\n\nUsing `Lombok PHP` (inheritance from `\\Lombok\\Helper` is helpful\nbut [optional](docs/README.md#manual-wiring)):\n\n```php\nuse Lombok\\Getter;\nuse Lombok\\Setter;\n\n#[Setter, Getter]\nclass Entity extends \\Lombok\\Helper {\n    #[Getter]\n    protected int $id;\n\n    protected string $name;\n    protected ?int $age;\n}\n```\n\n[Click here](docs/README.md) to see setup instruction and all the technical details.\n\n## License ##\n\n* Written and copyrighted \u0026copy;2022-2026 by Marcin Orlowski \u003cmail (#) marcinorlowski (.) com\u003e\n* `Lombok PHP` is open-sourced software licensed under\n  the [LGPL 3.0](https://opensource.org/licenses/LGPL-3.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcinorlowski%2Flombok-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcinorlowski%2Flombok-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcinorlowski%2Flombok-php/lists"}