{"id":15527608,"url":"https://github.com/schlessera/composer-wp-autoload","last_synced_at":"2025-04-23T12:28:26.545Z","repository":{"id":62541159,"uuid":"66825424","full_name":"schlessera/composer-wp-autoload","owner":"schlessera","description":"WordPress Core Autoloader for Composer","archived":false,"fork":false,"pushed_at":"2016-08-30T10:57:53.000Z","size":13,"stargazers_count":11,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T23:41:12.480Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://www.alainschlesser.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/schlessera.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}},"created_at":"2016-08-29T08:24:37.000Z","updated_at":"2023-08-27T00:49:40.000Z","dependencies_parsed_at":"2022-11-02T15:32:57.357Z","dependency_job_id":null,"html_url":"https://github.com/schlessera/composer-wp-autoload","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlessera%2Fcomposer-wp-autoload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlessera%2Fcomposer-wp-autoload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlessera%2Fcomposer-wp-autoload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlessera%2Fcomposer-wp-autoload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schlessera","download_url":"https://codeload.github.com/schlessera/composer-wp-autoload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250433518,"owners_count":21429884,"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":["hacktoberfest"],"created_at":"2024-10-02T11:07:42.674Z","updated_at":"2025-04-23T12:28:26.522Z","avatar_url":"https://github.com/schlessera.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"WordPress Core Autoloader for Composer\n=====================================\n\nThis is a custom autoloader generator and class map loader Composer plugin for WordPress Core.\n\nIt diverges from the default Composer autoloader setup in the following ways:\n\n* The generated autoloader is compatible with PHP 5.2. Classes containing PHP 5.3+ code will be skipped and throw warnings.\n* The paths to the classes are relative to a set constant. The default constant being used is `ABSPATH`.\n* The class maps can optionally be configured to be case-insensitive.\n\nUsage\n-----\n\nIn your project's `composer.json`, add the following lines:\n\n```json\n{\n    \"require\": {\n        \"schlessera/composer-wp-autoload\": \"^1\"\n    },\n    \"scripts\": {\n        \"post-install-cmd\": [\n            \"WordPress\\\\ComposerAutoload\\\\Generator::dump\"\n        ],\n        \"post-update-cmd\": [\n            \"WordPress\\\\ComposerAutoload\\\\Generator::dump\"\n        ],\n        \"post-autoload-dump\": [\n            \"WordPress\\\\ComposerAutoload\\\\Generator::dump\"\n        ]\n    },\n    \"extra\": {\n        \"wordpress-autoloader\": {\n            \"class-root\": \"ABSPATH\",\n            \"case-sensitive\": true\n        },\n    }\n}\n```\n\nAfter the next update/install, you will have a `vendor/autoload_wordpress.php` file, that you can simply include and use to autoload classes within WordPress Core.\n\nValid \"extra\" Keys\n------------------\n\nYou can configure the autoloader by providing `\"extra\"` keys under the `\"wordpress-autoloader\"` root key.\n\n* __`\"class-root\"`__ :\n\n    String value that is used to replace the `dirname($vendorDir)` string.\n    The default is `\"ABSPATH\"`, to make the autoloader use the `ABSPATH` constant.\n\n* __`\"case-sensitive\"`__:\n\n    Boolean value to configure whether the classmap loader should be case-sensitive or not. The default value is `true`.\n\nContributing\n------------\n\nAll feedback / bug reports / pull requests are welcome.\n\nLicense\n-------\n\nThis code is released under the MIT license.\n\nFor the full copyright and license information, please view the [`LICENSE`](LICENSE) file distributed with this source code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschlessera%2Fcomposer-wp-autoload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschlessera%2Fcomposer-wp-autoload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschlessera%2Fcomposer-wp-autoload/lists"}