{"id":23146645,"url":"https://github.com/zeekinteractive/zeek-build-process","last_synced_at":"2025-07-03T09:03:58.752Z","repository":{"id":57676272,"uuid":"481566254","full_name":"ZeekInteractive/zeek-build-process","owner":"ZeekInteractive","description":"Installs a solid build process into an existing project","archived":false,"fork":false,"pushed_at":"2024-07-17T14:41:02.000Z","size":61,"stargazers_count":4,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-17T02:23:29.116Z","etag":null,"topics":["build-system","laravel","makefile","php","wordpress"],"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/ZeekInteractive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-04-14T10:43:39.000Z","updated_at":"2024-07-17T14:33:23.000Z","dependencies_parsed_at":"2022-09-02T22:31:17.968Z","dependency_job_id":"0dc64d8c-9451-4c2a-9e51-d58f6d2d426b","html_url":"https://github.com/ZeekInteractive/zeek-build-process","commit_stats":null,"previous_names":["zeekinteractive/zeek-build-process"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fzeek-build-process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fzeek-build-process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fzeek-build-process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeekInteractive%2Fzeek-build-process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZeekInteractive","download_url":"https://codeload.github.com/ZeekInteractive/zeek-build-process/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230147457,"owners_count":18180685,"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":["build-system","laravel","makefile","php","wordpress"],"created_at":"2024-12-17T16:33:59.315Z","updated_at":"2024-12-17T16:34:00.020Z","avatar_url":"https://github.com/ZeekInteractive.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zeek Build Process\n\n## What It Does\nThis package helps to set up a project with the following tools:\n\n* Composer Packages\n    * [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (for automatic code styling fixes)\n    * [PHP Linter](https://github.com/php-parallel-lint/PHP-Parallel-Lint) (for syntax checking)\n    * [PHP Mess Detector](https://phpmd.org/) (detect code smells and possible errors within the analyzed source code)\n    * [PHPStan](https://phpstan.org/) (static analyzer that examines code and looks for issues)\n    * [Pest](https://pestphp.com/) (unit/feature testing framework)\n* a `.node-version` file which sets the base `node` version for your project (useful for [fnm](https://github.com/Schniz/fnm))\n* GitHub action workflow for automatic scanning on pushes/pull requests\n* a `Makefile` to assist in running build and scanning commands in a consistent and simple manner\n* installation to a `git` pre-commit hook that will automatically run the `cs-fixer`, `linter` and `phpstan`\n\n## Demo\n\nhttps://user-images.githubusercontent.com/953022/166144308-9eb0efd2-2ae4-4c1d-919e-5986bc9b89de.mp4\n\n## Requirements\nThis works with both Laravel and WordPress projects*.\n\nWordPress project structure must follow the Zeek project structure (`mu-plugins/app/`).\n\n## Setup\nRequire this package as a `dev` dependency:\n\n```bash\ncomposer require --dev zeek/zeek-build-process\n```\n\n### Install\nInstall by running (assuming your vendor path is `/vendor`):\n\n```bash\n./vendor/bin/zbp install\n```\n\nThis performs a safe, [no-clobber](https://unix.stackexchange.com/questions/572294/why-is-cps-option-not-to-overwrite-files-called-no-clobber) installation into an existing project. It does so in an [idempotent](https://en.wikipedia.org/wiki/Idempotence) manner: if you run the installation, make some changes to one of the configuration files and then run the installation again, it will not overwrite your changes.\n\n### Reinstall\nIf you need to forcefully reinstall and start everything over from scratch you can run:\n\n```bash\n./vendor/bin/zbp reinstall\n```\n\nBe warned this will overwrite any changes you've made as well as any [baselines](https://phpstan.org/user-guide/baseline) you've created.\n\n### Uninstall\n\nIf you'd like to completely remove all the tools, files and packages that this installs, you can run\n\n```bash\n./vendor/bin/zbp uninstall\n```\n\n### Git Hook Installation\n\nIf you just need to set up your own local `git` `pre-commit` hook, you can simply run:\n\n```bash\n./vendor/bin/zbp precommit\n```\n\nThis will create a `.git/hooks/pre-commit` file that runs the `make precommit` command immediately before the actual git commit happens.\n\n## Usage\n\nA `Makefile` is installed that defines the commands (with configured flags/parameters) to utilize the tools in an easy and repeatable manner.\n\nYou can examine the [Makefile](https://github.com/ZeekInteractive/zeek-build-process/blob/main/templates/Makefile) source to really see what it's doing.\n\n### Normal Usage\n\n### Make Commands\n\nUseful aliases:\n\nRuns `cs-fixer` and `lint`:\n```bash\nmake precommit\n```\n---\nRuns `cs-fixer`, `lint`, `phpstan` and `phpmd`:\n```bash\nmake scan\n```\n\n---\n\nUseful individual commands:\n```bash\nmake cs-fixer\n```\n```bash\nmake lint\n```\n```bash\nmake phpmd\n```\n```bash\nmake phpstan\n```\n```bash\nmake pest\n```\n\n### Generating Baselines\n\nIf you've just installed and need to baseline your project so that the build system only looks at new code:\n```bash\nmake baseline\n```\n\nIf you want to run a specific tool baseline\n```bash\nmake phpmd-baseline\n```\n\n```bash\nmake phpstan-baseline\n```\n\n## Git Hook\nUpon installation, a `pre-commit` hook is created in `.git/hooks/pre-commit`. This hook runs immediately before you commit code.\n\nIt runs the `make precommit` alias, and will cause the commit to error out if any major problems are detected. \n\nYou should run `make scan` on your own, as it includes the `phpmd` tool which attempts to give you guidance on good practices.\n\nYou can bypass the `pre-commit` hook by passing `--no-verify` to the commit command. This should be used sparingly and only when necessary.\n\n## GitHub Action\nA standardized GitHub action [`build.yml`](https://github.com/ZeekInteractive/zeek-build-process/blob/main/templates/build.yml) file is included which will do all the steps necessary to run the scan commands on every push to GitHub.\n\nThis build file will automatically review your code and pull requests and give feedback. You should attempt to fix whatever issues are reported, however this system is still in an experimental stage and it may report things that be irrelevant. If you have any questions please contact Aaron Holbrook.\n\n## Customizing Configuration Files\nIt is completely possible to tweak the tool configurations for your individual project. A `build` [folder](https://github.com/ZeekInteractive/zeek-build-process/tree/main/build) is created upon the initial installation. \n\nEach tool has its own directory and configuration file. To tweak the individual file you will have to read the appropriate tool's documentation and see what works best.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeekinteractive%2Fzeek-build-process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeekinteractive%2Fzeek-build-process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeekinteractive%2Fzeek-build-process/lists"}