Skip to content

Commit 9f2d303

Browse files
authored
docs: update README with accurate information (#89)
- Fix broken links and outdated blog references - Update PHP version requirements (8.2+ for v12, 8.1 for v11) - Correct import namespaces and phpstan version - Add complete list of merged composer.json sections - Include all available commands documentation
1 parent 90d9ff9 commit 9f2d303

File tree

1 file changed

+49
-17
lines changed

1 file changed

+49
-17
lines changed

README.md

Lines changed: 49 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,57 @@
11
# Not only Composer tools to build a Monorepo
22

3-
[![Downloads total](https://img.shields.io/packagist/dt/symplify/monorepo-builder.svg?style=flat-square)](https://packagist.org/packages/symplify/monorepo-builder/stats)
3+
[![Downloads total](https://img.shields.io/packagist/dt/symplify/monorepo-builder.svg?style=flat-square)](https://packagist.org/packages/symplify/monorepo-builder)
44

5-
Do you maintain [a monorepo](https://tomasvotruba.com/blog/2019/10/28/all-you-always-wanted-to-know-about-monorepo-but-were-afraid-to-ask/) with more packages?
5+
Do you maintain a monorepo with multiple packages?
66

77
**This package has few useful tools, that will make that easier**.
88

99
## Install
1010

1111
```bash
12+
# Latest version (PHP 8.2+)
1213
composer require symplify/monorepo-builder --dev
14+
15+
# For PHP 8.1 (legacy version, no longer maintained)
16+
composer require "symplify/monorepo-builder:^11.2" --dev
1317
```
1418

19+
**Requirements:**
20+
- PHP 8.2 or higher (for version 12.x)
21+
22+
**For older PHP versions:**
23+
- Use version 11.x (no longer maintained)
24+
1525
## Usage
1626

1727
### 1. Are you New to Monorepo?
1828

19-
The best to lean-in fast is to read basic intro at blog post [All You Always Wanted to Know About Monorepo](https://www.tomasvotruba.com/blog/2019/10/28/all-you-always-wanted-to-know-about-monorepo-but-were-afraid-to-ask/#what-is-monorepo).
20-
We also made a simple command to make that easy for you:
29+
If you're new to monorepos, you can start with a basic setup using our initialization command:
2130

2231
```bash
2332
vendor/bin/monorepo-builder init
2433
```
2534

26-
And the basic setup is done!
35+
This creates a basic monorepo structure with the necessary configuration files.
36+
2737

2838
### 2. Merge local `composer.json` to the Root One
2939

3040
Merges configured sections to the root `composer.json`, so you can only edit `composer.json` of particular packages and let script to synchronize it.
3141

32-
Sections that are needed for monorepo to work will be merged:
42+
Sections that will be merged from packages to root:
3343

34-
- 'require'
35-
- 'require-dev'
36-
- 'autoload'
37-
- 'autoload-dev'
38-
- 'repositories'
39-
- 'extra'
44+
- `require` - Dependencies needed by packages
45+
- `require-dev` - Development dependencies
46+
- `autoload` - PSR-4 autoloading configuration
47+
- `autoload-dev` - Development autoloading configuration
48+
- `repositories` - Package repositories
49+
- `extra` - Extra configuration data
50+
- `provide` - Virtual packages provided
51+
- `authors` - Package authors information
52+
- `minimum-stability` - Minimum package stability
53+
- `prefer-stable` - Prefer stable packages
54+
- `replace` - Packages replaced by this one
4055

4156
To merge run:
4257

@@ -46,10 +61,9 @@ vendor/bin/monorepo-builder merge
4661

4762
<br>
4863

49-
Typical location for packages is `/packages`. But what if you have different naming or extra `/projects` directory?
5064

5165
```php
52-
use Symplify\MonorepoBuilder\ComposerJsonManipulator\ValueObject\ComposerJsonSection;
66+
use Symplify\ComposerJsonManipulator\ValueObject\ComposerJsonSection;
5367
use Symplify\MonorepoBuilder\Config\MBConfig;
5468
use Symplify\MonorepoBuilder\ValueObject\Option;
5569

@@ -75,7 +89,7 @@ return static function (MBConfig $mbConfig): void {
7589
],
7690
],
7791
ComposerJsonSection::REQUIRE_DEV => [
78-
'phpstan/phpstan' => '^0.12',
92+
'phpstan/phpstan' => '^2.1',
7993
],
8094
]);
8195

@@ -143,9 +157,9 @@ return static function (MBConfig $mbConfig): void {
143157

144158
### 6. Split Directories to Git Repositories
145159

146-
Thanks to GitHub Actions, this was never simpler to set up. Use [symplify/github-action-monorepo-split](https://github.com/symplify/github-action-monorepo-split).
160+
You can split packages from your monorepo into separate repositories using GitHub Actions. Use [symplify/github-action-monorepo-split](https://github.com/symplify/github-action-monorepo-split) for this purpose.
147161

148-
How to configure it? See our local setup at [.github/workflows/split_monorepo.yaml](https://github.com/danharrin/monorepo-split-github-action/blob/main/.github/workflows/split.yaml)
162+
For configuration examples, you can refer to the [GitHub Action workflow documentation](https://github.com/danharrin/monorepo-split-github-action).
149163

150164
### 7. Release Flow
151165

@@ -216,3 +230,21 @@ vendor/bin/monorepo-builder release patch
216230
```
217231

218232
You can use `minor` and `major` too.
233+
234+
## Available Commands
235+
236+
Here are all available commands you can use with monorepo-builder:
237+
238+
- `init` - Creates empty monorepo directory and composer.json structure
239+
- `merge` - Merge "composer.json" from all found packages to root one
240+
- `bump-interdependency` - Bump dependency of split packages on each other
241+
- `validate` - Validates synchronized versions in "composer.json" in all found packages
242+
- `package-alias` - Updates branch alias in "composer.json" all found packages
243+
- `propagate` - Propagate versions from root "composer.json" to all packages, the opposite of "merge" command
244+
- `localize-composer-paths` - Set mutual package paths to local packages - use for pre-split package testing
245+
- `release` - Perform release process with set Release Workers
246+
247+
To see detailed help for any command, run:
248+
```bash
249+
vendor/bin/monorepo-builder <command> --help
250+
```

0 commit comments

Comments
 (0)