{"id":15065456,"url":"https://github.com/kleinweb/php-coding-standards","last_synced_at":"2025-07-31T02:40:27.539Z","repository":{"id":143627490,"uuid":"612484805","full_name":"kleinweb/php-coding-standards","owner":"kleinweb","description":"PHP coding standards rulesets used by the Klein College of Media and Communication at Temple University","archived":false,"fork":false,"pushed_at":"2025-07-14T19:18:52.000Z","size":156,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-14T23:52:23.419Z","etag":null,"topics":["coding-standards","phpcs","temple-university","wordpress"],"latest_commit_sha":null,"homepage":null,"language":"Just","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kleinweb.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}},"created_at":"2023-03-11T04:35:46.000Z","updated_at":"2025-07-14T19:16:57.000Z","dependencies_parsed_at":"2024-05-23T00:30:19.133Z","dependency_job_id":"5e40a4bd-b8d7-4cc4-a540-10c4b19730fb","html_url":"https://github.com/kleinweb/php-coding-standards","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/kleinweb/php-coding-standards","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinweb%2Fphp-coding-standards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinweb%2Fphp-coding-standards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinweb%2Fphp-coding-standards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinweb%2Fphp-coding-standards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kleinweb","download_url":"https://codeload.github.com/kleinweb/php-coding-standards/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinweb%2Fphp-coding-standards/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267978124,"owners_count":24175250,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"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":["coding-standards","phpcs","temple-university","wordpress"],"created_at":"2024-09-25T00:38:40.655Z","updated_at":"2025-07-31T02:40:27.459Z","avatar_url":"https://github.com/kleinweb.png","language":"Just","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Coding Standards for the Klein College of Media and Communication\n\nStrict enough for idealists, relaxed enough for realists.\n\n## Goals and Non-Goals\n\n- Clear separation of tooling domains to prevent conflicts\n- Prefer PHP Framework Interop Group (PHP-FIG) standards where feasible\n- Encourage WordPress-specific best practices while guarding against reactionary\n  norms\n- No support for unsupported PHP versions (obviously, right?!)\n- Guard against footguns → minimize wake-up calls\n\n## Style: PHP-CS-Fixer (`.php-cs-fixer.dist.php`)\n\nGenerally follows the Symfony setlist for PHP-CS-Fixer.  The Symfony standards\nare currently based on PER-2.0.\n\nCurrently handled per project by copy-paste.\n\n## Linting: PHP_CodeSniffer (`.phpcs.xml.dist`)\n\nPrimarily based on the `WordPress-VIP-Go` ruleset.  While we do not use\nWordPress VIP hosting, this standard encourages best-practices while allowing\nfor stylistic flexibility.  This is achieved by applying a curated set of rules\nfrom the core WordPress Coding Standards in addition to a set of custom sniffs.\nUnfortunately (but understandably), many of the messages make reference to\nWordPress VIP as a platform, as the standard assumes that the code will target\nthat hosting platform.\n\nWe also include many hand-picked additions from the `SlevomatCodingStandard` and\nsome a few adapted from the `PSR12NeutronRuleset`\n[[link](https://github.com/szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset)].\n\nIn previous versions, we extended the Doctrine coding standard, but it was too\nopinionated and resulted in an endless back-and-forth disagreement between\n`php-cs-fixer` and `phpcbf`.  Despite our efforts to counteract that behavior,\nthe result of applying fixes with similar goals often differed slightly.\n\n## Type-safety: PHPStan (`.phpstan.neon.dist`)\n\nEach project must pass Level 0 checks at minimum.  Upon initial introduction of\nPHPStan to a project, start with Level 0, then gradually increase.  As far as we\ncan tell, Level 8 is the highest achievable level in a WordPress context.  Level\n9 essentially prohibits the usage of mixed types.\n\n## Miscellaneous\n\nWe also include a `biome.json` file here for project-internal usage.  The\n`biome.json` here can serve as a good starting point for other projects, but currently\nthis package is orientated towards PHP coverage only.\n\nThe `just` (`//.justfile`, `//.config/just`), `pre-commit`\n(`//nix/git-hooks.nix`), and `treefmt` (`//nix/treefmt.nix`) configurations are\nalso decent starting points, but this project does not aim to provide a\ngeneral-purpose template for those tools.\n\nThis project does not commit a `composer.lock` in order to prevent downstream\ndependency hell.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleinweb%2Fphp-coding-standards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkleinweb%2Fphp-coding-standards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleinweb%2Fphp-coding-standards/lists"}