Skip to content

Fix path generation for generate:repository command - Fix #712#713

Merged
binaryk merged 1 commit intoBinarCode:10.xfrom
RomainMazB:patch-2
Feb 12, 2026
Merged

Fix path generation for generate:repository command - Fix #712#713
binaryk merged 1 commit intoBinarCode:10.xfrom
RomainMazB:patch-2

Conversation

@RomainMazB
Copy link
Copy Markdown

Basically, I reversed the str_replace statements which was wrong. Imagine this namespace: App\Restify\User.

With the old code:

str_replace('App\\', 'app/', str_replace('\\', '/', $namespace)).'/'.$className.'.php';

it would first execute the str_replace('\\', '/', $namespace)) which results in this string: App/Restify/User, meaning the next code execution is useless:

str_replace('App\\', 'app/', 'App/Restify/User')

Basically, I reversed the `str_replace` statements which was wrong. Imagine this namespace: `App\Restify\User`.

With the old code:
```php
str_replace('App\\', 'app/', str_replace('\\', '/', $namespace)).'/'.$className.'.php';
```
it would first execute the `str_replace('\\', '/', $namespace))` which results in this string: `App/Restify/User`, meaning the next code execution is useless:
```php
str_replace('App\\', 'app/', 'App/Restify/User')
```
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 2, 2026

@RomainMazB is attempting to deploy a commit to the BinarCode Team on Vercel.

A member of the Team first needs to authorize it.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Feb 2, 2026

PR Summary

  • Improved string replacement in the getRepositoryPath method
    The order of replacing certain characters in this method has been fixed. This ensures the correct format for fetching repository paths, resulting in less errors and smoother operation.

@binaryk
Copy link
Copy Markdown
Collaborator

binaryk commented Feb 12, 2026

Thank you!

@binaryk binaryk merged commit 82c812d into BinarCode:10.x Feb 12, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants