laravel-shift / blueprint

A code generation tool for Laravel developers.
MIT License
2.9k stars 276 forks source link

Request and Response class name replacement fixed to handle environment differences #704

Open yolcuiskender opened 2 weeks ago

yolcuiskender commented 2 weeks ago

Request class name is now generated correctly. Response class name is now replaced correctly.

PHP_EOL could cause problems in different environments like based on OS and Platform.

Example: Windows terminal with Apache would evaluate PHP_EOL as \r\n at runtime while the stub only has \n causing the str_replace function to fail.

Furthermore tests use \r\n in the files opposit to \n within the stubs causing false negatives.

jasonmccreary commented 2 weeks ago

Thanks. But tests are failing. There is also no test to prove the issue/fix.

Also, no one has reported a problem with PHP_EOL. Either way, best to keep your PRs focused to a single "issue".

yolcuiskender commented 2 weeks ago

The failing tests in the pipeline seem to be unrelated to the issue itself, they originate from cache v2 in the workflow for macos, not something I remember changing. This PR solves both #703 and #705.

jasonmccreary commented 2 weeks ago

I'll fix the build on master. Either way, it'd still like to see a test for you fix as currently this seems either untested or not an issue.