{"id":50962116,"url":"https://github.com/ahegyes/wp-framework-bootstrap","last_synced_at":"2026-06-18T15:03:20.139Z","repository":{"id":355224694,"uuid":"1226377942","full_name":"ahegyes/wp-framework-bootstrap","owner":"ahegyes","description":"[READ-ONLY] Auto-split mirror of wordpress-framework/packages/bootstrap. Pre-autoload PHP/WP version check (PHP 5.6+ compatible). Develop in wordpress-framework.","archived":false,"fork":false,"pushed_at":"2026-06-14T16:28:56.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"trunk","last_synced_at":"2026-06-14T18:16:47.869Z","etag":null,"topics":["composer","dws-framework","php","read-only-mirror","wordpress","wordpress-framework","wordpress-plugin-development"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahegyes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2026-05-01T10:15:11.000Z","updated_at":"2026-06-14T16:29:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ahegyes/wp-framework-bootstrap","commit_stats":null,"previous_names":["ahegyes/wp-framework-bootstrap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahegyes/wp-framework-bootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahegyes%2Fwp-framework-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahegyes%2Fwp-framework-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahegyes%2Fwp-framework-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahegyes%2Fwp-framework-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahegyes","download_url":"https://codeload.github.com/ahegyes/wp-framework-bootstrap/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahegyes%2Fwp-framework-bootstrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34495380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["composer","dws-framework","php","read-only-mirror","wordpress","wordpress-framework","wordpress-plugin-development"],"created_at":"2026-06-18T15:03:19.191Z","updated_at":"2026-06-18T15:03:20.121Z","avatar_url":"https://github.com/ahegyes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wp-framework-bootstrap\n\nPre-autoload PHP and WordPress version check. Call this from a consumer plugin's main file **before** `require_once 'vendor/autoload.php'`, so a runtime mismatch renders a graceful admin notice instead of fataling out on a legacy PHP version.\n\nPart of the [DWS WordPress framework](https://github.com/ahegyes/wordpress-framework) — see the monorepo for architecture, contributing, and the rest of the package set.\n\n## Installation\n\n```bash\ncomposer require ahegyes/wp-framework-bootstrap\n```\n\n## Why a separate package\n\nThe framework targets PHP 8.5+, but if a consumer plugin ships to a site running PHP 7.4, requiring `vendor/autoload.php` would fatal-error before any version check could run. This package is the one piece of the framework that must parse and execute on PHP 5.6+, so it can do the check first, queue an admin notice on failure, and let the consumer plugin bail cleanly.\n\n## Usage\n\nIn your plugin's main file, after `defined( 'ABSPATH' ) || exit;` and your `define( 'YOUR_PLUGIN_FILE', __FILE__ );` constants:\n\n```php\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$requirements = \\DeepWebSolutions\\Framework\\Bootstrap\\Requirements\\check_requirements( plugin_basename( __FILE__ ) );\nif ( $requirements instanceof \\WP_Error ) {\n    \\DeepWebSolutions\\Framework\\Bootstrap\\Notice\\output_requirements_error( plugin_basename( __FILE__ ), $requirements );\n    return;\n}\n\n// Continue plugin bootstrap from here.\n```\n\n`check_requirements()` reads `Requires PHP` and `Requires at least` from the plugin's header, applies the framework's own PHP 8.5 / WordPress 7.0 floor, and compares against the runtime. On success it returns `true`; on failure it returns a `WP_Error` carrying `plugin_php_incompatible` / `plugin_wp_incompatible` codes with `min` and `current` data. `output_requirements_error()` queues an admin notice describing what's missing.\n\nFor dependency checks beyond PHP/WP versions — e.g. requiring WooCommerce, a PHP extension, or a custom predicate — use the framework's Conditionals system in `wp-framework-core` / `wp-framework-utilities`, which runs after the autoloader and integrates with Feature gating and `AdminNoticesService`. Bootstrap stays narrowly scoped to \"make the autoloader safe to require.\"\n\n## API\n\n- `DeepWebSolutions\\Framework\\Bootstrap\\Requirements\\check_requirements( $plugin_basename ): true|WP_Error` — runs the PHP/WP version check. Returns `true` when the runtime is acceptable, or a `WP_Error` carrying `plugin_php_incompatible` / `plugin_wp_incompatible` codes (each with `min` and `current` data).\n- `DeepWebSolutions\\Framework\\Bootstrap\\Notice\\output_requirements_error( $plugin_basename, $error ): void` — queues an admin notice rendering the two known codes as localized \"Requires PHP X\" / \"Requires WordPress Y\" sentences. No-op when the error bag is empty or carries only unknown codes.\n\n## Requirements\n\nPHP 5.6 or higher. WordPress is detected at runtime; the wrappers degrade gracefully when WP isn't loaded.\n\n## License\n\nGPL-2.0-or-later\n\n## Predecessor\n\nSuccessor to [`deep-web-solutions/wp-framework-bootstrapper`](https://github.com/deep-web-solutions/wordpress-framework-bootstrapper) (archived).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahegyes%2Fwp-framework-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahegyes%2Fwp-framework-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahegyes%2Fwp-framework-bootstrap/lists"}