Skip to content

Conversation

@DarkLink363
Copy link
Contributor

This pull request addresses an issue in the Binafy\LaravelStub\LaravelStub class where the $replaces property could be accessed before it was initialized. This typically occurs when neither the replace() nor replaces() functions are used, leading to a PHP error:
Typed property Binafy\LaravelStub\LaravelStub::$replaces must not be accessed before initialization

These change ensure that the $replaces property is always properly initialized before use, preventing potential runtime errors and improving the stability of the package.

"Typed property Binafy\LaravelStub\LaravelStub::$replaces must not be accessed before initialization"
when not using function "replace" and "replaces"
@milwad-dev milwad-dev changed the title Fix Uninitialized Property Error "$replaces" [1.x] Fix Uninitialized Property Error "$replaces" May 15, 2024
@milwad-dev milwad-dev merged commit d21fdf5 into binafy:1.x May 15, 2024
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