Skip to content

Commit 25d1e4e

Browse files
authored
Fix binary name conflict with zero-to-prod-data-model-factory (#35)
* Add implementation plan for binary name conflict resolution * Remove conflicting binary zero-to-prod-data-model-factory * Remove conflicting binary from composer.json bin array * Add context directory to export-ignore
1 parent 26ac432 commit 25d1e4e

File tree

5 files changed

+77
-34
lines changed

5 files changed

+77
-34
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
/SECURITY.md export-ignore
1313
/test.sh export-ignore
1414
/dock export-ignore
15-
/art/ export-ignore
15+
/art/ export-ignore
16+
/context/ export-ignore

bin/zero-to-prod-data-model-factory

Lines changed: 0 additions & 32 deletions
This file was deleted.

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"phpunit/phpunit": "<12.0"
5252
},
5353
"bin": [
54-
"bin/zero-to-prod-data-model-factory",
5554
"bin/zero-to-prod-data-model-helper"
5655
],
5756
"suggest": {
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Name conflicts with an existing file
2+
3+
**Issue #32** | **State:** OPEN | **Created:** 2025-09-02T21:37:24Z
4+
5+
**Labels:** None
6+
**Assignees:** None
7+
8+
**GitHub URL:** https://github.com/zero-to-prod/data-model-helper/issues/32
9+
10+
## Description
11+
12+
**Describe the bug**
13+
When installing this package I see this error:
14+
```shell
15+
Skipped installation of bin bin/zero-to-prod-data-model-factory for package zero-to-prod/data-model-helper: name conflicts with an existing file
16+
```
17+
18+
**To Reproduce**
19+
Steps to reproduce the behavior:
20+
21+
1. Update this package in an existing project with this in `composer.json`
22+
```json
23+
"post-update-cmd": [
24+
"zero-to-prod-package-helper"
25+
],
26+
```
27+
2. Run: `composer update`
28+
5. See error: `Skipped installation of bin bin/zero-to-prod-data-model-factory for package zero-to-prod/data-model-helper: name conflicts with an existing file`
29+
30+
**Expected behavior**
31+
Remove confict.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Implementation Plan: Resolve Binary Name Conflict (Issue #32)
2+
3+
## Context
4+
Reference: [context/issues/32-name-conflicts-with-an-existing-file.md](../issues/32-name-conflicts-with-an-existing-file.md)
5+
6+
## Problem
7+
When installing the `zero-to-prod/data-model-helper` package, Composer reports a binary name conflict:
8+
```
9+
Skipped installation of bin bin/zero-to-prod-data-model-factory for package zero-to-prod/data-model-helper: name conflicts with an existing file
10+
```
11+
12+
## Root Cause Analysis
13+
The package includes `bin/zero-to-prod-data-model-factory` in its bin array, but this conflicts with another package or existing binary file in the user's environment.
14+
15+
## Solution Strategy
16+
Remove the conflicting binary from the package configuration since:
17+
1. The main functionality should be provided by `bin/zero-to-prod-data-model-helper`
18+
2. The `zero-to-prod-data-model-factory` binary may be provided by a separate package (`zero-to-prod/data-model-factory`)
19+
3. The conflict prevents proper installation
20+
21+
## Implementation Steps
22+
23+
### 1. Update composer.json
24+
- Remove `bin/zero-to-prod-data-model-factory` from the bin array
25+
- Keep only `bin/zero-to-prod-data-model-helper` as the main binary
26+
- This maintains the core functionality while resolving the conflict
27+
28+
### 2. Remove conflicting binary file
29+
- Delete the `bin/zero-to-prod-data-model-factory` file from the repository
30+
- This prevents future conflicts and clarifies package responsibility
31+
32+
### 3. Update package suggestions
33+
- Ensure `zero-to-prod/data-model-factory` is properly suggested in composer.json
34+
- This guides users to the correct package for factory functionality
35+
36+
## Expected Outcome
37+
- Composer installation will complete without conflicts
38+
- Users can still access factory functionality via the dedicated `zero-to-prod/data-model-factory` package
39+
- Package installation integrates properly with `post-update-cmd` scripts
40+
41+
## Validation
42+
- Test composer installation in a clean environment
43+
- Verify the remaining binary (`zero-to-prod-data-model-helper`) functions correctly
44+
- Confirm no regression in core package functionality

0 commit comments

Comments
 (0)