Open animeshsarkar-bct opened 7 years ago
This package would need to up the minimum PHP version as it uses features not available, especially in 5.4.
but 1.2.1 works fine if php version or laravel version matters please mention this on readme or change log
@animeshsa that is because they just added a new tagged version 1.2.2 with changes today.
@animeshsa Don't close this issue. Its still an active problem :-) I meant that the changes they made today is what broke this for you. Which is why it was probably working with 1.2.1
true it ruined my day :(
@animeshsa if 1.2.1 worked for you, you should be able to tell composer that you want to specifically use 1.2.1 for now.
yes
I have the same problem, my version of Laravel is 5.1.45, php is 7.1.1 and mysql is 5.6.36.
when execute the command "php artisan make:models" my error is the next:
[Symfony\Component\Debug\Exception\FatalErrorException]
parse error
Hi guys, I will investigate tomorrow. Please be patient and use older tagged versions for now. Also, please post errors with the -vvv option when running the command and paste the full stack trace of errors.
Cheers, Ignas
How to solve this problem
@ufowiner you can do something like this:
php composer.phar require ignasbernotas/laravel-model-generator:1.1.*
@rbarrientos182 chances are that you're running a different php cli version than what's being used by your web server.
Running php -v
from the command line will tell you what version is running.
php artisan
will use the php cli version to complete its tasks. It's important to note that an alias
to a different php version will not work and that you need to specifically update the PATH
to your installed php.
@jenovachild my version running is 5.6.30, but I don't think my version is the problem.
My Fix:
Line 121 From: $this->generateTable( ((object) $table)->name ); To: $this->generateTable($table->name);
Line 386 From: return ((object) $primaryKeyResult[0])->COLUMN_NAME; To: return $primaryKeyResult[0]->COLUMN_NAME;
Confirmed that XIIZQ's fixes above worked for me to solve the issue.
Fixed with 1.2.3
Description:
running > php artisan command getting this error PHP Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in C:\xampp\htdocs\ctw-portal\vendor\ignasbernotas\laravel-model-generator\src\Commands\MakeModelsCommand.php on line 121
[Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected '->' (T_OBJECT_OPERATOR)
please help me on this
Steps To Reproduce: