Download the PHP package brnshkr/config without Composer

On this page you can find all versions of the php package brnshkr/config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package config

@brnshkr/config project logo [![Semantic Versioning 2.0.0][semver-2.0.0-shield-url]][semver-2.0.0-url] [![MIT License][license-shield-url]][license-url] [![Stars][stars-shield-url]][stars-url] [![Forks][forks-shield-url]][forks-url] [![Issues][issues-shield-url]][issues-url] [![Release][release-shield-url]][release-url]

Centralized collection of configuration and tooling used across all @brnshkr projects.

โ˜„๏ธ Bug Reports / Feature Requests ยป

Table of Contents

   โฌ†   

๐Ÿ‘‹ About the Project

@brnshkr/config is a centralized, opinionated collection of shared configuration files, tooling, and workflows for JavaScript and PHP projects. It helps standardizing linting, formatting, static analysis, and development workflows across repositories โ€” reducing setup time, preventing config drift, and improving code quality and consistency.

โ— Note โ—
While you're more than welcome to use this in your own projects, the configurations are tailored specifically for the @brnshkr ecosystem and may not be a perfect fit elsewhere.

   โฌ†   

๐Ÿ“š Documentation

This README covers installation and usage. The full reference โ€” custom rules, config builders, the Composer plugin, the shared Makefile, and the development setup โ€” lives in ./docs, organized by stack and tool.

   โฌ†   

๐Ÿงฐ Prerequisites

JS

PHP

   โฌ†   

๐Ÿš€ Installation

Bun

Any other JavaScript package manager works the same way, e.g. yarn add -D -E @brnshkr/config, pnpm add -D -E @brnshkr/config or npm i -D -E @brnshkr/config.

Take a look at the peerDependencies in the package.json file and install the ones you need for the modules you want to use.

Composer

Take a look at the suggested packages in the composer.json file and install the ones you need for the modules you want to use.
To have the packages installed for you, pick the modules interactively:

   โฌ†   

๐Ÿ‘€ Usage

This package provides configurations, not a hard requirement on how you run tools.

๐ŸŽจ Configuration

Each tool reads a config file like the ones below. Put it wherever the tool looks for one, or anywhere else and point the tool to it with its --config option; @brnshkr projects keep them in ./conf.

To use the defaults as they are, re-export them:

To customize them, pass your options to getConfig(). Take a look at the function signatures for exact details.

The other config builders work the same way, with their module listed in the table below. PHPStan reads a .neon file by default and a .php one with --configuration, and both can include ours:

Every tool and its options are described in the docs.

Run Tooling

A few possible ways are listed below:

Option 1 โ€” Run Tools Directly (Most Flexible)

Example calls, adjust as needed (these are the commands the make targets run)

Option 2 โ€” Run Make Targets (@brnshkr Convention)

Your own Makefile includes this one. Copy the starter rather than writing the include by hand: it guards the include, so a fresh clone can run a plain make before anything is installed.

When installed through Composer, the starter lives in ./vendor/brnshkr/config/conf/Makefile.dist instead.
A target appears once the tool it runs is installed, so make help lists what your repository actually has, make ci runs all of it, and make startup writes the .gitignore, .gitattributes and editor files you are still missing. The full reference is ./docs/Makefile.md.

These targets look for your configuration files in the ./conf directory (exactly how it is done in this project as well; see ./conf) and use the defaults of this package without one.

Tool Module Target Optional configuration file
ESLint @brnshkr/config/eslint make eslint ./conf/eslint.dist.mjs
Stylelint @brnshkr/config/stylelint make stylelint ./conf/stylelint.dist.mjs
markdownlint @brnshkr/config/markdownlint make markdownlint ./conf/markdownlint.dist.mjs
commitlint @brnshkr/config/commitlint make commitlint ./conf/commitlint.dist.mjs
TypeScript @brnshkr/config/conf/tsconfig.json make typescript ./tsconfig.json
Vitest @brnshkr/config/vitest make vitest ./conf/vitest.dist.mjs
PHP CS Fixer Brnshkr\Config\PhpCsFixer make php-cs-fixer ./conf/php-cs-fixer.dist.php
Rector Brnshkr\Config\Rector make rector ./conf/rector.dist.php
PHPStan Brnshkr\Config\PhpStan make phpstan ./conf/phpstan.dist.php
Twig CS Fixer Brnshkr\Config\TwigCsFixer make twig-cs-fixer ./conf/twig-cs-fixer.dist.php
PHPUnit โ€” make phpunit ./conf/phpunit.dist.xml
semgrep โ€” make semgrep ./conf/semgrep.dist.yaml
hadolint โ€” make hadolint ./conf/hadolint.dist.yaml
actionlint โ€” make actionlint ./conf/actionlint.dist.yaml

When using the ./conf directory it might be necessary to instruct your IDE to read these files correctly.
If you need a VS Code setup and have the specific extensions installed, make configs writes the settings they need into ./.vscode/settings.json, pointing at the files the targets use.

Composer Plugin

The Composer package also adds a few helper commands, see the Composer plugin docs.

   โฌ†   

๐Ÿงฉ Custom Rules

Both stacks ship custom rules on top of the upstream ones. Each rule is documented with examples in the Custom ESLint Rules docs and the Custom PHPStan Rules docs.

   โฌ†   

โค๏ธ Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the project
  2. Create your feature branch => git checkout -b feature/my-new-feature
  3. Commit your changes => git commit -m 'feat(my-new-feature): add some awesome new feature'
  4. Push to the branch => git push origin feature/my-new-feature
  5. Open a pull request

New to the codebase? The Development docs cover environment setup and the day-to-day commands for both stacks.

Any help is always greatly appreciated ๐Ÿ™‚

๐Ÿ’„ Commit Style

This project mostly follows the Conventional Commits specification.
There are only a few differences. The main one is that the scope is required:
So instead of this commit message signature: <type>[optional scope]: <description>
You should use this one: <type><scope>: <description>
Further details can be found in the commitlint configuration.

โš™๏ธ Workflows

See ./.github/workflows for more information.

   โฌ†   

๐Ÿ”– Versioning

This project follows Semantic Versioning 2.0.0.
The NPM and Composer packages are versioned in sync, so a version change does not necessarily indicate a change in a specific package.

โ— Note โ—
Since changes to rules and dependencies are not considered breaking, even a patch release may introduce new errors in code that hasn't changed and break your CI without notice. We therefore strongly recommend pinning to an exact version (-E for the JS package managers, composer r --dev brnshkr/config:X.Y.Z for Composer) so updates stay opt-in and can be applied on your own schedule.

Changes Considered as Breaking Changes

Changes Considered as Non-Breaking Changes

   โฌ†   

๐Ÿ“ƒ License

Distributed under the MIT License. See LICENSE for more information.

   โฌ†   

๐ŸŒ Acknowledgments

   โฌ†   


All versions of config with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-json Version *
ext-mbstring Version *
composer-plugin-api Version ^2.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brnshkr/config contains the following files

Loading the files please wait ...