{"id":21813077,"url":"https://github.com/webdevstudios/oops-wp","last_synced_at":"2025-09-04T00:11:06.986Z","repository":{"id":34244250,"uuid":"165319685","full_name":"WebDevStudios/oops-wp","owner":"WebDevStudios","description":"A collection of abstract classes, interfaces, and traits to promote object-oriented programming practices in WordPress.","archived":false,"fork":false,"pushed_at":"2021-02-27T18:31:46.000Z","size":110,"stargazers_count":58,"open_issues_count":8,"forks_count":7,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-12T22:51:22.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebDevStudios.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-11T22:26:07.000Z","updated_at":"2025-03-06T18:02:37.000Z","dependencies_parsed_at":"2022-09-09T14:51:07.627Z","dependency_job_id":null,"html_url":"https://github.com/WebDevStudios/oops-wp","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDevStudios%2Foops-wp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDevStudios%2Foops-wp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDevStudios%2Foops-wp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebDevStudios%2Foops-wp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebDevStudios","download_url":"https://codeload.github.com/WebDevStudios/oops-wp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248795413,"owners_count":21162770,"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":[],"created_at":"2024-11-27T14:27:05.277Z","updated_at":"2025-04-13T23:25:57.854Z","avatar_url":"https://github.com/WebDevStudios.png","language":"PHP","readme":"# OOPS-WP: Object Oriented Programming Structures for WordPress\nThis library provides a collection of abstract classes, interfaces,\nand traits to help promote object-oriented development in WordPress.\n\n## Installation\nThe preferred way to install the latest stable release of OOPS-WP is\nvia Composer. From your project directory, you can run:\n```\ncomposer require webdevstudios/oops-wp\n```\n\nThis will install the library relative to where you called the command,\nat `/vendor/webdevstudios/oops-wp`. You can navigate to that directory\nto look through the various classes, interfaces, and traits that are\navailable for you to use. In order to make those structures available\nto WordPress, you'll need to require the Composer-generated autoload file:\n\n```\nif ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {\n\trequire_once __DIR__ . '/vendor/autoload.php';\n}\n```\n\n**Note:** Details on why we include the `is_readable()` check is available [in the wiki](https://github.com/WebDevStudios/oops-wp/wiki/Why-wrap-require-autoloader-in-a-is_readable%28%29-check%3F).\n\n### A Caveat\nWordPress isn't designed to be compatible with Composer, and many plugins\nand themes may wind up using the same libraries. This library is\nrecommended for use in agency-type projects where have full control\nover the development and installation environment. Including OOPS-WP\nas part of a packaged release may mean that multiple different copies\ncould wind up getting installed and included in a project, thereby causing\nunforeseen errors in the system. This is a shortcoming of the way WordPress\nresolves dependencies, and not one of OOPS-WP. For more information\nabout this issue, [we recommend checking out this great article\non by Peter Suhm on WPTavern](https://wptavern.com/a-narrative-of-using-composer-in-a-wordpress-plugin).\n\n## Documentation and Development Roadmap\nIn its initial release, OOPS-WP contains very few structures to facilitate\nplugin and theme development. There are a handful of interfaces:\n`Hookable`, `Runnable`, and `Registerable`, and a few abstract classes,\nnotably `ServiceRegistrar`, `Service`, `EditorBlock`, and `PostType`.\nThese were borne around the need to quickly scaffold some basic\nstructural entities at WebDevStudios, but they are not the only\ndata structures supported by WordPress.\n\nTo see what WordPress structures are under development, you can\n[visit the Issues page of this repo](https://github.com/webdevstudios/oops-wp/issues).\nFor documentation and examples on how to use the structures this package\nprovides, you can [visit the Wiki](https://github.com/webdevstudios/oops-wp/wiki).\n\n## Versioning\nThis project follows [semantic versioning](https://semver.org) best\npractices. What this means is that PATCH releases (e.g., 0.1.1) will\ninclude only minor bugfixes or other non-functional updates, such as\nthe text in this README. MINOR releases (e.g., 0.2.0) will include\nnew features, such as additional class structures, and backward-compatible\nfriendly changes. MAJOR releases (e.g., 1.0.0) will contain\nchanges that break backward compatibility. As such, you should be\nable to safely run `composer update webdevstudios/oops-wp` on packages\nthat are versioned to a major release (e.g., `^1`) without worrying\nthat the updates will break your site. Upgrading to the next major release\nwill mean that you will likely have to make updates to all of the classes\nthat make use of this library to ensure that they're adhering to the\nlatest APIs.\n\n## Contributing\nSee the [contributing](CONTRIBUTING.md) doc for information on\nhow to contribute to this project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdevstudios%2Foops-wp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebdevstudios%2Foops-wp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdevstudios%2Foops-wp/lists"}